ifw-fcf  5.0.0-pre2
Public Types | Public Member Functions | List of all members
fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE > Class Template Reference

#include <actionsSetup.hpp>

Inheritance diagram for fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >:

Public Types

using SetupRequest = std::optional< typename EVENT_TYPE::payload_t >
 
using ActivityMap = std::map< std::string, std::shared_ptr< scxml4cpp::Activity > >
 
using RequestMap = std::map< std::string, SetupRequest >
 
using ActivityPair = std::pair< std::string, std::shared_ptr< scxml4cpp::Activity > >
 
using RequestPair = std::pair< std::string, SetupRequest >
 

Public Member Functions

 ActionsSetup (std::string name, boost::asio::io_service &ios, rad::SMAdapter &sm, DataContext &data_ctx, DeviceFacade &device_facade)
 
virtual void Start (scxml4cpp::Context *c)
 
virtual void Stop (scxml4cpp::Context *c)
 
virtual void Done (scxml4cpp::Context *c)
 
virtual void Error (scxml4cpp::Context *c)
 
virtual void Timeout (scxml4cpp::Context *c)
 
 ActionsSetup (const ActionsSetup &)=delete
 Disable copy constructor. More...
 
ActionsSetupoperator= (const ActionsSetup &)=delete
 Disable assignment operator. More...
 

Detailed Description

template<typename EVENT_TYPE, typename EXCEPTION_TYPE>
class fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >

Class grouping the actions related to the Setup event.

Member Typedef Documentation

◆ ActivityMap

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
using fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::ActivityMap = std::map<std::string,std::shared_ptr<scxml4cpp::Activity> >

◆ ActivityPair

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
using fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::ActivityPair = std::pair<std::string, std::shared_ptr<scxml4cpp::Activity> >

◆ RequestMap

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
using fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::RequestMap = std::map<std::string, SetupRequest>

◆ RequestPair

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
using fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::RequestPair = std::pair<std::string, SetupRequest>

◆ SetupRequest

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
using fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::SetupRequest = std::optional<typename EVENT_TYPE::payload_t>

Constructor & Destructor Documentation

◆ ActionsSetup() [1/2]

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::ActionsSetup ( std::string  name,
boost::asio::io_service &  ios,
rad::SMAdapter &  sm,
DataContext data_ctx,
DeviceFacade device_facade 
)

Constructor.

Parameters
[in]nameAction group name
[in]iosReference to the event loop.
[in]smState machine reference
[in]data_ctxData shared within the application among actions and activities.
[in]device_facadeFacade to all devices handled by the manager.

◆ ActionsSetup() [2/2]

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::ActionsSetup ( const ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE > &  )
delete

Disable copy constructor.

Member Function Documentation

◆ Done()

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
virtual void fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::Done ( scxml4cpp::Context *  c)
virtual

Implementation of the Done callback. This method implements the actions when the Setup event was finalized.

Parameters
[in]last_eventLast event received.

◆ Error()

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
virtual void fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::Error ( scxml4cpp::Context *  c)
virtual

Implementation of the Error callback. This method implements the actions when the Setup event was finalized with an error.

Parameters
[in]last_eventLast event received.

◆ operator=()

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
ActionsSetup& fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::operator= ( const ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE > &  )
delete

Disable assignment operator.

◆ Start()

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
virtual void fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::Start ( scxml4cpp::Context *  c)
virtual

Implementation of the Start callback.

Parameters
[in]last_eventLast event received which should be a Start event (the Start event is triggered by a ReqSetup request).

◆ Stop()

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
virtual void fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::Stop ( scxml4cpp::Context *  c)
virtual

Implementation of the Stop callback. This callback:

  • replies back for the originator of the ReqStop request.
Parameters
[in]last_eventLast event received which should be a Stop event (the Stop event is triggered by a ReqStop request).

◆ Timeout()

template<typename EVENT_TYPE , typename EXCEPTION_TYPE >
virtual void fcf::devmgr::common::ActionsSetup< EVENT_TYPE, EXCEPTION_TYPE >::Timeout ( scxml4cpp::Context *  c)
virtual

Implementation of the Timeout callback. This method implements the actions when the Setup event was finalized unexpectly.

Parameters
[in]last_eventLast event received.

The documentation for this class was generated from the following file: