ifw-sup 5.1.0
 
Loading...
Searching...
No Matches
ifw::sup::subsim::common::ActionsStd Class Reference

#include <actionsStd.hpp>

Inheritance diagram for ifw::sup::subsim::common::ActionsStd:

Public Member Functions

 ActionsStd (boost::asio::io_service &ios, mal::Mal &mal, rad::SMAdapter &sm, DataContext &data)
 
void notifyEvent (scxml4cpp::Event *e)
 
void notifyStatus (std::list< scxml4cpp::State * > &status)
 
void GetState (scxml4cpp::Context *c)
 ActionsStd.
 
void GetStatus (scxml4cpp::Context *c)
 
void GetVersion (scxml4cpp::Context *c)
 
void CmdStatus (scxml4cpp::Context *c)
 
void CmdConfig (scxml4cpp::Context *c)
 
void Stop (scxml4cpp::Context *c)
 
void Init (scxml4cpp::Context *c)
 
void Enable (scxml4cpp::Context *c)
 
void Disable (scxml4cpp::Context *c)
 
void Reset (scxml4cpp::Context *c)
 
void Config (scxml4cpp::Context *c)
 
void GetConfig (scxml4cpp::Context *c)
 
void SetLogLevel (scxml4cpp::Context *c)
 
void GetLogLevel (scxml4cpp::Context *c)
 
void Exit (scxml4cpp::Context *c)
 
void ExitNoReply (scxml4cpp::Context *c)
 
void SignalUsr1 (scxml4cpp::Context *c)
 
void OpenLoop (scxml4cpp::Context *c)
 
void ClosedLoop (scxml4cpp::Context *c)
 
 ActionsStd (const ActionsStd &)=delete
 
ActionsStd & operator= (const ActionsStd &)=delete
 Disable copy constructor.
 

Detailed Description

This class contains the implementation of the actions dealing with the following "standard" commands:

  • ReqExit
  • ReqStatus
  • ReqReset
  • ReqStop
  • ReqInit
  • ReqConfig
  • ReqEnable
  • ReqDisable

and the following signals:

  • SIGINT
  • SIGTERM

In addition it implements the:

  • scxml4cpp::StatusListener interface to receive the notification of change of state from the State Machine engine.
  • rad::EventRejectListener interface to receive the notification of rejected event from the State Machine adapter.

Constructor & Destructor Documentation

◆ ActionsStd() [1/2]

ifw::sup::subsim::common::ActionsStd::ActionsStd ( boost::asio::io_service & ios,
mal::Mal & mal,
rad::SMAdapter & sm,
DataContext & data )

Constructor.

Parameters
[in]iosReference to the event loop.
[in]smState machine reference
[in]dataData shared within the application among actions and activities.

◆ ActionsStd() [2/2]

ifw::sup::subsim::common::ActionsStd::ActionsStd ( const ActionsStd & )
delete

Member Function Documentation

◆ ClosedLoop()

void ifw::sup::subsim::common::ActionsStd::ClosedLoop ( scxml4cpp::Context * c)

Implementation of the ClosedLoop action.

◆ CmdConfig()

void ifw::sup::subsim::common::ActionsStd::CmdConfig ( scxml4cpp::Context * c)

Implementation of the CmdConfig action. This action:

  • replies back for the originator of the request with the config of each command requested.
Parameters
[in]cLast event received which should be a CmdConfig event

◆ CmdStatus()

void ifw::sup::subsim::common::ActionsStd::CmdStatus ( scxml4cpp::Context * c)

Implementation of the CmdStatus action. This action:

  • replies back for the originator of the request with the status of each command requested.
Parameters
[in]cLast event received which should be a CmdStatus event

◆ Config()

void ifw::sup::subsim::common::ActionsStd::Config ( scxml4cpp::Context * c)

Implementation of the Config action. This action:

  • reload the application configuration file,
  • re-establish connection to the Runtime-DB,
  • replies back for the originator of the ReqConfig request.
Parameters
[in]cLast event received which should be a Config event (the Config event is triggered by a ReqConfig request).

◆ Disable()

void ifw::sup::subsim::common::ActionsStd::Disable ( scxml4cpp::Context * c)

Implementation of the Disable action. This action:

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

◆ Enable()

void ifw::sup::subsim::common::ActionsStd::Enable ( scxml4cpp::Context * c)

Implementation of the Enable action. This action:

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

◆ Exit()

void ifw::sup::subsim::common::ActionsStd::Exit ( scxml4cpp::Context * c)

Implementation of the Exit action. This action:

  • replies back for the originator of the ReqExit request.
  • stops the event loop.
Parameters
[in]cLast event received which should be an Exit event (the Exit event is triggered by a ReqExit request).

◆ ExitNoReply()

void ifw::sup::subsim::common::ActionsStd::ExitNoReply ( scxml4cpp::Context * c)

Implementation of the ExitNoReply action. This action:

  • stops the event loop.
Parameters
[in]cLast event received which should be an ExitNoReply event (the ExitNoReply event is triggered by a SIGTERM, SIGINT signals).

◆ GetConfig()

void ifw::sup::subsim::common::ActionsStd::GetConfig ( scxml4cpp::Context * c)
Parameters
[in]cLast event received which should be a Config event (the Config event is triggered by a ReqConfig request).

◆ GetLogLevel()

void ifw::sup::subsim::common::ActionsStd::GetLogLevel ( scxml4cpp::Context * c)

Implementation of the GetLogLevel action.

Parameters
[in]cLast event received which should be a GetLogLevel event

◆ GetState()

void ifw::sup::subsim::common::ActionsStd::GetState ( scxml4cpp::Context * c)

ActionsStd.

Returns
The last status notified by the State Machine. Implementation of the State action. This action:
  • replies back for the originator of the request with the current State Machine active state configuration.
Parameters
[in]cLast event received which should be a State event

◆ GetStatus()

void ifw::sup::subsim::common::ActionsStd::GetStatus ( scxml4cpp::Context * c)

◆ GetVersion()

void ifw::sup::subsim::common::ActionsStd::GetVersion ( scxml4cpp::Context * c)

◆ Init()

void ifw::sup::subsim::common::ActionsStd::Init ( scxml4cpp::Context * c)

Implementation of the Init action. This action:

  • re-initialize the application run-time data,
  • replies back for the originator of the ReqInit request.
Parameters
[in]cLast event received which should be a Init event (the Init event is triggered by a ReqInit request).

◆ notifyEvent()

void ifw::sup::subsim::common::ActionsStd::notifyEvent ( scxml4cpp::Event * e)

Implementation of the scxml4cpp::EventListener interface to know when an event has been rejected/ignored/processed. It can be used to implement the event reject policy.

Parameters
[in]eReceived event.

◆ notifyStatus()

void ifw::sup::subsim::common::ActionsStd::notifyStatus ( std::list< scxml4cpp::State * > & status)

Implementation of the scxml4cpp::StatusListener interface to receive the change of state notification.

Parameters
[in]statusCurrent State Machine active states configuration.

◆ OpenLoop()

void ifw::sup::subsim::common::ActionsStd::OpenLoop ( scxml4cpp::Context * c)

Implementation of the OpenLoop action.

◆ operator=()

ActionsStd & ifw::sup::subsim::common::ActionsStd::operator= ( const ActionsStd & )
delete

Disable copy constructor.

◆ Reset()

void ifw::sup::subsim::common::ActionsStd::Reset ( scxml4cpp::Context * c)

Implementation of the Reset action. This action:

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

◆ SetLogLevel()

void ifw::sup::subsim::common::ActionsStd::SetLogLevel ( scxml4cpp::Context * c)

Implementation of the SetLog action. This action:

  • changes the log level,
  • replies back for the originator of the ReqSetLog request.
Parameters
[in]cLast event received which should be a SetLog event (the SetLog event is triggered by a ReqSetLog request).

◆ SignalUsr1()

void ifw::sup::subsim::common::ActionsStd::SignalUsr1 ( scxml4cpp::Context * c)

Implementation of the SignalUsr1 action.

Parameters
[in]cLast event received which should be an ExitNoReply event (the SignalUsr1 event is triggered by a SIGUSR1 signal).

◆ Stop()

void ifw::sup::subsim::common::ActionsStd::Stop ( scxml4cpp::Context * c)

Implementation of the Stop action. This action:

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

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