123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- #ifndef PSPUBLIC_H
- #define PSPUBLIC_H
- #pragma pack(push)
- #pragma pack(1)
- #define PS_SOURCE_CENTER 0X00
- #define PS_SOURCE_GUI 0X01
- #define PS_SOURCE_ALARM 0x02
- #define PS_FRAME_MIN_LEN 17
- #define PS_FRAME_MCPA_PAYLOAD_LEN 260
- #define PS_FRAME_MCPB_PAYLOAD_LEN 264
- #define PS_FRAME_MAX_LEN 562
- #define PS_MCP_A_DATA_LEN 64
- #define PS_MCP_B_DATA_LEN 256
- #define PS_AP_HEAD_FLAG 0x7E
- #define PS_AP_TAIL_FLAG 0x7E
- typedef struct AP_HEAD_S
- {
- quint8 byStartFlag;
- }AP_HEAD_T;
- typedef struct VP_HEAD_S
- {
- quint32 dwProjectId;
- quint8 byPacketNo;
- quint32 dwDeviceId;
- quint8 byVpFlag;
- quint8 byMcpType;
- } VP_HEAD_T;
- typedef enum
- {
- VP_RESP = 0x01,
- VP_CMMD = 0x80,
- }PT_VP_FLAG_E;
- typedef struct MCP_HEAD_S
- {
- quint8 byComd;
- quint8 byResp;
- } MCP_HEAD_T;
- #define MCP_A 0x01
- #define MCP_B 0x02
- typedef enum
- {
- MCP_A_REPORT = 0x01,
- MCP_A_QUERY = 0x02,
- MCP_A_CONFIGURE = 0x03,
- }MCP_A_COMD_E;
- typedef enum
- {
- MCP_B_CONTROL = 0x80,
- MCP_B_FILE_TRANSFER = 0x81,
- } MCP_B_COMD_E;
- typedef enum
- {
- MCP_RESP_SUCC = 0x01,
- MCP_RESP_ERR = 0x02,
- MCP_CMD = 0xFF
- }MCP_RESP_E;
- typedef struct
- {
- quint16 wLen;
- quint16 wTag;
- quint8 abyData[PS_MCP_A_DATA_LEN];
- } LTV_T;
- typedef struct
- {
- quint16 wLen;
- quint16 wTag;
- quint8 abyData[PS_MCP_B_DATA_LEN];
- } LTV_B_T;
- typedef struct PS_HEAD_S
- {
- AP_HEAD_T stApHead;
- VP_HEAD_T stVpHead;
- MCP_HEAD_T stMcpHead;
- } PS_HEAD_T;
- typedef struct PS_TAIL_S
- {
- quint16 wCRC;
- quint8 byStopFlag;
- } PS_TAIL_T;
- #pragma pack(pop)
- #endif
|