]> sigrok.org Git - libsigrok.git/commitdiff
serial: extend stream detect for variable length packet checkers
authorGerhard Sittig <redacted>
Thu, 24 Sep 2020 14:29:06 +0000 (16:29 +0200)
committerGerhard Sittig <redacted>
Thu, 22 Oct 2020 19:25:02 +0000 (21:25 +0200)
The previous implementation of the packet detection in a serial stream
assumed that all packets are of equal length which is known in advance.
Extend the packet validity check interface such that caller provided
callbacks can either decide that the input is valid or invalid (terminal
decision), or request more receive data before a decision can be made
(deferral, coverring variable length packets, with a minimum size to
cover the header before a length becomes available and the total packet
length is known).

This commit extends the API, and adjusts the call sites to not break the
compilation. Actual variable length checkers are yet to be done. Improve
readability while we are here: Better reflect the purpose and units of
variables in their identifiers. Tweak diagnostics messages, update
inline and doxygen comments.


No differences found