My issue: the last message is not rejected/recognized after a timeout
Using an async serial HLA decoder to decode bytes into messages. If a timeout after some bytes occur, there is no way to signal an improper message because there is no timeout (yes, there is, if after the timeout a new byte is on the line, but not if the capture is stopped before a byte arrives).
For example: message is 10 byte, but only 9 are received. The HLA has no way to detect a timeout condition without a byte after the timeout occurred? I canāt find anything I could set to signal a timeout occurred.
For example: is it possible to assign a timeout value to a HighLevelAnalyzer class? So the decode function is called with a timeout frame?
Perhaps what is needed is some form of signalling mechanism? One way to do this would be for class Hlaās decode method to handle event frame types and to opt in for events through something like the settings system.
Interesting events might be TriggerEvent, TriggerMatch (fired anywhere a trigger event match is detected), Babble (āfastā signal transitions for an extended period), Timeout (no signal transitions for an extended period), Glitch and so on.
We do not currently support that use-case, but I agree itās something we should look into supporting. We have a feature suggestion board at https://saleae.upvoty.com/b/feature-requests/, but I donāt think that one is in there. If youād like, you can add it, otherwise Iād be happy to.
Weāve talked about adding an event for when the capture ends, so any pending state can be flushed, but this is a slightly different use-case. Do you have any thoughts on that?
I think that would also solve it. itās just because the decode function is not called anymore that the frame does not get the possibility to publish the frame.
The addition of more events that would trigger the decode function in the HLA could also be a solution, and could be a pretty good addition to the software, but I guess itās easier to implement (quick) to have the decode called at the end of a capture (event = āend of captureā).