#ifndef ELVIS_H #define ELVIS_H /* error codes */ #define Err_OpenSerialPort 1 #define Err_CloseSerialPort 2 #define Err_DataOnInput 3 #define Err_ReceiveText 4 #define Err_TransmitData 5 #define Err_SetBaudRate 6 #define Err_OpenUDPPort 7 #define Err_CloseUDPPort 8 #define Err_SendUDPPacket 9 #define Err_SetupUDPPort 10 #define Err_EncodeP4 11 #define Err_DecodeP4 12 #define Err_SetHookRecieveFunction 13 #define Err_SetHookErrorFunction 14 #define Err_UDPThreadExecute 15 #define Err_SerialThreadExecute 16 /* serial port functions */ extern int CloseSerialPort(void); extern int DataOnInput(void); extern char *ReceiveText(void); extern int SetBaudRate(unsigned int BaudRate); extern unsigned int SendSerialPacket(unsigned short ToAddressP4, unsigned short FromAddressP4, char *Buf, char TypeP4 = 0x03); extern int OpenSerialPort(char *ComPort); /* UDP socket functions */ extern int OpenUDPPort(unsigned short UDPPort, char *FromIP = "0.0.0.0"); extern int CloseUDPPort(void); extern int SetupUDPPort(unsigned short UDPPort, char *FromIP = "0.0.0.0"); extern int SendUDPPacket(unsigned short ToAddressP4, unsigned short FromAddressP4, char *ToAddressIP, char *Buf, char TypeP4 = 0x03, unsigned short UDPPort = 6666); /* P4 protocol conversion functions */ extern char *EncodeP4(unsigned short ToAddress, unsigned short FromAddress, char *Data, char TypeP4 = 0x03); extern int DecodeP4(char *Data, unsigned short &ToAddress, unsigned short FromAddress, char *DecodeData, char &TypeP4); /* catching functions other setup */ extern int SetHookRecieveFunction(void *PointerOfFunction); extern int SetHookErrorFunction(void *PointerOfFunction); /* informative functions */ extern void ShowCopyright(void); extern char *GetDllVersion(void); #endif