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