mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 12:41:36 +08:00
Robustify RTPS bridge stream parsing.
This commit is contained in:
committed by
Daniel Agar
parent
089fbdccc9
commit
cd66a262ee
@@ -56,7 +56,9 @@ public:
|
||||
|
||||
virtual int init() {return 0;}
|
||||
virtual uint8_t close() {return 0;}
|
||||
ssize_t read(uint8_t *topic_id, char out_buffer[], size_t buffer_len);
|
||||
|
||||
ssize_t read();
|
||||
bool parse(uint8_t *topic_id, char out_buffer[], size_t buffer_len);
|
||||
|
||||
/**
|
||||
* write a buffer
|
||||
@@ -76,6 +78,10 @@ public:
|
||||
size_t get_header_length();
|
||||
|
||||
private:
|
||||
#ifndef PX4_DEBUG
|
||||
void print_buffer_debug();
|
||||
#endif /* PX4_DEBUG */
|
||||
|
||||
struct __attribute__((packed)) Header {
|
||||
char marker[3];
|
||||
uint8_t topic_id;
|
||||
|
||||
Reference in New Issue
Block a user