ifw-ocf  2.0.0-dev
 All Classes Namespaces Files Functions Variables Groups
actionsStd.hpp
Go to the documentation of this file.
1 
9 #ifndef SERVER_ACTION_STD_HPP_
10 #define SERVER_ACTION_STD_HPP_
11 
12 #include <rad/actionGroup.hpp>
13 #include <rad/logger.hpp>
14 #include <rad/assert.hpp>
15 #include <rad/signal.hpp>
16 
17 #include <scxml4cpp/StatusListener.h>
18 #include <scxml4cpp/EventListener.h>
19 
20 #include <string>
21 
22 namespace server {
23 
24 class DataContext;
25 
48 class ActionsStd : public rad::ActionGroup,
49  public scxml4cpp::StatusListener,
50  public scxml4cpp::EventListener {
51  public:
59  ActionsStd(boost::asio::io_service& ios, rad::SMAdapter& sm, DataContext& data);
60 
68  void notifyEvent(scxml4cpp::Event* event);
69 
76  void notifyStatus(std::set<scxml4cpp::State*>& status);
77 
86  void Status(const rad::AnyEvent& last_event);
87 
95  void Stop(const rad::AnyEvent& last_event);
96 
105  void Init(const rad::AnyEvent& last_event);
106 
114  void Enable(const rad::AnyEvent& last_event);
115 
123  void Disable(const rad::AnyEvent& last_event);
124 
132  void Reset(const rad::AnyEvent& last_event);
133 
143  void Config(const rad::AnyEvent& last_event);
144 
153  void SetLog(const rad::AnyEvent& last_event);
154 
163  void Exit(const rad::AnyEvent& last_event);
164 
172  void ExitNoReply(const rad::AnyEvent& last_event);
173 
174  ActionsStd(const ActionsStd&) = delete;
175  ActionsStd& operator=(const ActionsStd&) = delete;
176 
177  private:
178  boost::asio::io_service& m_io_service;
179  rad::Signal m_signal;
180  DataContext& m_data;
181  std::string m_status;
182  std::string m_state;
183  std::string m_substate;
184 };
185 
186 } // namespace server
187 
188 #endif // SERVER_ACTION_STD_HPP_
void Config(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:199
void Stop(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:140
ActionsStd & operator=(const ActionsStd &)=delete
Disable copy constructor.
void ExitNoReply(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:124
void notifyStatus(std::set< scxml4cpp::State * > &status)
Definition: actionsStd.cpp:39
Definition: actionsStd.hpp:48
ActionsStd(boost::asio::io_service &ios, rad::SMAdapter &sm, DataContext &data)
Definition: actionsStd.cpp:23
void notifyEvent(scxml4cpp::Event *event)
Definition: actionsStd.cpp:83
Definition: dataContext.hpp:21
void Reset(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:187
void Disable(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:175
void Init(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:151
void SetLog(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:212
void Exit(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:110
void Enable(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:163
void Status(const rad::AnyEvent &last_event)
Definition: actionsStd.cpp:129