ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
actionsEnable.hpp
Go to the documentation of this file.
1 
8 #ifndef FCF_DEVMGR_COMMON_ACTIONS_ENABLE_HPP_
9 #define FCF_DEVMGR_COMMON_ACTIONS_ENABLE_HPP_
10 
11 // Local headers
12 #include <fcf/devmgr/common/events.rad.hpp>
13 
14 #include <rad/actionGroup.hpp>
15 #include <rad/smAdapter.hpp>
16 #include <rad/mal/request.hpp>
17 
18 #include <scxml4cpp/Context.h>
19 
20 namespace fcf {
21  namespace devmgr {
22  namespace common {
23 
24  class DataContext;
25  class DeviceFacade;
29  class ActionsEnable : public rad::ActionGroup
30  {
31  public:
40  ActionsEnable(boost::asio::io_service& ios,
41  rad::SMAdapter& sm,
42  DataContext& data_ctx,
43  DeviceFacade& device_facade);
44 
51  void Start(rad::AnyEvent const& last_event);
52 
60  void Stop(rad::AnyEvent const& last_event);
61 
69  void Done(rad::AnyEvent const& last_event);
70 
78  void Error(rad::AnyEvent const& last_event);
79 
87  void Timeout(rad::AnyEvent const& last_event);
88 
89  ActionsEnable(const ActionsEnable&) = delete;
90  ActionsEnable& operator= (const ActionsEnable&) = delete;
91 
92  private:
93  boost::asio::io_service& m_io_service;
94  rad::SMAdapter& m_sm;
95  DataContext& m_data_ctx;
96  DeviceFacade& m_device_facade;
97  rad::cii::Request<std::string> m_enable_req;
98  };
99  } // namespace common
100  } // namespace devmgr
101 }
102 
103 #endif // FCF_DEVMGR_COMMON_ACTIONS_ENABLE_HPP_
void Timeout(rad::AnyEvent const &last_event)
Definition: actionsEnable.cpp:87
void Error(rad::AnyEvent const &last_event)
Definition: actionsEnable.cpp:72
void Start(rad::AnyEvent const &last_event)
Definition: actionsEnable.cpp:34
Definition: deviceFacade.hpp:39
ActionsEnable(boost::asio::io_service &ios, rad::SMAdapter &sm, DataContext &data_ctx, DeviceFacade &device_facade)
Definition: actionsEnable.cpp:22
ActionsEnable & operator=(const ActionsEnable &)=delete
Disable assignment operator.
Definition: actionsEnable.hpp:29
Definition: dataContext.hpp:81
void Done(rad::AnyEvent const &last_event)
Definition: actionsEnable.cpp:64
void Stop(rad::AnyEvent const &last_event)
Definition: actionsEnable.cpp:48