comparison DDS_Fox.c @ 50:7ab3fb870ef8

Remove unused variables
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Wed, 10 Oct 2012 13:18:00 +0200
parents b47b97cfd050
children 2320f5fc66aa
comparison
equal deleted inserted replaced
49:a4c8db62a34b 50:7ab3fb870ef8
136 SendCmd(Request, Param); 136 SendCmd(Request, Param);
137 return ; 137 return ;
138 } 138 }
139 139
140 void DDSFox_SetFreqMax (DDSParameter *Param) { 140 void DDSFox_SetFreqMax (DDSParameter *Param) {
141 double word ;
142 unsigned char octets[6]; 141 unsigned char octets[6];
143 char Request[255]; 142 char Request[255];
144 convert_double_6char(pow(2,48)/2,octets); // borne sup : clock / 2 143 convert_double_6char(pow(2,48)/2,octets); // borne sup : clock / 2
145 sprintf(Request,"set;%i;%i;%i;%i;%i;%i;%i;%i",1,CMD_FREQ_SUP, 144 sprintf(Request,"set;%i;%i;%i;%i;%i;%i;%i;%i",1,CMD_FREQ_SUP,
146 *(octets+5),*(octets+4),*(octets+3),*(octets+2),*(octets+1),*octets); 145 *(octets+5),*(octets+4),*(octets+3),*(octets+2),*(octets+1),*octets);
148 DDSFox_SetSweepSign (Param); 147 DDSFox_SetSweepSign (Param);
149 return ; 148 return ;
150 } 149 }
151 150
152 void DDSFox_SetFreqMin (DDSParameter *Param) { 151 void DDSFox_SetFreqMin (DDSParameter *Param) {
153 double word ;
154 unsigned char octets[6]; 152 unsigned char octets[6];
155 char Request[255]; 153 char Request[255];
156 convert_double_6char(1,octets); // borne inf : ~0 154 convert_double_6char(1,octets); // borne inf : ~0
157 sprintf(Request,"set;%i;%i;%i;%i;%i;%i;%i;%i",1,CMD_FREQ_INF, 155 sprintf(Request,"set;%i;%i;%i;%i;%i;%i;%i;%i",1,CMD_FREQ_INF,
158 *(octets+5),*(octets+4),*(octets+3),*(octets+2),*(octets+1),*octets); 156 *(octets+5),*(octets+4),*(octets+3),*(octets+2),*(octets+1),*octets);
275 273
276 double DDSFox_ReadFreq(DDSParameter *Param) { 274 double DDSFox_ReadFreq(DDSParameter *Param) {
277 char Request[255]; 275 char Request[255];
278 unsigned int OctetA, OctetB, OctetC, OctetD, OctetE, OctetF ; 276 unsigned int OctetA, OctetB, OctetC, OctetD, OctetE, OctetF ;
279 double FreqRead ; 277 double FreqRead ;
280 int cmd[20];
281 Command Rd; 278 Command Rd;
282 init_command(&Rd); 279 init_command(&Rd);
283 sprintf(Request,"get;%i;%i",1,CMD_GET_FREQ); 280 sprintf(Request,"get;%i;%i",1,CMD_GET_FREQ);
284 if (RecvCmd(&Rd, Request, Param) == -1) 281 if (RecvCmd(&Rd, Request, Param) == -1)
285 return -1.; 282 return -1.;
300 297
301 298
302 int SendCmd(char *Buffer, DDSParameter *Param) { 299 int SendCmd(char *Buffer, DDSParameter *Param) {
303 unsigned int hConv=0; 300 unsigned int hConv=0;
304 char Response[255]; 301 char Response[255];
305 char parsebuf[255];
306 if (ConnectToTCPServer (&hConv, Param->Port, Param->ip, OnTCPEvent, Response, 0) < 0) { 302 if (ConnectToTCPServer (&hConv, Param->Port, Param->ip, OnTCPEvent, Response, 0) < 0) {
307 error("Connect failed"); 303 error("Connect failed");
308 return -1; 304 return -1;
309 } 305 }
310 if (ClientTCPWrite (hConv, Buffer, strlen(Buffer)+1, 0) < 0) { 306 if (ClientTCPWrite (hConv, Buffer, strlen(Buffer)+1, 0) < 0) {