Hi,
I’ve just written my first “HLA” (based on the RFM69 example – thanks to Alex M.!!) for decoding SPI protocol to one of our ASICs, works really great!!
the AnalyzerFrame output has 3 items “rw”, “reg” and “value” which I’d like to see in this order in the analzyer output and the exported data files.
but by default the seem to get sorted alphabetically and do not show up in the order of the data={} set.
how can I explicitly force the order of those data columns to what I’d like to expect ?
right now I use “1rw” “2reg” and “3value” – which is ugly but seems to work:
result_types = {
"r": {"format": "{{data.1rw}} {{data.2reg}} {{data.3value}}"},
"w": {"format": "{{data.1rw}} {{data.2reg}} {{data.3value}}"},
}
…
return AnalyzerFrame(
self._rw[0],
start_time=frame.start_time,
end_time=frame.end_time,
data={
"1rw": self._rw,
"2reg": get_reg_name(self._address),
"3value": f"0x{self._val:04X}",
},
)
is there a better way without using numeric prefixes in the keys for sorting of those data elements ?
thanks,
Harald