Go to the documentation of this file.
12 #ifndef RTCTK_EXAMPLECUSTOM_CUSTOMCMDSIMPL_HPP
13 #define RTCTK_EXAMPLECUSTOM_CUSTOMCMDSIMPL_HPP
15 #include "Rtctkexif.hpp"
16 #include "customEvents.rad.hpp"
21 #include <mal/Cii.hpp>
27 namespace cfw = componentFramework;
32 std::shared_ptr<elt::mal::rr::RrEntity> rr_service =
33 std::make_shared<CustomCmdsImpl>(engine);
34 replier.
RegisterService<rtctkexif::AsyncCustomCmds>(
"CustomCmds", rr_service);
40 ::elt::mal::future<std::string>
Foo()
override {
42 return cfw::InjectReqRepEvent<events::Foo>(this->m_engine);
45 ::elt::mal::future<std::string>
Bar(std::string
const& args)
override {
46 LOG4CPLUS_TRACE(
cfw::GetLogger(),
"Received command 'Bar' with payload '" + args +
"'");
47 return cfw::InjectReqRepEvent<events::Bar>(this->m_engine, args);
Receive commands via MAL.
static void Register(cfw::CommandReplier &replier, cfw::StateMachineEngine &engine)
Definition: customCmdsImpl.hpp:31
Wrapper around the SCXML State Machine Engine.
Definition: stateMachineEngine.hpp:31
::elt::mal::future< std::string > Bar(std::string const &args) override
Definition: customCmdsImpl.hpp:45
log4cplus::Logger & GetLogger(const std::string &name="")
Get handle to a specific logger (used with logging macros)
::elt::mal::future< std::string > Foo() override
Definition: customCmdsImpl.hpp:40
Class that handles reception of commands using MAL.
Definition: commandReplier.hpp:26
Definition: businessLogic.cpp:22
Logging Support Library based on log4cplus.
void RegisterService(std::string const &name, std::shared_ptr< elt::mal::rr::RrEntity > &service)
Definition: commandReplier.hpp:33
Provides core functionality of an RTC Component.
Definition: customCmdsImpl.hpp:29
CustomCmdsImpl(cfw::StateMachineEngine &engine)
Definition: customCmdsImpl.hpp:37