8 #ifndef OCM_SERVER_DAQ_STATE_MACHINE_HPP
9 #define OCM_SERVER_DAQ_STATE_MACHINE_HPP
15 #include <rad/anyEvent.hpp>
16 #include <rad/actionMgr.hpp>
17 #include <scxml4cpp/Action.h>
18 #include <scxml4cpp/Activity.h>
19 #include <scxml4cpp/Context.h>
20 #include <scxml4cpp/EventQueue.h>
21 #include <scxml4cpp/Executor.h>
22 #include <scxml4cpp/StateMachine.h>
25 class Context :
public scxml4cpp::Context {
27 explicit Context(std::string daq_id);
50 std::string
const& model_file,
51 std::list<scxml4cpp::Action*>& actions,
52 std::list<scxml4cpp::Activity*>& activities);
66 scxml4cpp::EventQueue m_event_queue;
67 scxml4cpp::StateMachine m_model;
68 scxml4cpp::Executor m_executor;
89 std::function<StateMachine(std::string)>
91 std::string
const& model_file,
92 std::list<scxml4cpp::Action*>& actions,
93 std::list<scxml4cpp::Activity*>& activities);
96 #endif // #ifndef OCM_SERVER_DAQ_STATE_MACHINE_HPP
Context m_context
Definition: stateMachine.hpp:79
Definition: stateMachine.hpp:76
StateMachine(Context &ctx, std::string const &model_file, std::list< scxml4cpp::Action * > &actions, std::list< scxml4cpp::Activity * > &activities)
Definition: stateMachine.cpp:19
Definition: stateMachine.hpp:42
std::string m_daq_id
Definition: stateMachine.hpp:31
rad::ActionMgr m_action_mgr
Definition: stateMachine.hpp:78
StateMachine & operator=(StateMachine const &)=delete
Definition: stateMachine.hpp:25
StateMachine m_sm
Definition: stateMachine.hpp:80
void ProcessEvent(rad::AnyEvent const &ev)
std::function< StateMachine(std::string)> MakeStateMachineFactory(Context &ctx, std::string const &model_file, std::list< scxml4cpp::Action * > &actions, std::list< scxml4cpp::Activity * > &activities)
Context(std::string daq_id)
Definition: stateMachine.cpp:16
~StateMachine()
Definition: stateMachine.cpp:37