TReK C++  5.3.3
Telemetry/Command API
TReK C++

The C++ APIs in TReK provide the base telemetry and command functionality. All other telemetry and command APIs use the C++ to get values and send data. The Data API provides parameter and packet functions that are used extensively in the Command and Telemetry APIs.

  • All Error Codes - Complete list of error codes returned in TReK.
  • Command C++ API - Provides generalized interface to command destinations for sending commands and receiving responses.
  • Data API - Provides packet and parameter functions to build and extract data, get and set values, etc.
  • Telemetry C++ API - Provides ability to retreive packets and process the contents of the packets.

Supported Compliers and Development Environments
TReK code was created with the following compiler versions. If you wish to use a different compiler version, you should use the provided memory creation and deletion functions for any C++ classes in the APIs.

Operating System Compiler Version
RHEL 8.x g++ 8.5.0
Windows 10 Visual Studio 2012
Windows 10 Visual Studio 2015
Windows 10 Visual Studio 2017

The appropriate libraries are provided for different compilers as required. If your compiler is not supported, you should use the provided functions or methods to perform any memory creation or deletion with the API.

Windows examples are delivered in the lastest Visual Studio version when they were first added. They can be updated to newer versions of Visual Studio as required. Please make sure that you get the .lib and .dll files that match the version of Visual Studio you are using.

Environment Variables
The TReK installation will create environment variables that can be useful for your project files. The table below list each environment variable and notes if it is provided on each operating system and what the value is set to for the operating system.

Variable Windows 10 RHEL 8.x
TREK_INCLUDE Provides a path for all header files needed to integrate the TReK APIs Provides a path for all header files needed to integrate the TReK APIs
TREK_LIB Path to the .lib files for integration into C/C++ programs. This is always the 64-bit version of the libraries Path to the .so files in the TReK install.
TREK_LIB32 Path to the 32-bit version of .lib files for integration into C/C++ programs. Not available
TREK_LIB64 Path to the 64-bit version of .lib files for integration into C/C++ programs. Not available
TREK_DLL32 Path to the 32-bit version of .dll files for integration into C/C++ programs. Not available
TREK_DLL64 Path to the 64-bit version of .dll files for integration into C/C++ programs. Not available

Library Dependencies
TReK libraries have additional dependencies that are provided as part of the installation. You will need to make sure you have those libraries available for your executable. You can use the environment variables above to find the path for the libraries.

Each of the API help main pages will list the additional libraries that are needed for running.

Error Codes
The error codes described for each library function or method do not include lower level library errors. If you get an error code you cannot find in the documentation for the function, use the search feature of help to find the error code (e.g., 32043).

Examples
Examples are provided for each API and can be found in the example directory in the TReK install.
The examples contain both source and header files. Each example also includes both a Visual Studio solution and Linux makefile for compiling under your preferred operating system.