Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 49 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,38 @@ name: Build

on:
push:
branches: [master]
branches: [master, main]
tags:
- '*'
pull_request:
branches: [master]
branches: [master, main]

jobs:
windows:
windows-x86_64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B ${{github.workspace}}/build -A x64
cmake --build ${{github.workspace}}/build --config Release
- name: Upload windows build
- name: Upload windows x86_64 build
uses: actions/upload-artifact@v4
with:
name: windows
name: windows_x86_64
path: ${{github.workspace}}/build/Analyzers/Release/*.dll
windows-arm64:
runs-on: windows-11-arm
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B ${{github.workspace}}/build -A ARM64
cmake --build ${{github.workspace}}/build --config Release
- name: Upload windows arm64 build
uses: actions/upload-artifact@v4
with:
name: windows_arm64
path: ${{github.workspace}}/build/Analyzers/Release/*.dll
macos:
runs-on: macos-latest
Expand All @@ -42,24 +55,44 @@ jobs:
with:
name: macos_arm64
path: ${{github.workspace}}/build/arm64/Analyzers/*.so
linux:
linux-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
- name: Pull pre-built builder image
run: docker pull ghcr.io/saleae/analyzer-build-image:linux-x86_64
- name: Build inside container
run: |
docker run --rm \
-v ${{ github.workspace }}:/app \
-w /app \
ghcr.io/saleae/analyzer-build-image:linux-x86_64 \
bash -c 'cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build'
- name: Upload Linux x86_64 build
uses: actions/upload-artifact@v4
with:
name: linux_x86_64
path: ${{github.workspace}}/build/Analyzers/*.so
linux-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Pull pre-built builder image
run: docker pull ghcr.io/saleae/analyzer-build-image:linux-arm64
- name: Build inside container
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
cmake --build ${{github.workspace}}/build
env:
CC: gcc-10
CXX: g++-10
- name: Upload Linux build
docker run --rm \
-v ${{ github.workspace }}:/app \
-w /app \
ghcr.io/saleae/analyzer-build-image:linux-arm64 \
bash -c 'cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build'
- name: Upload Linux arm64 build
uses: actions/upload-artifact@v4
with:
name: linux
name: linux_arm64
path: ${{github.workspace}}/build/Analyzers/*.so
publish:
needs: [windows, macos, linux]
needs: [windows-x86_64, windows-arm64, macos, linux-x86_64, linux-arm64]
runs-on: ubuntu-latest
steps:
- name: download individual builds
Expand All @@ -78,4 +111,4 @@ jobs:
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/analyzer.zip
files: ${{github.workspace}}/analyzer.zip
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ project(SimpleSerialAnalyzer)

add_definitions( -DLOGIC2 )

set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum supported MacOS version" FORCE)

# enable generation of compile_commands.json, helpful for IDEs to locate include files.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
138 changes: 69 additions & 69 deletions docs/Analyzer_API.md
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
# C++ Analyzer API

- [C++ Analyzer API](#c---analyzer-api)
* [Writing your Analyzer’s Code](#writing-your-analyzer-s-code)
- [C++ Analyzer API](#c-analyzer-api)
* [Writing your Analyzer’s Code](#writing-your-analyzers-code)
- [Analyzer Settings](#analyzer-settings)
* [{YourName}AnalyzerSettings.h](#-yourname-analyzersettingsh)
* [{YourName}AnalyzerSettings.h](#yournameanalyzersettingsh)
+ [User-modifiable Analyzer Settings](#user-modifiable-analyzer-settings)
+ [Analyzer Settings Interfaces Objects](#analyzer-settings-interfaces-objects)
* [{YourName}AnalyzerSettings.cpp](#-yourname-analyzersettingscpp)
* [{YourName}AnalyzerSettings.cpp](#yournameanalyzersettingscpp)
+ [The Constructor](#the-constructor)
+ [Setting up each AnalyzerSettingInterface object](#setting-up-each-analyzersettinginterface-object)
- [```AnalyzerSettingInterface``` Object Options](#---analyzersettinginterface----object-options)
* [```AnalyzerSettingInterfaceChannel```](#---analyzersettinginterfacechannel---)
* [```AnalyzerSettingInterfaceNumberList```](#---analyzersettinginterfacenumberlist---)
* [```AnalyzerSettingInterfaceInteger```](#---analyzersettinginterfaceinteger---)
* [```AnalyzerSettingInterfaceText```](#---analyzersettinginterfacetext---)
* [```AnalyzerSettingInterfaceBool```](#---analyzersettinginterfacebool---)
- [```AnalyzerSettingInterface``` Object Options](#analyzersettinginterface-object-options)
* [```AnalyzerSettingInterfaceChannel```](#analyzersettinginterfacechannel)
* [```AnalyzerSettingInterfaceNumberList```](#analyzersettinginterfacenumberlist)
* [```AnalyzerSettingInterfaceInteger```](#analyzersettinginterfaceinteger)
* [```AnalyzerSettingInterfaceText```](#analyzersettinginterfacetext)
* [```AnalyzerSettingInterfaceBool```](#analyzersettinginterfacebool)
+ [Specifying Export Options](#specifying-export-options)
+ [Specifying which channels are in use](#specifying-which-channels-are-in-use)
+ [AnalyzerSettings Destructor](#analyzersettings-destructor)
+ [```{YourName}AnalyzerSettings::SetSettingsFromInterfaces()```](#----yourname-analyzersettings--setsettingsfrominterfaces-----)
+ [```{YourName}AnalyzerSettings::UpdateInterfacesFromSettings()```](#----yourname-analyzersettings--updateinterfacesfromsettings-----)
+ [```{YourName}AnalyzerSettings::LoadSettings()```](#----yourname-analyzersettings--loadsettings-----)
+ [```{YourName}AnalyzerSettings::SaveSettings()```](#----yourname-analyzersettings--savesettings-----)
- [```AnalyzerResults```](#---analyzerresults---)
* [{YourName}AnalyzerResults.h](#-yourname-analyzerresultsh)
* [{YourName}AnalyzerResults.cpp](#-yourname-analyzerresultscpp)
* [Frames, Packets, and Transactions](#frames--packets--and-transactions)
+ [```{YourName}AnalyzerSettings::SetSettingsFromInterfaces()```](#yournameanalyzersettingssetsettingsfrominterfaces)
+ [```{YourName}AnalyzerSettings::UpdateInterfacesFromSettings()```](#yournameanalyzersettingsupdateinterfacesfromsettings)
+ [```{YourName}AnalyzerSettings::LoadSettings()```](#yournameanalyzersettingsloadsettings)
+ [```{YourName}AnalyzerSettings::SaveSettings()```](#yournameanalyzersettingssavesettings)
- [```AnalyzerResults```](#analyzerresults)
* [{YourName}AnalyzerResults.h](#yournameanalyzerresultsh)
* [{YourName}AnalyzerResults.cpp](#yournameanalyzerresultscpp)
* [Frames, Packets, and Transactions](#frames-packets-and-transactions)
+ [Frame](#frame)
- [Frame Member Variables](#frame-member-variables)
+ [```{YourName}AnalyzerResults::GenerateBubbleText()```](#----yourname-analyzerresults--generatebubbletext-----)
+ [```{YourName}AnalyzerResults::GenerateExportFile()```](#----yourname-analyzerresults--generateexportfile-----)
+ [```SerialAnalyzerResults::GenerateFrameTabularText()```](#---serialanalyzerresults--generateframetabulartext-----)
+ [```SerialAnalyzerResults::GeneratePacketTabularText()```](#---serialanalyzerresults--generatepackettabulartext-----)
+ [```SerialAnalyzerResults::GenerateTransactionTabularText()```](#---serialanalyzerresults--generatetransactiontabulartext-----)
+ [```{YourName}AnalyzerResults::GenerateBubbleText()```](#yournameanalyzerresultsgeneratebubbletext)
+ [```{YourName}AnalyzerResults::GenerateExportFile()```](#yournameanalyzerresultsgenerateexportfile)
+ [```{YourName}AnalyzerResults::GenerateFrameTabularText()```](#yournameanalyzerresultsgenerateframetabulartext)
+ [```{YourName}AnalyzerResults::GeneratePacketTabularText()```](#yournameanalyzerresultsgeneratepackettabulartext)
+ [```{YourName}AnalyzerResults::GenerateTransactionTabularText()```](#yournameanalyzerresultsgeneratetransactiontabulartext)
- [Analyzer](#analyzer)
* [{YourName}Analyzer.h](#-yourname-analyzerh)
* [{YourName}Analyzer.cpp](#-yourname-analyzercpp)
* [{YourName}Analyzer.h](#yournameanalyzerh)
* [{YourName}Analyzer.cpp](#yournameanalyzercpp)
* [Constructor](#constructor)
* [Destructor](#destructor)
* [```{YourName}Analyzer::WorkerThread()```](#----yourname-analyzer--workerthread-----)
* [```bool {YourName}Analyzer::NeedsRerun()```](#---bool--yourname-analyzer--needsrerun-----)
* [```Analyzer::GenerateSimulationData()```](#---analyzer--generatesimulationdata-----)
* [```U32 SerialAnalyzer::GetMinimumSampleRateHz()```](#---u32-serialanalyzer--getminimumsampleratehz-----)
* [```{YourName}Analyzer::GetAnalyzerName()```](#----yourname-analyzer--getanalyzername-----)
* [```GetAnalyzerName()```](#---getanalyzername-----)
* [```Analyzer* CreateAnalyzer()```](#---analyzer--createanalyzer-----)
* [```DestroyAnalyzer( Analyzer* analyzer )```](#---destroyanalyzer--analyzer--analyzer-----)
* [```{YourName}Analyzer::WorkerThread()```](#----yourname-analyzer--workerthread------1)
* [```{YourName}Analyzer::WorkerThread()```](#yournameanalyzerworkerthread)
* [```bool {YourName}Analyzer::NeedsRerun()```](#bool-yournameanalyzerneedsrerun)
* [```{YourName}Analyzer::GenerateSimulationData()```](#yournameanalyzergeneratesimulationdata)
* [```U32 {YourName}Analyzer::GetMinimumSampleRateHz()```](#u32-yournameanalyzergetminimumsampleratehz)
* [```{YourName}Analyzer::GetAnalyzerName()```](#yournameanalyzergetanalyzername)
* [```GetAnalyzerName()```](#getanalyzername)
* [```Analyzer* CreateAnalyzer()```](#analyzer-createanalyzer)
* [```DestroyAnalyzer( Analyzer* analyzer )```](#destroyanalyzer-analyzer-analyzer-)
* [```{YourName}Analyzer::WorkerThread()```](#yournameanalyzerworkerthread-1)
- [Traversing the Data](#traversing-the-data)
* [```AnalyzerChannelData```](#---analyzerchanneldata---)
+ [```AnalyzerChannelData ```– State](#---analyzerchanneldata------state)
+ [```AnalyzerChannelData ```– Basic Traversal](#---analyzerchanneldata------basic-traversal)
+ [```AnalyzerChannelData ```– Advanced Traversal (looking ahead without moving)](#---analyzerchanneldata------advanced-traversal--looking-ahead-without-moving-)
+ [```AnalyzerChannelData ```– Keeping track of the smallest pulse.](#---analyzerchanneldata------keeping-track-of-the-smallest-pulse)
* [```AnalyzerChannelData```](#analyzerchanneldata)
+ [```AnalyzerChannelData ```– State](#analyzerchanneldata---state)
+ [```AnalyzerChannelData ```– Basic Traversal](#analyzerchanneldata---basic-traversal)
+ [```AnalyzerChannelData ```– Advanced Traversal (looking ahead without moving)](#analyzerchanneldata---advanced-traversal-looking-ahead-without-moving)
+ [```AnalyzerChannelData ```– Keeping track of the smallest pulse.](#analyzerchanneldata---keeping-track-of-the-smallest-pulse)
* [Filling in Frames](#filling-in-frames)
* [Saving Frames](#saving-frames)
* [Adding Markers](#adding-markers)
* [Packets and Transactions](#packets-and-transactions)
- [Utilities](#utilities)
* [```BitExtractor```](#---bitextractor---)
* [```DataBuilder```](#---databuilder---)
- [```AnalyzerHelpers```](#---analyzerhelpers---)
* [```DisplayBase```](#---displaybase---)
* [```GetNumberString()```](#---getnumberstring-----)
* [```GetTimeString()```](#---gettimestring-----)
- [```SimulationDataGenerator```](#---simulationdatagenerator---)
* [{YourName}SimulationDataGenerator.cpp](#-yourname-simulationdatageneratorcpp)
+ [Constructor/Destructor](#constructor-destructor)
+ [```{YourName}SimulationDataGenerator::Initialize()```](#----yourname-simulationdatagenerator--initialize-----)
- [```BitState```](#---bitstate---)
- [Sample Rate (samples per second)](#sample-rate--samples-per-second-)
* [```BitExtractor```](#bitextractor)
* [```DataBuilder```](#databuilder)
- [```AnalyzerHelpers```](#analyzerhelpers)
* [```DisplayBase```](#displaybase)
* [```GetNumberString()```](#getnumberstring)
* [```GetTimeString()```](#gettimestring)
- [```SimulationDataGenerator```](#simulationdatagenerator)
* [{YourName}SimulationDataGenerator.cpp](#yournamesimulationdatageneratorcpp)
+ [Constructor/Destructor](#constructordestructor)
+ [```{YourName}SimulationDataGenerator::Initialize()```](#yournamesimulationdatageneratorinitialize)
- [```BitState```](#bitstate)
- [Sample Rate (samples per second)](#sample-rate-samples-per-second)
- [Sample Number](#sample-number)
+ [```SimulationChannelDescriptor```](#---simulationchanneldescriptor---)
- [```Advance()```](#---advance-----)
- [```Transition()```](#---transition-----)
- [```TransitionIfNeeded()```](#---transitionifneeded-----)
- [```GetCurrentBitState()```](#---getcurrentbitstate-----)
- [```GetCurrentSampleNumber()```](#---getcurrentsamplenumber-----)
- [```ClockGenerator```](#---clockgenerator---)
- [```Init( double target_frequency, U32 sample_rate_hz );```](#---init--double-target-frequency--u32-sample-rate-hz------)
- [```AdvanceByHalfPeriod( double multiple = 1.0 );```](#---advancebyhalfperiod--double-multiple---10------)
- [```AdvanceByTimeS( double time_s );```](#---advancebytimes--double-time-s------)
+ [```{YourName}SimulationDataGenerator::Initialize()```](#----yourname-simulationdatagenerator--initialize------1)
+ [```{YourName}SimulationDataGenerator::GenerateSimulationData()```](#----yourname-simulationdatagenerator--generatesimulationdata-----)
+ [```SimulationChannelDescriptor```](#simulationchanneldescriptor)
- [```Advance()```](#advance)
- [```Transition()```](#transition)
- [```TransitionIfNeeded()```](#transitionifneeded)
- [```GetCurrentBitState()```](#getcurrentbitstate)
- [```GetCurrentSampleNumber()```](#getcurrentsamplenumber)
- [```ClockGenerator```](#clockgenerator)
- [```Init( double target_frequency, U32 sample_rate_hz );```](#init-double-target_frequency-u32-sample_rate_hz-)
- [```AdvanceByHalfPeriod( double multiple = 1.0 );```](#advancebyhalfperiod-double-multiple--10-)
- [```AdvanceByTimeS( double time_s );```](#advancebytimes-double-time_s-)
+ [```{YourName}SimulationDataGenerator::Initialize()```](#yournamesimulationdatageneratorinitialize-1)
+ [```{YourName}SimulationDataGenerator::GenerateSimulationData()```](#yournamesimulationdatageneratorgeneratesimulationdata)
* [Simulating Multiple Channels](#simulating-multiple-channels)
+ [Examples of generating simulation data](#examples-of-generating-simulation-data)
- [```SerialSimulationDataGenerator::CreateSerialByte()```](#---serialsimulationdatagenerator--createserialbyte-----)
- [```I2cSimulationDataGenerator::CreateBit()```](#---i2csimulationdatagenerator--createbit-----)
- [```I2cSimulationDataGenerator::CreateI2cTransaction()```](#---i2csimulationdatagenerator--createi2ctransaction-----)
- [```SpiSimulationDataGenerator::OutputWord_CPHA1()```](#---spisimulationdatagenerator--outputword-cpha1-----)
- [```SpiSimulationDataGenerator::CreateSpiTransaction()```](#---spisimulationdatagenerator--createspitransaction-----)
- [```SpiSimulationDataGenerator::GenerateSimulationData()```](#---spisimulationdatagenerator--generatesimulationdata-----)
- [```SerialSimulationDataGenerator::CreateSerialByte()```](#serialsimulationdatageneratorcreateserialbyte)
- [```I2cSimulationDataGenerator::CreateBit()```](#i2csimulationdatageneratorcreatebit)
- [```I2cSimulationDataGenerator::CreateI2cTransaction()```](#i2csimulationdatageneratorcreatei2ctransaction)
- [```SpiSimulationDataGenerator::OutputWord_CPHA1()```](#spisimulationdatageneratoroutputword_cpha1)
- [```SpiSimulationDataGenerator::CreateSpiTransaction()```](#spisimulationdatageneratorcreatespitransaction)
- [```SpiSimulationDataGenerator::GenerateSimulationData()```](#spisimulationdatageneratorgeneratesimulationdata)

This is the original documentation for the Saleae C++ Analyzer API. It has not been updated since the original release, and some parts are out of date. Please refer to support, as well as Saleae's other open source protocol analyzers for reference. Changes that need to be reflected in this documentation:

Expand Down
Loading
Loading