RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
businessLogic.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_EXAMPLECOMPONENT_BUSINESSLOGIC_HPP
13#define RTCTK_EXAMPLECOMPONENT_BUSINESSLOGIC_HPP
14
19
21
22using namespace rtctk::componentFramework;
23
25
29class BusinessLogic : public LifeCycle::BizLogicIf {
30public:
32
33 BusinessLogic(const std::string& name, ServiceContainer& services);
34 virtual ~BusinessLogic() = default;
35
36 void ActivityStarting(StopToken st) override;
37 void ActivityInitialising(StopToken st) override;
38 void ActivityEnabling(StopToken st) override;
39 void ActivityDisabling(StopToken st) override;
40
41 void ActivityGoingRunning(StopToken st) override;
42 void ActivityGoingIdle(StopToken st) override;
43 void ActivityRunning(StopToken st) override;
44 void ActivityRecovering(StopToken st) override;
45
46 void ActivityUpdating(StopToken st, const JsonPayload& args) override;
47 bool GuardUpdatingAllowed(const JsonPayload& args) override;
48
49private:
50 log4cplus::Logger& m_logger;
51 std::string m_name;
52 RuntimeRepoIf& m_rtr;
53 OldbIf& m_oldb;
54};
55
56} // namespace rtctk::exampleComponent
57
58#endif // RTCTK_EXAMPLECOMPONENT_EXAMPLEBUSINESSLOGIC_HPP
Base interface for all OLDB adapters.
Definition oldbIf.hpp:24
Base interface for all Runtime Configuration Repository adapters.
Definition runtimeRepoIf.hpp:26
Container class that holds services of any type.
Definition serviceContainer.hpp:38
void ActivityGoingIdle(StopToken st) override
Definition businessLogic.cpp:66
void ActivityUpdating(StopToken st, const JsonPayload &args) override
Definition businessLogic.cpp:81
void ActivityEnabling(StopToken st) override
Definition businessLogic.cpp:54
bool GuardUpdatingAllowed(const JsonPayload &args) override
Definition businessLogic.cpp:86
void ActivityInitialising(StopToken st) override
Definition businessLogic.cpp:37
void ActivityRecovering(StopToken st) override
Definition businessLogic.cpp:77
void ActivityRunning(StopToken st) override
Definition businessLogic.cpp:70
LifeCycle ComponentType
Definition businessLogic.hpp:31
void ActivityDisabling(StopToken st) override
Definition businessLogic.cpp:58
void ActivityStarting(StopToken st) override
Definition businessLogic.cpp:33
BusinessLogic(const std::string &name, ServiceContainer &services)
Definition businessLogic.cpp:23
void ActivityGoingRunning(StopToken st) override
Definition businessLogic.cpp:62
rad::StopToken StopToken
Definition stopToken.hpp:19
nlohmann::json JsonPayload
Type requirements:
Definition jsonPayload.hpp:24
Definition businessLogic.cpp:21
Runnable< RtcComponent > LifeCycle
Definition businessLogic.hpp:24
Header file for OldbIf, which defines the API for OldbAdapters.
Lifecycle of a basic 'RtcComponent'.
Lifecycle Extension that makes an RTC Component 'Runnable'.
Header file for RuntimeRepoIf, which defines the API for RuntimeRepoAdapters.
Life cycle extension to make RtcComponent Runnable.
Definition runnable.hpp:30