Binho Customer Support
  • Customer Support Portal
  • User Guide
    • Binho Nova
    • Binho Supernova
    • Hardware Comparison Table
    • Safety Notice
    • Compliance & Legal
    • System Requirements
    • Updating Firmware
    • Protocols and Interfaces
      • I3C Common Command Codes
      • Bridge 1.1 API
        • Bridge 1.1 API - Basic I3C Commands
        • Bridge 1.1 API - I3C Common Command Codes
        • Bridge 1.1 API - I2C Commands
        • Bridge 1.1 API - SPI Commands
        • Bridge 1.1 API - UART Commands
        • Bridge 1.1 API - GPIO Commands
  • Getting Started
    • Hardware Setup
      • Binho Nova
      • Binho Supernova
    • Binho Mission Control
      • Overview
      • Download & Installation
      • Interactive Tour
        • App Layout
        • Protocol Activation
        • Command Panel
        • Transaction Log View
      • Updating Binho Mission Control Software
      • Simulators
      • Communication Protocols
        • SPI
        • UART
        • I2C
        • I3C
        • 1-WIRE
        • GPIO
      • Settings
    • Python SDKs
      • SupernovaController
      • Nova SDK
    • C++ SDK
      • Installation
      • Environment Setup
      • Building the C++ SDK Library
      • Building a Project Using the SDK
      • Example Applications
      • Using the Library
    • Software Releases
  • Examples
    • SupernovaController
    • Other Examples
  • Troubleshooting
    • Solving USB Connection Issues on Linux
  • FAQ
    • What is a host adapter?
    • What protocols are supported?
    • Can multiple devices be used at the same time?
    • Where can I find the product datasheet?
    • Is there a GUI available?
    • Is the ADC calibrated?
    • Is the DAC calibrated?
  • Returns & Warranty
    • 90-Day Return Policy
    • 2-Year Warranty
  • Dropping Legacy Terminology
  • Contact Us
  • Orders & Shipping
    • Place an Order
    • Requesting a Quotation
    • Placing a Purchase Order
    • Shipping Policy
    • International Shipping
    • Tax Exemption
    • Discounts
    • Distributors
Powered by GitBook
On this page
  • General Overview
  • 1. Include Necessary Headers
  • 2. Define Response Handler
  • 3. Initialize the Dispatcher
  • 4. Start the Dispatcher
  • 5. Invoke Commands
  • 6. Wait for All Commands to Finish (Recommended)
  • 7. Stop the Dispatcher
  1. Getting Started
  2. C++ SDK

Using the Library

PreviousExample ApplicationsNextSoftware Releases

Last updated 1 year ago

General Overview

Using the Binho Mission Control C++ SDK library typically involves a series of steps to communicate with a target connected to the host adapter, execute commands and handle responses. Command requests and responses follow the Bridge API v1, which can be found at .

Bellow is a high-level overview based on the provided example applications:

1. Include Necessary Headers

Include the necessary headers to access library's functionality:

#include "CommandDispatcher.h"
#include <iostream>

2. Define Response Handler

Define a function to handle responses from the commands sent to the target adapter. This function is responsible for displaying relevant information about the command's execution.

void printCommandResponse(const CommandResponse& cr, const std::string& action);

3. Initialize the Dispatcher

Create an instance of CommandDispatcher and specify the name of the target host adapter:

CommandDispatcher dispatcher("BinhoNova");   // For connecting with the Binho Nova host adapter
CommandDispatcher dispatcher("BinhoSupernova");   // For connecting with the Binho Supernova host adapter

Note: The argument passed to the CommandDispatcher initializer is the name of the target host adapter.

4. Start the Dispatcher

Before sending any commands, start the dispatcher:

dispatcher.start();

5. Invoke Commands

With the dispatcher running, invoke commands as needed:

  • Synchronous Commands (waits for the command to finish before moving on):

dispatcher.invokeCommandSync("transaction_id", "command_name", command_params, response_handler);
  • Asynchronous Commands (doesn't wait for the command to finish):

dispatcher.invokeCommand("transaction_id", "command_name", command_params);

6. Wait for All Commands to Finish (Recommended)

To ensure all issued commands are finished before proceeding:

dispatcher.waitForAllCommands();

7. Stop the Dispatcher

Once all tasks are completed, stop the dispatcher:

dispatcher.stop();
Bridge API v1 Documentation