rad  5.1.0
Public Member Functions | List of all members
rad::ActionsApp Class Reference

#include <actionsApp.hpp>

Inheritance diagram for rad::ActionsApp:
rad::ConfigurableActionGroup rad::ActionGroup

Public Member Functions

 ActionsApp (Application &appl, ConfigurableActionMgr &action_mgr, DataContext &data)
 
virtual ~ActionsApp ()
 
void Initialize () override
 
void Configure (const std::vector< std::string > &keys) override
 
void ExitNoReply (scxml4cpp::Context *c)
 
void Redeploy (scxml4cpp::Context *c)
 
void GetConfig (scxml4cpp::Context *c)
 
void SetConfig (scxml4cpp::Context *c)
 
void LoadConfig (scxml4cpp::Context *c)
 
void SaveConfig (scxml4cpp::Context *c)
 
void TrsHealth (scxml4cpp::Context *c)
 
void GetTrsHealth (scxml4cpp::Context *c)
 
void EnableTrsHealth (const bool enable)
 
void GetStateMachine (scxml4cpp::Context *c)
 
void SaveStateMachine (scxml4cpp::Context *c)
 
 ActionsApp (const ActionsApp &)=delete
 
ActionsAppoperator= (const ActionsApp &)=delete
 Disable copy constructor. More...
 
- Public Member Functions inherited from rad::ConfigurableActionGroup
 ConfigurableActionGroup (const std::string &id)
 
virtual ~ConfigurableActionGroup ()
 
 ConfigurableActionGroup (const ConfigurableActionGroup &)=delete
 
ConfigurableActionGroupoperator= (const ConfigurableActionGroup &)=delete
 Disable copy constructor. More...
 
- Public Member Functions inherited from rad::ActionGroup
 ActionGroup (const std::string &id)
 
virtual ~ActionGroup ()
 
const std::string & GetId () const
 
void SetId (const std::string &id)
 
 ActionGroup (const ActionGroup &)=delete
 
ActionGroupoperator= (const ActionGroup &)=delete
 Disable copy constructor. More...
 

Detailed Description

This class contains the implementation of the actions dealing with:

Constructor & Destructor Documentation

◆ ActionsApp() [1/2]

rad::ActionsApp::ActionsApp ( Application appl,
ConfigurableActionMgr action_mgr,
DataContext data 
)

Constructor.

Parameters
applReference to the Application used to inject internal events.
action_mgrReference to the ActionMgr used to trigger the re-initialize notification to all ActionGroup and Activity objects when processing the Init request.
dataData shared within the application among actions and activities.

◆ ~ActionsApp()

rad::ActionsApp::~ActionsApp ( )
virtual

◆ ActionsApp() [2/2]

rad::ActionsApp::ActionsApp ( const ActionsApp )
delete

Member Function Documentation

◆ Configure()

void rad::ActionsApp::Configure ( const std::vector< std::string > &  keys)
overridevirtual

Method invoked when SetConfig or LoadConfig command is received to re-configure this class attributes.

Parameters
keysModified parameters. Empty vector means all params have changed.

Implements rad::ConfigurableActionGroup.

◆ EnableTrsHealth()

void rad::ActionsApp::EnableTrsHealth ( const bool  enable)

This method allows to enable/disable the periodic TRS Health check.

Parameters
enableTrue to enable the TRS Health checkm false to disable.

◆ ExitNoReply()

void rad::ActionsApp::ExitNoReply ( scxml4cpp::Context c)

Implementation of the ExitNoReply action. This action:

  • stops the event loop forcing the application to quit.
Parameters
[in]cContext containing the last event received by the State Machine.

◆ GetConfig()

void rad::ActionsApp::GetConfig ( scxml4cpp::Context c)

Implementation of the GetConfig action. This action:

  • retrieves the value(s) of the given configuration parameter(s) identified via the key(s).
  • replies back to the originator of the GetConfig request with the retrieved values. If no key is provided, the complete application configuration is returned.
Parameters
[in]cContext containing the last event received by the State Machine.

◆ GetStateMachine()

void rad::ActionsApp::GetStateMachine ( scxml4cpp::Context c)

Implementation of the GetStateMachine action. This action returns the State Machine model in text format.

Parameters
[in]cContext containing the last event received by the State Machine.

◆ GetTrsHealth()

void rad::ActionsApp::GetTrsHealth ( scxml4cpp::Context c)

Implementation of the GetTrsHealth action. This action returns the health of the TRS.

Parameters
[in]cContext containing the last event received by the State Machine.

◆ Initialize()

void rad::ActionsApp::Initialize ( )
overridevirtual

Method invoked when Init command is received to re-initialize this class attributes.

Implements rad::ConfigurableActionGroup.

◆ LoadConfig()

void rad::ActionsApp::LoadConfig ( scxml4cpp::Context c)

Implementation of the LoadConfig action. This action:

  • load the given configuration file
  • updates the OLDB
  • trigger the re-configuration notification to the others ActionGroup and Activities.
  • replies to the originator of the LoadConfig request.
Parameters
[in]cContext containing the last event received by the State Machine.

◆ operator=()

ActionsApp& rad::ActionsApp::operator= ( const ActionsApp )
delete

Disable copy constructor.

◆ Redeploy()

void rad::ActionsApp::Redeploy ( scxml4cpp::Context c)

Implementation of the Redeploy action. This action:

  • query the changes in the deployment
  • updates the config in the OLDB
  • trigger the re-configuration notification to the others ActionGroup and Activities.
Parameters
[in]cContext containing the last event received by the State Machine.

◆ SaveConfig()

void rad::ActionsApp::SaveConfig ( scxml4cpp::Context c)

Implementation of the SaveConfig action. This action saves to file the currently loaded configution parameters.

Parameters
[in]cContext containing the last event received by the State Machine.

◆ SaveStateMachine()

void rad::ActionsApp::SaveStateMachine ( scxml4cpp::Context c)

Implementation of the SaveStateMachine action. This action saves the State Machine model in text format to file.

Parameters
[in]cContext containing the last event received by the State Machine.

◆ SetConfig()

void rad::ActionsApp::SetConfig ( scxml4cpp::Context c)

Implementation of the SetConfig action. This action:

  • writes the value(s) for the given configuration parameter(s)
  • updates the OLDB
  • trigger the re-configuration notification to the others ActionGroup and Activities.
  • replies back to the originator of the SetConfig request.
Parameters
[in]cContext containing the last event received by the State Machine.

◆ TrsHealth()

void rad::ActionsApp::TrsHealth ( scxml4cpp::Context c)

Implementation of the TrsHealth action. This action logs a warning indicating that the Time Reference Signal is not healthy or not available if the TrsBad event is received. Instead, if the TrsOk event is received after a TrsBad, it logs an INFO indicating that TRS is back to normal. TRS health status is also published to the OLDB.

Parameters
[in]cContext containing the last event received by the State Machine.

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