RTC Toolkit 4.0.2
Loading...
Searching...
No Matches
Telemetry Subscriber

Telemetry Subscriber must be instantiated using a user defined topic type that will be used as element type in the IPCQ shared memory queue and thus used by both the telSub writer and all readers.

To simplify component realization telSub provides a templated entrypoint rtctk::telSub::Main that is meant to be delegated from RtcComponentMain.

Below is an example component instantiation using the IPCQ type UserTopicType=rtctk::exampleTopic::ScaoLoopTopic with an empty placeholder blender (see also examples_exampleTelSub_app). Although a lambda is used for the blender implementation it can also be implemented as e.g. a free function.

using UserTopicType = rtctk::exampleTopic::ScaoLoopTopic;
auto blender = [](const rtctk::telSub::DataSamplesView& dds_samples,
UserTopicType& shm_sample) noexcept -> std::error_code {
// shm_sample should be populated from dds_samples
// ...
return {}; // Success
};
rtctk::telSub::Main<UserTopicType>(args, std::move(blender));
}
Class used to parse default command line arguments.
Definition: rtcComponentArgs.hpp:34
Entry-point for Telemetry Subscriber.
void RtcComponentMain(rtctk::componentFramework::Args const &args)
Main entry point for user code, this method must be implemented by component developers.
Definition: main.cpp:25
Definition: topics.hpp:29
A set of correlated agnostic non-owning data samples references.
Definition: dataSampleView.hpp:49