Format string does not display as documentation suggests. A new template HLA on serial analyzer has this in set_settings()
def set_settings(self, settings):
# Here you can specify how output frames will be formatted in the Logic 2 UI
# If no format is given for a type, a default formatting will be used
# You can include the values from your frame data (as returned by `decode`) by wrapping their name in double braces, as shown below.
return {
'mytype': {
'format': 'Output type: {{type}}, Input type: {{data.input_type}}'
}
}
def decode(self, frame):
# Return the data frame itself
return {
'type': 'mytype', # This type matches up with the type returned from `set_settings`
'start_time': frame['start_time'],
'end_time': frame['end_time'],
'data': {
'input_type': frame['type']
}
}
A modified one has this:
def set_settings(self, settings):
return {
'packet': {
'format': 'Input type: {{data.kek}}'
}
def decode(self, frame):
# Return the data frame itself
return {
'type': 'packet', # This type matches up with the type returned from `set_settings`
'start_time': frame['start_time'],
'end_time': frame['end_time'],
'data': {
'kek': 'slam'
}
}
But the display in logic does not reflect that or any changes made to it.