#ifndef _EPROTOCOL_H_ #define _EPROTOCOL_H_ #ifdef EPROTOCOL_EXPORTS #define EPROTOCOL_API extern "C" __declspec(dllexport) #else #define EPROTOCOL_API extern "C" __declspec(dllimport) #endif #define INVALID_INT_VALUE 0xFFFFFFFF #include using namespace std; //------------------------------------------------------------ //Interface //Command Header typedef struct CommandHeader { char chDeviceType; char chCommandType; int nCommandCount; } CommandHeader; //A Specific Command typedef struct Command { int nFrameID; char chUseage; string strFunction; char chDataType; string strData; } Command; //------------------------------------------------------------ EPROTOCOL_API bool GetCommandHeader( const char* strCommand, CommandHeader* pHeader ); EPROTOCOL_API int GetCommandCount( const char* strCommand ); //Index from 1 on. EPROTOCOL_API bool GetCommandByIndex( const char* strCommand, int index, Command* pCommand ); #endif //_EPROTOCOL_H_