...
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
???
...