Saturday Dec 3, 2022 (LOS Telem and Comms)
Purpose
This meeting is to go over how LOS Telem and Comms will receive data and expose the data to ZP software.
Requirements (Initial)
Data type agnostic (shouldn’t have to know the type/format of the data)
This is so it can be used for any type of air to air and air to ground data
Acts as a data passthrough, no processing shall occur
The length of the message frame would be passed in to telem and comms
Ideas
Chris:
ZP software creates a circular/ring buffer and passes it to LOS
Upon receiving data, it will load into the circular buffer, overwriting the oldest data if necessary
To signal to ZP that data is ready, and to keep track of queued messages, have a count shared between ZP and LOS that LOS would increment and ZP would decrement
Could use a semaphore to signal that there is populated data (no blocking if ZP wants to do other things)
Problems:
Anni:
LOS owns storage method some sort of queue/circular buffer
ZP requests for data,
Solution to receiving data:
Receive one byte at a time
Pros:
Does not require implementation specific detail
Simple
Cons:
High interrupt overhead (firing for every byte)
Have senders send same message frame length at all times, even if true data being sent is less
Pros:
Does not require implementation specific detail
Simple for receiving
Cons:
Senders have to pack their data in the same format
Wasted time and space
Have LOS know the message format to read in the header and appropriately read in the rest of the data
Pros:
Different sized data can be sent
Less interrupt overhead than One Byte method
Cons:
LOS side processing
Implementation specific
More interrupt overhead than Same Message Frame Length method (two instead of one)
Implementation
Use a regular array/buffer (of equal to or more than the max size of message frame) to provide HAL call a place to put data.
In the interrupt we copy over to the circularqueue/circular buffer/ring buffer LOCALLY
2 “Parallel buffers” owned by LOS for sending to ZP
When ZP requests LOS to read from buffer 1, indicates that buffer 1 is busy
If buffer 1 is busy received data will be put into buffer 2
???