TReK C++
5.3.3
Telemetry/Command API
|
The Telemetry C++ API provides the full capabilities of the Telemetry API as a single C++ class to integrate commanding functionality into user developed applications. The Telemetry C++ API is thread-safe. This API also uses the trek::Packet and trek::Parameter classes available in the Data API.
Telemetry Terminology
The descriptions below of the functionality available in the Telemetry APIs use some terminology that requires explanation.
Telemetry C++ API Details
The trek::TelemetryApi provides methods to retrieve data from the associated data store. The data retrieved can be processed with the associated trek::Packet class.
Methods to Retrieve Data
Methods for Packet Arrival Notification
General Methods
Examples
The following examples are provided to show how to use Telemetry APIs:
C++ API Newest Data
Uses the C++ Telemetry API class to connect to a data store. This example shows how to get the last packet to arrive. This newest packet is typically used to show the most recent data in user applications such as displays. The code here could be used with a timer to update at the needed frequency.
Source File:
tlm_api_cpp_newest/cpp_newest_main.cpp
C++ API Next Data
Uses the C++ Telemetry API class to connect to a data store. This example shows techniques to use to get all of the data that arrives. This code uses the trek::TelemetryApi::WaitForPacket() function to know when a packet arrives. You can also use a timer to periodically check for data.
Source File:
tlm_api_cpp_next/cpp_next_main.cpp
Additional Dependencies
The TReK Telemetry API (trek_telemetry_api) is also dependent on the following libraries. See the Libraries main help page for more information.
trek_toolkit_common_api
trek_toolkit_data_api
trek_toolkit_utilities_api
xerces-c_3_1