Open tmplt opened 2 years ago
How should this functionality be exposed to the user? Via another Decoder::pull
variant?
A better idea would perhaps be to change the API to a single pull function. This function could return an enum { ITMPacket(TracePacket), MetaPacket(TimestampedTracePacket, CompleteStimMessage) }
or something similar. The decoder can then be configured via some Decoder::{group_with_timestamps, complete_stim_strings}(bool)
.
When #20 closes, this issue should be moved to https://github.com/rust-embedded/itm.
TracePacket::Extension
-logic is non-trivial. From the reference documentation one finds the port of the payload bytes viaid = (page * 32) + port
wherepage
is from the extension packet andport
is from the instrumentation packet. However, the document (D4.2.8) also saysitm-decode
should handle this and yield complete messages to the end-user.