RTC Toolkit 4.0.2
Loading...
Searching...
No Matches
deploymentDaemonBusinessLogic.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_REUSABLECOMPONENT_DEPLOYMENT_DAEMON_BUSINESSLOGIC_HPP
14#define RTCTK_REUSABLECOMPONENT_DEPLOYMENT_DAEMON_BUSINESSLOGIC_HPP
15
21
23
25
32public:
34 DeploymentDaemonBusinessLogic(const std::string& name,
35 ServiceContainer& services,
36 const elt::mal::Uri& sde);
37
38 virtual ~DeploymentDaemonBusinessLogic() = default;
39
40 void ActivityDeploying(StopToken st, std::string args) override;
41 void ActivityUndeploying(StopToken st) override;
42
43 std::string ActionGetActiveDeployment() override;
44 std::string ActionGetDescription() override;
45
46 std::vector<std::string> ActionGetDeploymentSets() override;
47
48 std::vector<std::string> ActionGetComponents() override;
49
56 std::vector<std::string> ActionGetActiveComponents() override;
57
58 void ActionStartComponent(std::string component_name) override;
59 void ActionStopComponent(std::string component_name) override;
60
61 void ActivityStarting(cfw::StopToken st) override;
62
63protected:
69 void StartComponent(const std::string& component_name, const DataPointPath& depl_set_path);
70
76 void StopComponent(const std::string& component_name, const bool check_error = true);
77
85 void GetDeploymentSets();
86
87 log4cplus::Logger& m_logger;
88
92 const std::string m_name;
93
99
101
105 std::unique_ptr<rtctk::componentFramework::PersistentRepoIf> m_persistent_repo;
106
111
116 std::vector<std::string> m_deployment_sets;
117
123
128 std::string m_description;
129
134 std::vector<std::string> m_components;
135
140 elt::mal::Uri m_sde;
141};
142
143} // namespace rtctk::deploymentDaemon
144
145#endif // RTCTK_REUSABLECOMPONENT_DEPLOYMENT_DAEMON_BUSINESSLOGIC_HPP
Component metrics interface.
Definition: componentMetricsIf.hpp:184
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:73
Container class that holds services of any type.
Definition: serviceContainer.hpp:39
Class that implements a very basic service discovery mechanism.
Definition: serviceDiscovery.hpp:33
Deployment Daemon business logic.
Definition: deploymentDaemonBusinessLogic.hpp:31
void ActionStartComponent(std::string component_name) override
Definition: deploymentDaemonBusinessLogic.cpp:56
log4cplus::Logger & m_logger
Definition: deploymentDaemonBusinessLogic.hpp:87
void ActionStopComponent(std::string component_name) override
Definition: deploymentDaemonBusinessLogic.cpp:80
std::string ActionGetDescription() override
Definition: deploymentDaemonBusinessLogic.cpp:135
std::vector< std::string > ActionGetComponents() override
Definition: deploymentDaemonBusinessLogic.cpp:110
std::vector< std::string > ActionGetDeploymentSets() override
Definition: deploymentDaemonBusinessLogic.cpp:102
std::vector< std::string > m_deployment_sets
List of deployment sets.
Definition: deploymentDaemonBusinessLogic.hpp:116
void ActivityDeploying(StopToken st, std::string args) override
Definition: deploymentDaemonBusinessLogic.cpp:189
rtctk::componentFramework::ServiceDiscovery & m_service_discovery
Definition: deploymentDaemonBusinessLogic.hpp:100
std::vector< std::string > ActionGetActiveComponents() override
Returns active components from the active deployment set.
Definition: deploymentDaemonBusinessLogic.cpp:115
const std::string m_name
component name
Definition: deploymentDaemonBusinessLogic.hpp:92
std::string m_description
Deployment set description.
Definition: deploymentDaemonBusinessLogic.hpp:128
void StartComponent(const std::string &component_name, const DataPointPath &depl_set_path)
Implements the StartComponent command.
Definition: deploymentDaemonBusinessLogic.cpp:340
rtctk::componentFramework::ServiceContainer & m_services
Reference to container services needed to access run-time repository for configuration,...
Definition: deploymentDaemonBusinessLogic.hpp:98
void ActivityUndeploying(StopToken st) override
Definition: deploymentDaemonBusinessLogic.cpp:139
void ActivityStarting(cfw::StopToken st) override
Definition: deploymentDaemonBusinessLogic.cpp:52
std::string ActionGetActiveDeployment() override
Definition: deploymentDaemonBusinessLogic.cpp:131
std::string m_active_deployment_set
Name of active deployment set.
Definition: deploymentDaemonBusinessLogic.hpp:122
void GetDeploymentSets()
Fetches the available Deployment Sets from the Persistent Configuration Repository and caches the val...
Definition: deploymentDaemonBusinessLogic.cpp:319
elt::mal::Uri m_sde
Service Discovery EndPoint URI.
Definition: deploymentDaemonBusinessLogic.hpp:140
void StopComponent(const std::string &component_name, const bool check_error=true)
Implements the StopComponent command.
Definition: deploymentDaemonBusinessLogic.cpp:464
std::unique_ptr< rtctk::componentFramework::PersistentRepoIf > m_persistent_repo
References to the persistent repository.
Definition: deploymentDaemonBusinessLogic.hpp:105
std::vector< std::string > m_components
List of deployed components.
Definition: deploymentDaemonBusinessLogic.hpp:134
rtctk::componentFramework::ComponentMetricsIf & m_component_metrics
References to component metrics service.
Definition: deploymentDaemonBusinessLogic.hpp:110
Definition: deploymentDaemonLifeCycle.hpp:123
Header file for ComponentMetricsIf.
Lifecycle of the 'Deployment Daemon Component'.
rad::StopToken StopToken
Definition: stopToken.hpp:20
Definition: deploymentDaemonBusinessLogic.cpp:30
DeploymentDaemonLifeCycle LifeCycle
Definition: deploymentDaemonBusinessLogic.hpp:24
Header file for PersistentRepoIf, which defines the API for PersistentRepoAdapter.
A container that can hold any type of service.
Class that implements a very basic service discover mechanism.
Life cycle for DeploymentDaemonComponent.
Definition: deploymentDaemonLifeCycle.hpp:122