Migrate Code to the New Analyzer SDK

Migrate Code to the New Analyzer SDK

(from SDK 1.1.14 to Newer Versions)
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 required to be made with the new SDK will include the analyzer's data in the Decoded Protocols (search) results.
Below is a description of the changes required to include an analyzer's data into the search results. The example below is based on Serial Analyzer's source code.
The latest source code to all analyzers can be found below.
Update Steps
1. Inherit from Analyzer2 instead of Analyzer in the .h ex: SerialAnalyzer.h
1
class ANALYZER_EXPORT SerialAnalyzer : public Analyzer2
Copied!
2. Implement the function SetupResults in .cpp ex: SerialAnalyzer.cpp
1
void SerialAnalyzer::SetupResults()
2
{
3
mResults.reset( new SerialAnalyzerResults( this, mSettings.get() ) );
4
SetAnalyzerResults( mResults.get() );
5
mResults->AddChannelBubblesWillAppearOn( mSettings->mInputChannel );
6
}
Copied!
The above code was previously implemented in
1
void SerialAnalyzer::WorkerThread()
Copied!
Remove the three lines of code (now in SetupResults) from WorkerThread.
3. In the .cpp, in the implementation of
1
virtual void GenerateFrameTabularText (U64 frame_index, DisplayBase display_base );
Copied!
Instead of using:
1
AddResultString( <string_name> );
Copied!
Use:
1
AddTabularText( <string_name> );
Copied!
and do not call
1
ClearResultStrings();
Copied!
in this function.
If you are using SDK version >= 1.1.32, call
1
ClearTabularText();
Copied!
at the start of this function. The software will crash without this.
This should update your code to include results in search.
Last modified 3yr ago
Copy link