RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
businessLogic.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_METADATACOLLECTOR_BUSINESSLOGIC_HPP
14#define RTCTK_METADATACOLLECTOR_BUSINESSLOGIC_HPP
15
21
23
24using namespace rtctk::componentFramework;
25
27
33public:
35
36 BusinessLogic(const std::string& name, ServiceContainer& services, RecUnitFactoryType factory);
37 virtual ~BusinessLogic() = default;
38
39 void ActivityStarting(StopToken st) override;
40 void ActivityInitialising(StopToken st) override;
41 void ActivityPreparing(StopToken st, const std::string& id) override;
42 void ActivityAcquiring(StopToken st) override;
44 void ActivityAborting(StopToken st) override;
45 void ActivityRecovering(StopToken st) override;
46 void ActivityUpdating(StopToken st, const JsonPayload& args) override;
47
48private:
49 log4cplus::Logger& m_logger;
50 std::string m_name;
51 ServiceContainer& m_services;
52 OldbIf& m_oldb;
53 ComponentMetricsIf& m_metrics;
54 RecUnitFactoryType m_rec_unit_factory;
55 RecUnitListType m_rec_units;
56
57 std::string m_session_id;
58 std::filesystem::path m_fs_path;
59
60 DataPointPath m_dpp_session_id;
61 DataPointPath m_dpp_session_files;
62 DataPointPath m_dpp_session_files_size;
63 DataPointPath m_dpp_session_total_size;
64 DataPointPath m_dpp_session_space_info_cap;
65 DataPointPath m_dpp_session_space_info_free;
66 DataPointPath m_dpp_session_space_info_avail;
67};
68
69} // namespace rtctk::metadataCollector
70
71#endif // RTCTK_METADATACOLLECTOR_BUSINESSLOGIC_HPP
Lifecycle Extension that makes an RTC Component an 'Acquisitor'.
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 class for the Metadata Collector.
Definition businessLogic.hpp:32
void ActivityAborting(StopToken st) override
Definition businessLogic.cpp:143
void ActivityUpdating(StopToken st, const JsonPayload &args) override
Definition businessLogic.cpp:175
BusinessLogic(const std::string &name, ServiceContainer &services, RecUnitFactoryType factory)
Definition businessLogic.cpp:34
DaqStopReply ActivityFinalising(StopToken st) override
Definition businessLogic.cpp:118
void ActivityInitialising(StopToken st) override
Definition businessLogic.cpp:58
void ActivityRecovering(StopToken st) override
Definition businessLogic.cpp:160
void ActivityAcquiring(StopToken st) override
Definition businessLogic.cpp:106
void ActivityPreparing(StopToken st, const std::string &id) override
Definition businessLogic.cpp:81
void ActivityStarting(StopToken st) override
Definition businessLogic.cpp:54
Definition acquisitor.hpp:73
Header file for ComponentMetricsIf.
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 acquisitor.cpp:15
Acquisitor< RtcComponent > LifeCycle
Definition businessLogic.hpp:26
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:190