The max transferable packet size from the SPMU-001 (to Raspberry Pi, via Ethernet, including headers etc) is at least 2024 B but less than 2048 B. Need to hone in on exact upper limit.
The formatter needs to retrieve (using RMAP read command) 32 kB frames from the CdTe system and 1.9 MB frames from the CMOS system.
So, we need manage frame fragmentation when accessing remote ring buffers.
What ought happen
In TransportLayerMachine::handle_cmd() conditional for ring buffer read command, need to:
[x] add a method std::vector<uint8_t> TransportLayerMachine::get_reply_data(std::vector<uint8_t> reply) which extracts only the data portion of the response SpaceWire packet. This is for convenience.
[x] add a loop over all blocks in RingBufferInterface::read_count_blocks.
[x] for each block, synchronously send read command and synchronously receive reply. Replies data (use command mentioned above) should be appended to the reply array.
[x] when buffer exchange is complete, verify the whole reply is correct length, then queue the whole reply for downlink.
The warrant for my toil
So, we need manage frame fragmentation when accessing remote ring buffers.
What ought happen
In
TransportLayerMachine::handle_cmd()
conditional for ring buffer read command, need to:std::vector<uint8_t> TransportLayerMachine::get_reply_data(std::vector<uint8_t> reply)
which extracts only the data portion of the response SpaceWire packet. This is for convenience.RingBufferInterface::read_count_blocks
.foxsi4-commands/systems.json
.