view DDS_Fox.h @ 62:53dbce5f0745

Further simplification
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 29 Oct 2012 14:43:40 +0100
parents d9aae7d7f2c6
children 64a7a1d3d75c
line wrap: on
line source

typedef struct {
	char Name[255];
	char ip[255];
	int Port;
	//int Divider;
	double Clock;
	double Frequency;
	double SweepRate;
	double Delta_T;
	unsigned int Profil;  // numéro de profil de la DDS : single freq=0, sweep=7
}DDSParameter;






typedef struct {
	char* action;
	char* canal;
	char* command;  
	char* value0;
	char* value1;
	char* value2;
	char* value3;
	char* value4;
	char* value5;
	char* value6;
	char* value7;
	char* value8;
	char* value9;
	char* value10;
	char* value11;
	char* value12;
	char* value13;
	char* value14;
	char* value15;
	char* value16;
	char* value17;
	char* value18;
	char* value19;
	
}Command;


void DDS_Initialize (DDSParameter * Param) ;
void DDSFox_Reset(DDSParameter * Param);
void DDSFox_SetFreq (DDSParameter * Param) ;
void DDSFox_SetFreqMax (DDSParameter *Param);
void DDSFox_SetFreqMin (DDSParameter *Param) ;
//void DDSFox_SetRate (DDSParameter * Param) ;
void DDSFox_SetDiv(DDSParameter * Param) ;
void DDSFox_SetDT(DDSParameter * Param);
void DDSFox_SetDf(DDSParameter * Param);
int DDSFox_GetSweepSign(DDSParameter * Param);
void DDSFox_SetSweepSign(DDSParameter * Param) ;
void DDSFox_StopSweep(DDSParameter * Param);
void DDSFox_StartSweep(DDSParameter * Param);
double DDSFox_ReadFreq(DDSParameter * Param);
int SendCmd(char * Buffer, DDSParameter * Param) ;
int RecvCmd2(int * cmd, char * Buffer, DDSParameter * Param) ;
int RecvCmd(Command * Rd, char * Buffer, DDSParameter * Param) ;
int OnTCPEvent(unsigned handle, int xType, int errCode, void *callbackData) ;
void parse_command2(int * cmd, char * buf ) ;
int parse_command(Command * cmd1, char * command ) ;
int convert_double_6char (double fraction, unsigned char* octects) ;
int init_command(Command * cmd1) ;
void DDS_ReInitialize (DDSParameter *Param);