RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
businessLogic.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_TELEMETRYRECORDER_BUSINESSLOGIC_HPP
14#define RTCTK_TELEMETRYRECORDER_BUSINESSLOGIC_HPP
15
22
24
25using namespace rtctk::componentFramework;
26
28
35public:
37 BusinessLogic(const std::string& name, ServiceContainer& services, RecUnitFactoryType factory);
38 virtual ~BusinessLogic() = default;
39
40 // activities
41 void ActivityStarting(StopToken st) override;
42 void ActivityInitialising(StopToken st) override;
43 void ActivityGoingRunning(StopToken st) override;
44 void ActivityGoingIdle(StopToken st) override;
45 void ActivityRunning(StopToken st) override;
46 void ActivityRecovering(StopToken st) override;
47 void ActivityUpdating(StopToken st, const JsonPayload& args) override;
48
49private:
50 log4cplus::Logger& m_logger;
51 std::string m_name;
52 ServiceContainer& m_services;
53 OldbIf& m_oldb;
54 ComponentMetricsIf& m_metrics;
55 RecUnitFactoryType m_rec_unit_factory;
56 RecUnitListType m_rec_units;
57
58 std::string m_session_id;
59 std::filesystem::path m_fs_path;
60
61 DataPointPath m_dpp_session_id;
62 DataPointPath m_dpp_session_files;
63 DataPointPath m_dpp_session_files_size;
64 DataPointPath m_dpp_session_total_size;
65 DataPointPath m_dpp_session_space_info_cap;
66 DataPointPath m_dpp_session_space_info_free;
67 DataPointPath m_dpp_session_space_info_avail;
68};
69
70} // namespace rtctk::telemetryRecorder
71
72#endif // RTCTK_TELEMETRYRECORDER_BUSINESSLOGIC_HPP
Component metrics interface.
Definition componentMetricsIf.hpp:85
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:74
Base interface for all OLDB adapters.
Definition oldbIf.hpp:25
Container class that holds services of any type.
Definition serviceContainer.hpp:39
Business Logic implementation for a Telemetry Recorder instance.
Definition businessLogic.hpp:34
void ActivityGoingIdle(StopToken st) override
Definition businessLogic.cpp:141
void ActivityUpdating(StopToken st, const JsonPayload &args) override
Definition businessLogic.cpp:188
BusinessLogic(const std::string &name, ServiceContainer &services, RecUnitFactoryType factory)
Definition businessLogic.cpp:38
void ActivityInitialising(StopToken st) override
Definition businessLogic.cpp:62
void ActivityRecovering(StopToken st) override
Definition businessLogic.cpp:172
void ActivityRunning(StopToken st) override
Definition businessLogic.cpp:120
void ActivityStarting(StopToken st) override
Definition businessLogic.cpp:58
void ActivityGoingRunning(StopToken st) override
Definition businessLogic.cpp:89
Header file for ComponentMetricsIf.
Logging Support Library based on log4cplus.
Definition commandReplier.cpp:22
std::list< std::unique_ptr< RecordingUnit > > RecUnitListType
Definition recordingUnit.hpp:34
rad::StopToken StopToken
Definition stopToken.hpp:20
nlohmann::json JsonPayload
Type requirements:
Definition jsonPayload.hpp:25
std::function< RecUnitListType(const std::string &, ServiceContainer &)> RecUnitFactoryType
Definition recordingUnit.hpp:35
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Definition businessLogic.cpp:36
Runnable< RtcComponent > LifeCycle
Definition businessLogic.hpp:27
Header file for OldbIf, which defines the API for OldbAdapters.
Abstract base class defining functionality common to all recording units.
Lifecycle of a basic 'RtcComponent'.
Lifecycle Extension that makes an RTC Component 'Runnable'.
Life cycle extension to make RtcComponent Runnable.
Definition runnable.hpp:31