#include <comm_protocol.h>
Public Member Functions | |
CommProtocol (ProtocolConfig &config) | |
uint8_t * | FetchCacheFreeSpace (uint32_t *o_len) |
uint16_t | GetAndUpdateSeqNum () |
int32_t | Pack (uint8_t *o_buf, uint32_t o_buf_size, uint32_t *o_len, const CommPacket &i_packet) |
int32_t | ParseCommStream (CommPacket *o_pack) |
void | ResetParser () |
int32_t | UpdateCacheWrIdx (uint32_t used_size) |
~CommProtocol () | |
Private Member Functions | |
int32_t | FsmFindPacketLength () |
int32_t | FsmGetPacketData (CommPacket *o_pack) |
void | FsmParserStateTransfer (uint32_t new_state) |
int32_t | FsmSearchPacketPreamble () |
uint8_t * | GetCacheReadPos () |
uint32_t | GetCacheTailSize () |
uint32_t | GetValidDataSize () |
bool | IsLengthKnown () |
void | ResetCache () |
void | UpdateCache (void) |
Private Attributes | |
CommCache | cache_ |
ProtocolConfig | config_ |
volatile uint32_t | fsm_parse_step_ |
bool | is_length_known |
volatile uint32_t | offset_to_read_index_ |
uint32_t | packet_length_ |
Protocol * | protocol_ |
uint16_t | seq_num_ |
Definition at line 52 of file comm_protocol.h.
livox_ros::CommProtocol::CommProtocol | ( | ProtocolConfig & | config | ) |
Definition at line 32 of file comm_protocol.cpp.
livox_ros::CommProtocol::~CommProtocol | ( | ) |
Definition at line 48 of file comm_protocol.cpp.
Definition at line 54 of file comm_protocol.cpp.
|
private |
Definition at line 175 of file comm_protocol.cpp.
|
private |
Definition at line 194 of file comm_protocol.cpp.
|
inlineprivate |
Definition at line 95 of file comm_protocol.h.
|
private |
Definition at line 149 of file comm_protocol.cpp.
uint16_t livox_ros::CommProtocol::GetAndUpdateSeqNum | ( | ) |
Definition at line 141 of file comm_protocol.cpp.
|
inlineprivate |
Definition at line 74 of file comm_protocol.h.
|
private |
Definition at line 75 of file comm_protocol.cpp.
|
private |
Definition at line 83 of file comm_protocol.cpp.
|
inlineprivate |
Definition at line 87 of file comm_protocol.h.
int32_t livox_ros::CommProtocol::Pack | ( | uint8_t * | o_buf, |
uint32_t | o_buf_size, | ||
uint32_t * | o_len, | ||
const CommPacket & | i_packet | ||
) |
Definition at line 107 of file comm_protocol.cpp.
int32_t livox_ros::CommProtocol::ParseCommStream | ( | CommPacket * | o_pack | ) |
Definition at line 114 of file comm_protocol.cpp.
|
inlineprivate |
Definition at line 75 of file comm_protocol.h.
void livox_ros::CommProtocol::ResetParser | ( | ) |
Definition at line 112 of file comm_protocol.cpp.
|
private |
Definition at line 91 of file comm_protocol.cpp.
Definition at line 66 of file comm_protocol.cpp.
|
private |
Definition at line 83 of file comm_protocol.h.
|
private |
Definition at line 81 of file comm_protocol.h.
|
private |
Definition at line 91 of file comm_protocol.h.
|
private |
Definition at line 86 of file comm_protocol.h.
|
private |
Definition at line 89 of file comm_protocol.h.
|
private |
Definition at line 90 of file comm_protocol.h.
|
private |
Definition at line 82 of file comm_protocol.h.
|
private |
Definition at line 84 of file comm_protocol.h.