RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
businessLogic.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_METADATACOLLECTOR_BUSINESSLOGIC_HPP
13#define RTCTK_METADATACOLLECTOR_BUSINESSLOGIC_HPP
14
20
22
23using namespace rtctk::componentFramework;
24
26
31class BusinessLogic : public LifeCycle::BizLogicIf {
32public:
34
35 BusinessLogic(const std::string& name, ServiceContainer& services, RecUnitFactoryType factory);
36 virtual ~BusinessLogic() = default;
37
38 void ActivityStarting(StopToken st) override;
39 void ActivityInitialising(StopToken st) override;
40 void ActivityPreparing(StopToken st, const std::string& id) override;
41 void ActivityAcquiring(StopToken st) override;
43 void ActivityAborting(StopToken st) override;
44 void ActivityRecovering(StopToken st) override;
45 void ActivityUpdating(StopToken st, const JsonPayload& args) override;
46
47private:
48 log4cplus::Logger& m_logger;
49 std::string m_name;
50 ServiceContainer& m_services;
51 OldbIf& m_oldb;
52 ComponentMetricsIf& m_metrics;
53 RecUnitFactoryType m_rec_unit_factory;
54 RecUnitListType m_rec_units;
55
56 std::string m_session_id;
57 std::filesystem::path m_fs_path;
58
59 DataPointPath m_dpp_session_id;
60 DataPointPath m_dpp_session_files;
61 DataPointPath m_dpp_session_files_size;
62 DataPointPath m_dpp_session_total_size;
63 DataPointPath m_dpp_session_space_info_cap;
64 DataPointPath m_dpp_session_space_info_free;
65 DataPointPath m_dpp_session_space_info_avail;
66};
67
68} // namespace rtctk::metadataCollector
69
70#endif // RTCTK_METADATACOLLECTOR_BUSINESSLOGIC_HPP
Lifecycle Extension that makes an RTC Component an 'Acquisitor'.
Component metrics interface.
Definition componentMetricsIf.hpp:163
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:76
Base interface for all OLDB adapters.
Definition oldbIf.hpp:24
Container class that holds services of any type.
Definition serviceContainer.hpp:38
void ActivityAborting(StopToken st) override
Definition businessLogic.cpp:140
void ActivityUpdating(StopToken st, const JsonPayload &args) override
Definition businessLogic.cpp:172
BusinessLogic(const std::string &name, ServiceContainer &services, RecUnitFactoryType factory)
Definition businessLogic.cpp:32
DaqStopReply ActivityFinalising(StopToken st) override
Definition businessLogic.cpp:115
void ActivityInitialising(StopToken st) override
Definition businessLogic.cpp:55
void ActivityRecovering(StopToken st) override
Definition businessLogic.cpp:157
void ActivityAcquiring(StopToken st) override
Definition businessLogic.cpp:103
void ActivityPreparing(StopToken st, const std::string &id) override
Definition businessLogic.cpp:78
void ActivityStarting(StopToken st) override
Definition businessLogic.cpp:51
LifeCycle ComponentType
Definition businessLogic.hpp:33
Definition acquisitor.hpp:72
Header file for ComponentMetricsIf.
std::list< std::unique_ptr< RecordingUnit > > RecUnitListType
Definition recordingUnit.hpp:33
rad::StopToken StopToken
Definition stopToken.hpp:19
nlohmann::json JsonPayload
Type requirements:
Definition jsonPayload.hpp:24
std::function< RecUnitListType(const std::string &, ServiceContainer &)> RecUnitFactoryType
Definition recordingUnit.hpp:34
Definition acquisitor.cpp:14
Acquisitor< RtcComponent > LifeCycle
Definition businessLogic.hpp:25
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'.
Life cycle extension for Acquisitor RtcComponent.
Definition acquisitor.hpp:189