96 if (valid_data_size) {
188 printf(
"Continue to find length error\n");
205 printf(
"Check packet error\n");
212 printf(
"Parse packet error\n");
virtual int32_t ParsePacket(const uint8_t *i_buf, uint32_t i_len, CommPacket *o_packet)=0
int32_t FsmSearchPacketPreamble()
virtual uint32_t GetPreambleLen()=0
virtual uint32_t GetPacketWrapperLen()=0
int32_t FsmFindPacketLength()
void FsmParserStateTransfer(uint32_t new_state)
uint8_t * GetCacheReadPos()
uint16_t GetAndUpdateSeqNum()
virtual uint32_t FindPacketLen(const uint8_t *buf, uint32_t buf_length)=0
CommProtocol(ProtocolConfig &config)
virtual uint32_t GetPacketLen(const uint8_t *buf)=0
const uint32_t kMoveCacheLimit
virtual int32_t CheckPreamble(const uint8_t *buf)=0
uint32_t GetCacheTailSize()
uint8_t * FetchCacheFreeSpace(uint32_t *o_len)
virtual int32_t CheckPacket(const uint8_t *buf)=0
volatile uint32_t offset_to_read_index_
virtual int32_t Pack(uint8_t *o_buf, uint32_t o_buf_size, uint32_t *o_len, const CommPacket &i_packet)=0
int32_t UpdateCacheWrIdx(uint32_t used_size)
int32_t FsmGetPacketData(CommPacket *o_pack)
int32_t Pack(uint8_t *o_buf, uint32_t o_buf_size, uint32_t *o_len, const CommPacket &i_packet)
uint32_t GetValidDataSize()
int32_t ParseCommStream(CommPacket *o_pack)
volatile uint32_t fsm_parse_step_