ifw-slm 0.1.2
 
Loading...
Searching...
No Matches
actionsLM.hpp
Go to the documentation of this file.
1#ifndef IFWSLM_ACTIONS_LM_HPP
2#define IFWSLM_ACTIONS_LM_HPP
3
4#include <rad/configurableActionGroup.hpp>
5#include <rad/application.hpp>
6#include <scxml4cpp/Context.h>
7
8namespace ifw::slm {
9
10class DataContext;
11
12class ActionsLM : public rad::ConfigurableActionGroup {
13public:
14 ActionsLM(rad::Application& appl, rad::ConfigurableActionMgr& action_mgr, DataContext& data);
15
16 void Initialize() override;
17 void Configure(const std::vector<std::string>& keys) override;
18
19 void CloseLoop(scxml4cpp::Context* c);
20 void OpenLoop(scxml4cpp::Context* c);
21 void ResumeLoop(scxml4cpp::Context* c);
22 void SuspendLoop(scxml4cpp::Context* c);
23 void RunSlm(scxml4cpp::Context* c);
24 void StopSlm(scxml4cpp::Context* c);
25
31 void GetStatus(scxml4cpp::Context* c);
32
33 ActionsLM(const ActionsLM&) = delete;
34 ActionsLM& operator=(const ActionsLM&) = delete;
35
36private:
37 template<typename CmdEvent>
38 void ProcessLoopCommand(scxml4cpp::Context* c,
39 const char* cmd_name,
40 const std::array<std::function<void()>, 9>& post_fns);
41
42 rad::Application& m_appl;
43 rad::ConfigurableActionMgr& m_action_mgr;
44 DataContext& m_data;
45};
46
47} // namespace ifw::slm
48
49#endif // IFWSLM_ACTIONS_LM_HPP
void StopSlm(scxml4cpp::Context *c)
Definition actionsLM.cpp:152
void Initialize() override
Definition actionsLM.cpp:22
ActionsLM(rad::Application &appl, rad::ConfigurableActionMgr &action_mgr, DataContext &data)
Definition actionsLM.cpp:14
ActionsLM & operator=(const ActionsLM &)=delete
void SuspendLoop(scxml4cpp::Context *c)
Definition actionsLM.cpp:115
void RunSlm(scxml4cpp::Context *c)
Definition actionsLM.cpp:129
void ResumeLoop(scxml4cpp::Context *c)
Definition actionsLM.cpp:101
void Configure(const std::vector< std::string > &keys) override
Definition actionsLM.cpp:26
void OpenLoop(scxml4cpp::Context *c)
Definition actionsLM.cpp:87
void GetStatus(scxml4cpp::Context *c)
Definition actionsLM.cpp:181
ActionsLM(const ActionsLM &)=delete
void CloseLoop(scxml4cpp::Context *c)
Definition actionsLM.cpp:73
Definition dataContext.hpp:29
Definition actionMgr.cpp:29