HLA - Analyzer Frame Format
Documentation for output produced by Saleae's built-in Analyzers
Python High Level Analyzers allow users to write custom code that processes the output of an analyzer. The below list of pre-installed low level analyzers can be immediately used with high level analyzers (HLAs).

Adding HLA Support for More Analyzers

We've released documentation on our FrameV2 API below, which can be used to add HLA support for any low level analyzer that is not listed above, including custom analyzers that were created using our Protocol Analyzer SDK.

Writing an HLA

In order to write a high level analyzer, the data format produced by the connected source analyzer must be understood.
For example, a high level analyzer which consumes serial data needs to understand the serial analyzer output format in order to extract bytes, and this code is very different from the code required to extract data bytes from CAN data.
1
# Reading serial data
2
3
def decode(self, frame):
4
print(frame.data['data'])
5
6
# Reading CAN data
7
8
def decode(self, frame):
9
if frame.type == 'identifier_field':
10
print(frame.data['identifier'])
11
elif frame.type == 'data_field':
12
print(frame.data['data'])
13
elif frame.type == 'crc_field':
14
print(frame.data['crc'])
Copied!
To write a Python high level analyzer for a specific input analyzer, navigate to the section for that analyzer.
There is one page for each analyzer that is compatible with python HLAs. Each analyzer produces one or more frame types. These frame types have string names and will be in the type member of the frame class.
Each frame type may have data properties. The documentation page will list the data properties for that frame type, along with the data type and a description. These can be accessed from the frame.data dictionary.
Here is an example of you you might handle different frame types from I2C:
1
def decode(self, frame):
2
if frame.type == 'address':
3
if frame.data['read'] == True:
4
print('read from ' + str(frame.data['address']))
5
else
6
print('write to ' + str(frame.data['address']))
7
elif frame.type == 'data':
8
print(frame.data['data'])
9
elif frame.type == 'start':
10
print('I2C start condition')
11
elif frame.type == 'stop':
12
print('I2C stop condition')
Copied!