Sign in

Updating older custom analyzer code for the new Analyzer SDK (from SDK 1.1.14 to newer versions)

Follow

Current custom analyzer code should work with the software without any changes to it.
It only has to be built against the new Analyzer library shipped with the new software.

However, code changes are required to be made with the new SDK is to include the analyzer's data in the "Decoded Protocols" ( search ) results.

Below is a description of the changes required to include Analyzer's data into the search results. The example below is based on Serial Analyzer's source code.

The latest source code to all analyzer's can be found here: Protocol Analyzer SDK

Update Steps

1. Inherit from Analyzer2 instead of Analyzer in the .h ex:
SerialAnalyzer.h

class ANALYZER_EXPORT SerialAnalyzer : public Analyzer2

2. Implement the function SetupResults in .cpp ex:
SerialAnalyzer.cpp

void SerialAnalyzer::SetupResults()
{
mResults.reset( new SerialAnalyzerResults( this, mSettings.get() ) );
SetAnalyzerResults( mResults.get() );
mResults->AddChannelBubblesWillAppearOn( mSettings->mInputChannel );
}

The above code was previously implemented in

void SerialAnalyzer::WorkerThread()

Remove the three lines of code ( now in SetupResults ) from WorkerThread

3. In the .cpp , in the implementation of

virtual void GenerateFrameTabularText(U64 frame_index, DisplayBase display_base );

Instead of using:

AddResultString( <string_name> );

Use:

AddTabularText( <string_name> );

and, do not call

ClearResultStrings(); 

in this function

If you are using SDK version >= 1.1.32, call

ClearTabularText();

at the start of this function, the software will crash without this.

This should update your code to include results in search. Please do write in to Saleae Support if you have more questions regarding this.


trello ID: 57215d441534ac4f7a578013
Have more questions? Submit a request

Comments

Powered by Zendesk