Hi Steve,
First we don’t offer the ability to control the order of the columns yet, or the ability to order them in-app. It’s on our backlog, but unfortunately it will be a while before we can do another pass on the data table.
That said, you can hide columns you don’t want to see in the UI by using the right-click menu:
Second, about multiple frames. Here is a quick example showing an HLA producing multiple frames from a single input frame.
Here you can see the new frames in the output. Each of those 3 frames was produced from the single frame below it.
Here you can see them in the sidebar. For HLAs, there is exactly 1 row per AnalyzerFrame
returned by your HLA.
Note - the frames you produce from your HLA must always be returned in time order, sorted by their start times. That is true both between calls to decode()
as well as between frames returned by decode()
, when returning more than one frame at a time, as shown here. Otherwise we’ll get undefined behavior in the app.
You can see the source code below. the decode()
function can return one of thee possible types:
-
None
indicating no frame should be produced
-
AnalyzerFrame
, indicating one frame is produced
-
List[AnalyzerFrame]
indicating multiple frames are produced, as shown below.
from saleae.analyzers import HighLevelAnalyzer, AnalyzerFrame, StringSetting, NumberSetting, ChoicesSetting
class Hla(HighLevelAnalyzer):
result_types = {
'mytype': {
'format': '{{data.original}} [{{data.subframe}}]'
}
}
def __init__(self):
pass
def decode(self, frame: AnalyzerFrame):
gap = (frame.end_time - frame.start_time) / 10
width = (frame.end_time - frame.start_time)/3
time1 = frame.start_time
time2 = time1 + width
time3 = time2 + width
time4 = time3 + width
# Return the data frame itself
frame1 = AnalyzerFrame('mytype', time1, time2 - gap, {
'original': frame.data['data'],
'subframe': 1
})
frame2 = AnalyzerFrame('mytype', time2, time3 - gap, {
'original': frame.data['data'],
'subframe': 2
})
frame3 = AnalyzerFrame('mytype', time3, time4, {
'original': frame.data['data'],
'subframe': 3
})
return [frame1, frame2, frame3]