trice
trice copied to clipboard
Use stream buffer and reference list for deferred mode as selectabe option.
Currently a double buffer overflow is possible, when more Trice data produced than deliverable. Also, if the transmission should be done time controlled Trice by Trice, a whole double buffer side filled with several Trice messages is, maybe, difficult to handle. When a Trice starts, its size is known and a stream buffer gets allocated by simply incrementing a pointer. This can only overwrite some old Trices but not the buffer end. The allocated address goes in a FIFO which is read by the transmission task perfoming also the optional encryption and TCOBS or COBS encoding. Separating Trices in one transmission package each results in less lossed data in case of a corrupted transmission package.
Joined with #260
The double buffer solution is the fastest. Overflow protection is implementable if really needed. Handling multiple trice messages in one half buffer is no problem.
The stream buffers now working as option. For timed controlled transmission they are needed. Function TriceOut
is the one to be time controlled. With double buffers their swap interval could disturb the timing.