Go to the documentation of this file.
12 #ifndef RTCTK_REUSABLECOMPONENT_TELEMETRYRECORDER_BUSINESSLOGIC_DETAIL_HPP
13 #define RTCTK_REUSABLECOMPONENT_TELEMETRYRECORDER_BUSINESSLOGIC_DETAIL_HPP
26 using namespace std::chrono_literals;
28 using std::this_thread::sleep_for;
35 : m_name(
name), m_services(services) {
37 "template parameter for TelemetryRecorderBusinessLogic needs to be derived from "
52 m_recorder_thread.SetTopic(rtr.GetDataPoint<std::string>(
DataPointPath(
"/" + m_name +
"/static/topic_name")));
53 m_recorder_thread.SetSubSampleFactor(rtr.GetDataPoint<int64_t>(
DataPointPath(
"/" + m_name +
"/dynamic/subsample_factor")));
54 m_recorder_thread.SetTelemetrySubSet(rtr.GetDataPoint<std::string>(
DataPointPath(
"/" + m_name +
"/dynamic/tel_subset")));
55 m_recorder_thread.SetOutputUri(::elt::mal::Uri(rtr.GetDataPoint<std::string>(
DataPointPath(
"/" + m_name +
"/dynamic/output_uri"))));
56 m_recorder_thread.SetStartSampleId(rtr.GetDataPoint<int64_t>(
DataPointPath(
"/" + m_name +
"/static/start_with_sample_id")));
62 m_recorder_thread.Open();
63 m_recorder_thread.Start();
69 m_recorder_thread.Stop();
70 m_recorder_thread.Close();
76 m_recorder_thread.Unpause();
83 m_recorder_thread.Pause();
89 while(not st.StopRequested()) {
104 m_recorder_thread.SetOutputUri(::elt::mal::Uri(rtr.GetDataPoint<std::string>(
DataPointPath(
"/" + m_name +
"/dynamic/output_uri"))));
105 m_recorder_thread.SetSubSampleFactor(rtr.GetDataPoint<int64_t>(
DataPointPath(
"/" + m_name +
"/dynamic/subsample_factor")));
106 m_recorder_thread.SetTelemetrySubSet(rtr.GetDataPoint<std::string>(
DataPointPath(
"/" + m_name +
"/dynamic/tel_subset")));
121 #endif // RTCTK_REUSABLECOMPONENT_TELEMETRYRECORDER_BUSINESSLOGIC_DETAIL_HPP
name
Definition: wscript:15
void ActivityInitialising(rtctk::componentFramework::StopToken st) override
Definition: businessLogicDetail.hpp:49
void ActivityGoingRunning(rtctk::componentFramework::StopToken st) override
Definition: businessLogicDetail.hpp:74
Definition: commandReplier.cpp:20
void ActivityUpdating(rtctk::componentFramework::StopToken st, rtctk::componentFramework::Payload args) override
Definition: businessLogicDetail.hpp:101
Definition: recorderIf.hpp:25
Definition: businessLogic.hpp:26
rad::StopToken StopToken
Definition: stopToken.hpp:19
void ActivityRunning(rtctk::componentFramework::StopToken st) override
Definition: businessLogicDetail.hpp:87
void ActivityGoingIdle(rtctk::componentFramework::StopToken st) override
Definition: businessLogicDetail.hpp:81
std::string Payload
Definition: payload.hpp:19
Container class that holds services of any type.
Definition: serviceContainer.hpp:35
void ActivityDisabling(rtctk::componentFramework::StopToken st) override
Definition: businessLogicDetail.hpp:67
bool GuardUpdatingAllowed(rtctk::componentFramework::Payload args) override
Definition: businessLogicDetail.hpp:113
Definition: businessLogic.hpp:20
Recorder Interface of the Telemetry Recorder.
Definition: runtimeRepoIf.hpp:20
Logging Support Library based on log4cplus.
void ActivityStarting(rtctk::componentFramework::StopToken st) override
Definition: businessLogicDetail.hpp:43
void ActivityEnabling(rtctk::componentFramework::StopToken st) override
Definition: businessLogicDetail.hpp:60
void ActivityRecovering(rtctk::componentFramework::StopToken st) override
Definition: businessLogicDetail.hpp:95
This class provides a wraper for DataPoint paths which ensures that they only contain valid character...
Definition: dataPointPath.hpp:34
Header file for RuntimeRepoIf, which defines the API for RuntimeRepoAdapters.
Business Logic of the Telemetry Recorder.