ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
actionsRecover.hpp
Go to the documentation of this file.
1 
8 #ifndef FCF_DEVMGR_COMMON_ACTIONS_RECOVER_HPP_
9 #define FCF_DEVMGR_COMMON_ACTIONS_RECOVER_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 ActionsRecover : public rad::ActionGroup
30  {
31  public:
40  ActionsRecover(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  ActionsRecover(const ActionsRecover&) = delete;
90  ActionsRecover& operator= (const ActionsRecover&) = 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_recover_req;
98  };
99  } // namespace common
100  } // namespace devmgr
101 }
102 
103 #endif // FCF_DEVMGR_COMMON_ACTIONS_RECOVER_HPP_
void Stop(rad::AnyEvent const &last_event)
Definition: actionsRecover.cpp:48
void Done(rad::AnyEvent const &last_event)
Definition: actionsRecover.cpp:64
ActionsRecover(boost::asio::io_service &ios, rad::SMAdapter &sm, DataContext &data_ctx, DeviceFacade &device_facade)
Definition: actionsRecover.cpp:22
Definition: deviceFacade.hpp:39
ActionsRecover & operator=(const ActionsRecover &)=delete
Disable assignment operator.
void Timeout(rad::AnyEvent const &last_event)
Definition: actionsRecover.cpp:88
Definition: actionsRecover.hpp:29
Definition: dataContext.hpp:81
void Error(rad::AnyEvent const &last_event)
Definition: actionsRecover.cpp:72
void Start(rad::AnyEvent const &last_event)
Definition: actionsRecover.cpp:34