#ifndef _EV_PROTO_H_ #define _EV_PROTO_H_ #include #include #pragma pack(1) struct EVPCommand { enum EVPC { EVPC__FIRST, EVPC_STATUS = 1, EVPC_USER_DEFINE = 128, EVPC__LAST }; }; struct EVPStatus { enum EVPS { EVPS__FIRST, EVPS_OK = 1, EVPS_ERROR = 128, EVPS_INTERNAL_ERROR, EVPS_PARAMETER_ERROR, EVPS__LAST }; }; struct EVPHeader { int16_t cmd; // EVPCommand::EVPC uint32_t size; // sizeof(EVPHeader)+sizeof(subcmd) }; struct EVP_Status { int16_t status; }; struct EVP_VariableBuffer { int16_t type; uint8_t buff[0]; }; //#todo template void endian_convert(TPacket& packet); #pragma pack() #endif