mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
protocol_splitter: implement with one read buffer
This is an attempt to implement the protocol_splitter with one read buffer only. The idea is to prevent additional copy operations from an incoming buffer to the respective protocol buffer. Right now the benefit is not really there because we are not using a ringbuffer and have to shift data around quite a bit. We also try to parse and copy data to the reader immediately without doing a read from the device which potentially takes 100ms. We further use a timeout mechanism to prevent starvation if one reader disconnects and the buffer would fill up from unread data.
This commit is contained in: