Samples
The samples folder is present to show various features and scenarios of the Heex SDK and demonstrated some basic and more advanced functionalities.
Monitor
basicSampleMonitor
We have created a basic sample monitors that:
- Create an instance of a monitor
- The call of
awaitReady()
which will set the implementation in a waiting state until it connect to the kernel. - Several section demonstrating how to use the templates functions
updateValue
andupdateValueBySignalName
for the supported types. You can find it under thesamples/cpp
orsamples/python
folder.
advancedSampleMonitor_ConfChangedCallback
The advancedSampleMonitor_ConfChangedCallback
demonstrates how to create a Configurable-by-Value Monitor that overloads the onConfigurationChangedCallback
function in order to access or run specific code during an implementation’s reconfiguration. In our sample, we print our the Value Configurations and the Constant Values whenever there is a reconfiguration (also at initial configuration).
- The sample uses a
Monitor
to overload theonConfigurationChangedCallback
function - The rest of the sample will call update with random boolean value in a loop.
Recorders
basicSampleRecorder
The basicSampleRecorder
demonstrates how to create a Recorder that provides the Label position
and generates an event recording part in the form of a file that contains the timestamp of the event. The file is created for the event and demonstrate how to use some information contained in the event query.
- When run, the recorder gets initialized, connects to Core with
ID
, exposes the Labels and Event Recording Part generation to the Core for identifierID
. It stops only on SIGKILL (Ctrl-C).
advancedSampleRecorders
The advancedSampleRecorders
are samples that are showing off a specific feature.
advancedSampleRecorder_ConfChangedCallback
The advancedSampleRecorder_ConfChangedCallback
demonstrates how to create a Configurable-by-Value Recorder that overloads the onConfigurationChangedCallback
function in order to access or run specific code during an implementation’s reconfiguration. In our sample, we print our the Value Configurations and the Constant Values whenever there is a reconfiguration (also at initial configuration).
The rest of the behavior is very similar to the basicSampleRecorder
Specific Middleware samples
Explore ready-to-use sample code located in the samples folder. Feel free to modify the ID or use the provided code as a starting point for your implementation.
1. ROS2
This project is the example of the recommended SDK usage for a ROS2 package that implements Monitors and Recorders.
It implements logics of monitoring and recording that interface with ROS2 middleware.
2. MCAP
This directory contains several samples demonstrating how to use MCAP file as input or output for your implementation. MCAP files can be directly analyse on the Heex Cloud without the need of downloading the recording.