comparison DDS_Fox.h @ 68:64a7a1d3d75c

Cleanup AD9956 DDS driver
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 29 Oct 2012 14:48:14 +0100
parents d9aae7d7f2c6
children 12df3a2b18de
comparison
equal deleted inserted replaced
67:0159abc1a9d8 68:64a7a1d3d75c
2 char Name[255]; 2 char Name[255];
3 char ip[255]; 3 char ip[255];
4 int Port; 4 int Port;
5 //int Divider; 5 //int Divider;
6 double Clock; 6 double Clock;
7 double Frequency;
8 double SweepRate; 7 double SweepRate;
9 double Delta_T; 8 double Delta_T;
10 unsigned int Profil; // numéro de profil de la DDS : single freq=0, sweep=7 9 unsigned int Profil;
11 }DDSParameter; 10 } DDSParameter;
12 11
13 12 void DDSFox_Initialize(DDSParameter *Param, char *ip, int port, double frequency);
14 13 void DDSFox_SetSweepRate(DDSParameter *Param, double sweepRate);
15 14 void DDSFox_Set(DDSParameter *Param, double frequency, double sweepRate);
16 15 void DDSFox_Nop(DDSParameter *Param);
17 16 void DDSFox_SetProfile(DDSParameter *Param);
18 typedef struct { 17 void DDSFox_SetDiv(DDSParameter *Param, int div);
19 char* action;
20 char* canal;
21 char* command;
22 char* value0;
23 char* value1;
24 char* value2;
25 char* value3;
26 char* value4;
27 char* value5;
28 char* value6;
29 char* value7;
30 char* value8;
31 char* value9;
32 char* value10;
33 char* value11;
34 char* value12;
35 char* value13;
36 char* value14;
37 char* value15;
38 char* value16;
39 char* value17;
40 char* value18;
41 char* value19;
42
43 }Command;
44
45
46 void DDS_Initialize (DDSParameter * Param) ;
47 void DDSFox_Reset(DDSParameter * Param); 18 void DDSFox_Reset(DDSParameter * Param);
48 void DDSFox_SetFreq (DDSParameter * Param) ; 19 void DDSFox_SetFreq (DDSParameter * Param) ;
20 void DDSFox_SetFreqInf (DDSParameter *Param, double frequency) ;
21 void DDSFox_SetFreqSup (DDSParameter *Param, double frequency) ;
49 void DDSFox_SetFreqMax (DDSParameter *Param); 22 void DDSFox_SetFreqMax (DDSParameter *Param);
50 void DDSFox_SetFreqMin (DDSParameter *Param) ; 23 void DDSFox_SetFreqMin (DDSParameter *Param) ;
51 //void DDSFox_SetRate (DDSParameter * Param) ;
52 void DDSFox_SetDiv(DDSParameter * Param) ;
53 void DDSFox_SetDT(DDSParameter * Param); 24 void DDSFox_SetDT(DDSParameter * Param);
54 void DDSFox_SetDf(DDSParameter * Param); 25 void DDSFox_SetDf(DDSParameter * Param);
55 int DDSFox_GetSweepSign(DDSParameter * Param); 26 int DDSFox_GetSweepSign(DDSParameter * Param);
56 void DDSFox_SetSweepSign(DDSParameter * Param) ; 27 void DDSFox_SetSweepSign(DDSParameter * Param) ;
57 void DDSFox_StopSweep(DDSParameter * Param); 28 void DDSFox_StopSweep(DDSParameter * Param);
58 void DDSFox_StartSweep(DDSParameter * Param); 29 void DDSFox_StartSweep(DDSParameter * Param);
59 double DDSFox_ReadFreq(DDSParameter * Param); 30 double DDSFox_ReadFreq(DDSParameter * Param);
60 int SendCmd(char * Buffer, DDSParameter * Param) ;
61 int RecvCmd2(int * cmd, char * Buffer, DDSParameter * Param) ;
62 int RecvCmd(Command * Rd, char * Buffer, DDSParameter * Param) ;
63 int OnTCPEvent(unsigned handle, int xType, int errCode, void *callbackData) ;
64 void parse_command2(int * cmd, char * buf ) ;
65 int parse_command(Command * cmd1, char * command ) ;
66 int convert_double_6char (double fraction, unsigned char* octects) ;
67 int init_command(Command * cmd1) ;
68 void DDS_ReInitialize (DDSParameter *Param);
69 31