nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
9.95k stars 1.28k forks source link

Build A Frame Reassembler #2764

Open LeStarch opened 3 weeks ago

LeStarch commented 3 weeks ago
F´ Version
Affected Component

Feature Description

Build a component that can be used to reassemble communication frames given protocol information. This will break-off this functionality from the Deframer.

Basic requirements:

  1. Accept incoming Fw::Buffers of any size
  2. Accumulate buffers in-order
  3. Call frame detector helper class
  4. On "NO_FRAME" discard first byte and try again
  5. On "NEED DATA" continue to accumulate data
  6. On "FRAME" allocate buffer, copy-out frame

Helper class requirements:

  1. Must implement Enum detect_frame(const CircularBuffer& buffer, FwSizeType& size_output) method
  2. Cannot alter circular buffer (uses peeks)
  3. Must set size_output when data is needed and when frame detected