25 #ifndef COMM_PROTOCOL_H_ 26 #define COMM_PROTOCOL_H_ 66 virtual int32_t ParsePacket(uint8_t *i_buf, uint32_t i_len,
CommPacket *o_packet) = 0;
68 virtual int32_t Pack(uint8_t *o_buf, uint32_t o_buf_size, uint32_t *o_len,
const CommPacket &i_packet) = 0;
70 virtual uint32_t GetPreambleLen() = 0;
72 virtual uint32_t GetPacketWrapperLen() = 0;
74 virtual uint32_t GetPacketLen(uint8_t *buf) = 0;
76 virtual int32_t CheckPreamble(uint8_t *buf) = 0;
78 virtual int32_t CheckPacket(uint8_t *buf) = 0;
82 #endif // COMM_PROTOCOL_H_
int(* RequestPackCb)(CommPacket *packet)
struct CommPacket CommPacket