Implementations common functions
The monitors and recorders share some methods:isConnected→ Inform on the connection status with the Heex KernelgetUuid→ Return the uuid of the ImplementationgetImplementationVersion→ Return the implementation version of the ImplementationgetSdkVersion→ Return the Sdk version of the Implementation have been compiled withgetTimestampStr→ Get the current time of the system in theiso_extended std::stringformat.isReady→ Return true when implementation is ready to begin it’s work.awaitReady→ Blocks until implementation is ready to begin it’s work. Returns true if the Implementation is ready or false if the connection failed.disableLogToFile→ Permanently disable logging ouput to files.getTriggerInfo(triggerUUID)→ Return the trigger information associate to the given trigger UUID.getAllTriggerInfos()→ Returns a map of all TriggerInfos related to the implementation.getSystemId()→ Returns the current system ID.getSystemLabels()→ Returns a map of all the System level labels.getTriggerLabels()→ Returns a map of all the Trigger level labels.sendMessageToImplementation(messages, destinationImplementationId=""): All implementations can communicate with each other. To send a message, use this method by filling in theconst std::vector<std::string>& messagesas you please, and specify the destination implementation ID. You may leave this last one empty, and if so, it’ll broadcast to all other connected implementations.handleMessageFromOtherImplementation(sourceImplementationId, messages): All implementations can communicate with each other. When a message is received, this callback is called. It is up to you to overload this method and decide what to do with the messages.onConfigurationChangedCallback→ This is a callback method that is called every time a new configuration is sent to the edge. It is executed at the end of the loading of the new config. In order to use this, you’ll have to override avirtual void onConfigurationChangedCallback() overrideand implement any code you’d like to be executed in there. See the advanced ConfChangedCallback samples for more details.
Recorder utility functions
- C++
- Python
These methods need to be called on labels argument.↳ Assigns the ↳ Assigns the
value to the key. Values are defaulted to an empty string.x and y position of a HeexGps structure to the position label.Recorder Query structure
Query for Labels
The query provided in thegenerateRequestedLabels() method is specified by the EventRecordingLabelsQuery structure.
You may extract the following fields from the query element to extract your Labels:
query.eventId→ Event IDquery.triggerId→ Trigger IDquery.timestamp→ requested timestamp following the iso extended format
Query for Event Recording Parts
The query provided in thegenerateRequestedFilePaths() method is specified by the RecorderEventRecordingPartArgs structure.
You may extract the following fields from the query element to generate your Event Recording Parts:
query.eventId→ Event IDquery.triggerId→ Trigger IDquery.timestamp→ requested timestamp following the iso extended formatquery.timestampedEventUuid→ the event ID and timestamp concatenated
Implementation intercommunication
-
Sending messages
All implementations can communicate with each other by calling theirsendMessageToImplementationmethod (both Monitor and Recorders have this). Fill in themessagesinput, a vector of strings, and specify either a specificdestinationImplementationIdto address a specific implementation, or leave that argument empty to broadcast to all other running implementations. -
Receiving messages
A virtual callback method,handleMessageFromOtherImplementation, has been provided. It will be called everytime the implementation receives a message with thesourceImplementationIdas an input, and the vector of stringsmessages:
- C++
- Python
In your SampleMonitor or SampleRecorder class, overload the following method: