Installation and Setup

Overview

The BMC C++ SDK Windows installer sets up the necessary components for the SDK on the system. This includes:

  • The core SDK library (bmc_sdk.dll and bmc_sdk.lib).

  • Example applications to test the SDK.

  • The "bridge" service used by the library.

  • Header files for integration (include directory).

Installation

  1. Download the Installer: Get the Binho Mission Control SDK installer named BinhoMissionControlSDK-x.y.z.exe where x.y.z is the SDK's version.

  2. Run the Installer: Double-click on BinhoMissionControlSDK-x.y.z.exe and follow the on-screen prompts.

  3. Installation Directories: By default, the SDK will be installed into the c:\Program Files (x86)\BinhoMissionControlSDK directory. Inside this directory, you will find:

    • bmc_sdk.dll: The SDK dynamic link library.

    • bmc_sdk.lib: The SDK static library.

    • README.md: Read-me file in markdown format for users.

    • examples: A directory containing example applications.

    • bridge: A directory containing components for the bridge service used by the library.

    • include: A directory containing various header files necessary for SDK integration.

  4. Add to PATH Environment Variable: For the applications to function correctly, the bridge directory must be added to the system's PATH environment variable.

  5. Integration: To integrate the Binho Mission Control SDK into a project:

    • Reference the SDK library using the static or dynamic library files.

    • Include necessary headers from the include directory.

  6. Test the Example Applications: After setting up the PATH, you can run the example applications in the examples directory.

Installation Directory Structure

├── BinhoMissionControlSDK
│   ├── README.md
│   ├── bridge
│   │   ├── bridge [Bridge executable]
│   │   ├── ...
│   ├── examples
│   │   ├── list_devices
│   │   ├── nova_breathing_leds
│   │   ├── sample_app_using_sample_library
│   │   ├── sample_library
│   │   ├── supernova_101
│   │   ├── supernova_i2c
│   │   ├── supernova_i2c_benchmark
│   │   ├── ...
│   ├── include
│   │   ├── bridge_reader.h
│   │   ├── BridgeReader_windows.h
│   │   ├── CommandDispatcher.h
│   │   ├── CommandManager.h
│   │   ├── CommandRequest.h
│   │   ├── CommandResponse.h
│   │   ├── definitions.h
│   ├── bin (Windows)
│   │   ├── bmc_sdk.dll (Windows)
│   ├── lib
│   │   ├── bmc_sdk.lib (Windows)
│   │   ├── libbmc_sdk.dylib (Mac)
│   │   ├── libbmc_sdk.so (Linux)

Development Environment Setup

To develop a C++ application using the BMC C++ SDK, ensure that both the bridge executable and the SDK library are reachable in the system's PATH. Additionally, the library uses the nlohmann_json library, which is a requirement for building applications.

Follow these steps to set up the environment:

  1. Add the directory containing the bridge executable and the directory containing the library to the PATH environment variable before running the application.

Alternatively, prepend the PATH variable to the command execution:

On Mac:

DYLD_LIBRARY_PATH=/path/to/installation_dir/lib PATH=$PATH:/path/to/installation_dir/bridge ./your_app

On Linux:

LD_LIBRARY_PATH=/path/to/installation_dir/lib PATH=$PATH:/path/to/installation_dir/bridge ./your_app

On Windows (using Command Prompt):

set PATH=%PATH%;\path\to\installation_dir\bridge;\path\to\installation_dir\bin
your_app.exe

Or on Windows (using PowerShell):

$env:PATH += ";\path\to\installation_dir\bridge\;\path\to\installation_dir\bin"
.\your_app.exe

Replace /path/to/installation_dir with the actual path to the installation_dir directory. Ensure to use the correct slashes for your operating system (/ for Mac/Linux, \ for Windows).

Example Applications

The provided example applications can serve as a guide for creating a new project using the BMC C++ SDK. The examples are located in the examples directory, and the instructions to build and execute them are similar to those described above.

CMake Example for Building Applications

Below is an example of a CMakeLists.txt file for building a sample application (i3c_cccs) that uses the BMC C++ SDK and nlohmann_json library:

cmake_minimum_required(VERSION 3.5)
project(I3cCCCs)

# Source Files Declaration
set(SOURCES main.cpp)
set(TARGET_NAME i3c_cccs)

# Target Definition, Properties, and Commands
add_executable(${TARGET_NAME} ${SOURCES})
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME sample_app)

# Include needed headers
target_include_directories(${TARGET_NAME} PRIVATE 
    ${CMAKE_SOURCE_DIR}/include
    .
)

# Link against needed libraries
target_link_libraries(${TARGET_NAME} bmc_sdk nlohmann_json::nlohmann_json)

# Installation instructions
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${STAGING_DIR}/examples/${TARGET_NAME})
install(FILES ${SOURCES} DESTINATION ${STAGING_DIR}/examples/${TARGET_NAME})

Last updated