13#ifndef RTCTK_REUSABLECOMPONENT_DEPLOYMENT_DAEMONIMPL_HPP
14#define RTCTK_REUSABLECOMPONENT_DEPLOYMENT_DAEMONIMPL_HPP
16#include "deploymentDaemonEvents.rad.hpp"
39 std::shared_ptr<elt::mal::rr::RrEntity>
rr_service =
40 std::make_shared<DeploymentCmdsImpl>(
engine);
41 replier.RegisterService<rtctkif::AsyncDeploymentCmds>(
"DeploymentCmds",
rr_service);
45 : m_logger(
cfw::GetLogger(
"rtctk")), m_engine(
engine) {
50 auto ev = std::make_shared<deployment_daemon_events::Deploy>(
deploy_set);
51 auto f =
ev->GetPayload().GetReplyFuture();
56 ::elt::mal::future<std::string>
Undeploy()
override {
58 auto ev = std::make_shared<deployment_daemon_events::Undeploy>();
59 auto f =
ev->GetPayload().GetReplyFuture();
76 auto ev = std::make_shared<deployment_daemon_events::GetDeploymentSets>();
77 auto f =
ev->GetPayload().GetReplyFuture();
84 auto ev = std::make_shared<deployment_daemon_events::GetComponents>();
85 auto f =
ev->GetPayload().GetReplyFuture();
92 auto ev = std::make_shared<deployment_daemon_events::GetActiveComponents>();
93 auto f =
ev->GetPayload().GetReplyFuture();
100 "Received command 'StartComponent' with component_name'" +
component_name);
101 auto ev = std::make_shared<deployment_daemon_events::StartComponent>(
component_name);
102 auto f =
ev->GetPayload().GetReplyFuture();
109 "Received command 'StopComponent' with component_name'" +
component_name);
110 auto ev = std::make_shared<deployment_daemon_events::StopComponent>(
component_name);
111 auto f =
ev->GetPayload().GetReplyFuture();
116 ::elt::mal::future<std::vector<std::string>>
GetServices()
override {
118 auto ev = std::make_shared<deployment_daemon_events::GetServices>();
119 auto f =
ev->GetPayload().GetReplyFuture();
126 auto ev = std::make_shared<deployment_daemon_events::GetActiveServices>();
127 auto f =
ev->GetPayload().GetReplyFuture();
132 ::elt::mal::future<std::string>
GetState()
override {
137 ::elt::mal::future<std::string>
Reset()
override {
142 ::elt::mal::future<std::string>
Exit()
override {
147 ::elt::mal::future<std::string>
150 "Received command 'SetLogLevel' with logger '" +
info->getLogger() +
151 "' and level '" +
info->getLevel() +
"'");
152 auto ev = std::make_shared<deployment_daemon_events::SetLogLevel>(
info->clone());
153 auto f =
ev->GetPayload().GetReplyFuture();
159 log4cplus::Logger& m_logger;
Class that handles reception of commands using MAL.
Definition commandReplier.hpp:30
Definition stateMachineEngine.hpp:35
void PostEvent(rad::SharedEvent s)
Injects a new event into the state machine engine.
Definition stateMachineEngine.cpp:148
Class that handles reception of DeploymentCmds commands.
Definition deploymentDaemonCmdsImpl.hpp:36
::elt::mal::future< std::vector< std::string > > GetServices() override
Definition deploymentDaemonCmdsImpl.hpp:116
::elt::mal::future< std::string > GetState() override
Definition deploymentDaemonCmdsImpl.hpp:132
::elt::mal::future< std::string > GetActiveDeployment() override
Definition deploymentDaemonCmdsImpl.hpp:64
::elt::mal::future< std::vector< std::string > > GetActiveServices() override
Definition deploymentDaemonCmdsImpl.hpp:124
static void Register(cfw::CommandReplier &replier, cfw::StateMachineEngine &engine)
Definition deploymentDaemonCmdsImpl.hpp:38
::elt::mal::future< std::vector< std::string > > GetComponents() override
Definition deploymentDaemonCmdsImpl.hpp:82
::elt::mal::future< std::string > Exit() override
Definition deploymentDaemonCmdsImpl.hpp:142
::elt::mal::future< std::string > StopComponent(const std::string &component_name) override
Definition deploymentDaemonCmdsImpl.hpp:107
::elt::mal::future< std::string > SetLogLevel(const std::shared_ptr< rtctkif::LogInfo > &info) override
Definition deploymentDaemonCmdsImpl.hpp:148
::elt::mal::future< std::string > Reset() override
Definition deploymentDaemonCmdsImpl.hpp:137
::elt::mal::future< std::string > Deploy(const std::string &deploy_set) override
Definition deploymentDaemonCmdsImpl.hpp:48
::elt::mal::future< std::string > Undeploy() override
Definition deploymentDaemonCmdsImpl.hpp:56
::elt::mal::future< std::vector< std::string > > GetDeploymentSets() override
Definition deploymentDaemonCmdsImpl.hpp:74
::elt::mal::future< std::string > StartComponent(const std::string &component_name) override
Definition deploymentDaemonCmdsImpl.hpp:98
::elt::mal::future< std::string > GetDescription() override
Definition deploymentDaemonCmdsImpl.hpp:69
::elt::mal::future< std::vector< std::string > > GetActiveComponents() override
Definition deploymentDaemonCmdsImpl.hpp:90
DeploymentCmdsImpl(cfw::StateMachineEngine &engine)
Definition deploymentDaemonCmdsImpl.hpp:44
Receive commands via MAL.
Logging Support Library based on log4cplus.
Provides core functionality of an RTC Component.
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Definition deploymentDaemonBusinessLogic.cpp:33
Wrapper around the SCXML State Machine Engine.