36 : crc16_(seed16), crc32_(seed32) {}
49 if (sdk_packet->
length > o_buf_size) {
65 o_buf[sdk_packet->
length - 4] = crc & 0xFF;
66 o_buf[sdk_packet->
length - 3] = (crc >> 8) & 0xFF;
67 o_buf[sdk_packet->
length - 2] = (crc >> 16) & 0xFF;
68 o_buf[sdk_packet->
length - 1] = (crc >> 24) & 0xFF;
70 *o_len = sdk_packet->
length;
83 memset((
void *)o_packet, 0,
sizeof(
CommPacket));
101 return sizeof(
SdkPacket) - 1 + kSdkPacketCrcSize;
112 if ((preamble->
sof == kSdkProtocolSof) &&
SdkProtocol(uint16_t seed16, uint32_t seed32)
int32_t ParsePacket(const uint8_t *i_buf, uint32_t i_len, CommPacket *o_packet) override
uint32_t crc32_calc(const uint8_t *data, uint16_t len)
const uint32_t kSdkPacketPreambleCrcSize
uint16_t mcrf4xx_calc(const uint8_t *data, const uint16_t datalen)
uint32_t GetPacketWrapperLen() override
int32_t Pack(uint8_t *o_buf, uint32_t o_buf_size, uint32_t *o_len, const CommPacket &i_packet) override
const uint8_t kSdkProtocolSof
int32_t CheckPreamble(const uint8_t *buf) override
uint32_t GetPacketLen(const uint8_t *buf) override
const uint32_t kSdkPacketCrcSize
int32_t CheckPacket(const uint8_t *buf) override
uint32_t GetPreambleLen() override