|
ifw-sup
3.0.0-pre3
|
#include <generic.hpp>
Public Member Functions | |
| Generic (const std::string name, Config &config, DataContext &data_ctx) | |
| Subsys abstract class constructor. More... | |
| virtual | ~Generic () |
| Default destructor. More... | |
| virtual bool | IsNotReady () const override |
| Check if subsys is Standby/NotReady. More... | |
| virtual bool | IsReady () const override |
| Check if subsys is Standby/Ready. More... | |
| virtual bool | IsOperational () const override |
| Check if subsys is Operational. More... | |
| virtual void | CheckSubsysFailure () const override |
| Check if subsys is in failure state. More... | |
| virtual bool | IsDisabling () const override |
| Check if subsys is disablig. More... | |
| virtual std::optional< elt::mal::future< void > > | Connect () override |
| virtual elt::mal::future< std::string > | Init () override |
| Executes a Init command. More... | |
| virtual elt::mal::future< std::string > | Enable () override |
| Executes a Enable command. More... | |
| virtual elt::mal::future< std::string > | Disable () override |
| Executes a Disable command. More... | |
| virtual elt::mal::future< std::string > | Stop () override |
| Executes a Stop command. More... | |
| virtual elt::mal::future< std::string > | GetState () override |
| virtual elt::mal::future< std::string > | GetStatus () override |
| virtual elt::mal::future< std::string > | GetVersion () override |
| virtual elt::mal::future< std::string > | Reset () override |
| Executes a Reset command. More... | |
| virtual void | Ignore (rad::AnyEvent const &last_event) override |
| Executes a Ignore. More... | |
| virtual void | StopIgn (rad::AnyEvent const &last_event) override |
| Executes a StopIgn. More... | |
| virtual void | SubsysReset (rad::AnyEvent const &last_event) override |
| Executes a hardware reset command. More... | |
| virtual void | SubsysInit (rad::AnyEvent const &last_event) override |
| Executes a hardware init command. More... | |
| virtual void | SubsysEnable (rad::AnyEvent const &last_event) override |
| Executes a hardware enable command. More... | |
| virtual void | SubsysDisable (rad::AnyEvent const &last_event) override |
| Executes a hardware disable command. More... | |
| virtual void | Setup (const std::any &payload) override |
| Executes a run time configuration. More... | |
| virtual void | Status (const std::string &payload, std::string &buffer) override |
| Get subsystem status. More... | |
| virtual std::string | GetName () const override |
| Get subsystem name. More... | |
| std::string | GetPrefixName () const |
| Get subsystem name for logging purposes. More... | |
| std::string | GetScopeStr () const |
| Get subsystem scope as string. More... | |
| bool | GetAccess () const |
| Get subsystem access flag. More... | |
| void | SetAccess (const bool &access) |
Protected Member Functions | |
| bool | IsMsgForMe (const std::string &id) const |
| Check if received message id is addressed to me. More... | |
| void | UpdateDb (std::vector< std::string > attr_vector) |
| Update subsys database. More... | |
| void | UpdateConfig () override |
| Update subsystem configuration. More... | |
| void | SetIgnore (bool flag) |
| SetIgnore. More... | |
| void | GetPrefix (const std::vector< std::string > prefix_list, std::string &prefix) |
| Get prefix for writing attributes to the DB. More... | |
| bool | CheckNameParam (const std::any &payload) |
| Determine whether paramater is included (subsys name). More... | |
| void | StartSubscription () override |
| Start subscription of subsystem status. More... | |
| void | StopSubscription () |
| Start subscription of subsystem status. More... | |
Protected Attributes | |
| std::string | m_name |
| name of the subsystem More... | |
| Config & | m_config |
| reference to the config object. More... | |
| DataContext & | m_data_ctx |
| reference to the data context object. More... | |
| Dispatcher< stdif::StdCmdsAsync > | m_dispatcher |
| elt::mal::rr::ListenerRegistration | m_connection_listener |
| std::unique_ptr< rad::cii::Subscriber< stdif::Status > > | m_subscriber |
Subsys abstract class. This class represents the basic implementation of a subsys class. Most of the subsys share common properties and behavioural aspects. This class is implementing the common behaviour and defining the basic properties of all subsys classes.
| sup::syssup::common::Generic::Generic | ( | const std::string | name, |
| Config & | config, | ||
| DataContext & | data_ctx | ||
| ) |
Subsys abstract class constructor.
| [in] | name | Subsystem name. |
| [in] | config | Reference to server configuration. |
| [in,out] | data_ctx | Reference to the data context object. |
|
virtual |
Default destructor.
|
protected |
Determine whether paramater is included (subsys name).
| payload | Payload of the command, a vector of strings. |
If the vector is empty, it will return true. If the vector contains the the id of the subsys it will also return true otherwise it will return false.
|
overridevirtual |
Check if subsys is in failure state.
| an | exception if an error ocurrs. |
|
overridevirtual |
|
overridevirtual |
Executes a Disable command.
| an | exception if an error ocurrs. |
|
overridevirtual |
Executes a Enable command.
| an | exception if an error ocurrs. |
| bool sup::syssup::common::Generic::GetAccess | ( | ) | const |
Get subsystem access flag.
|
overridevirtual |
Get subsystem name.
|
protected |
Get prefix for writing attributes to the DB.
| prefix_list | List of intermediate prefix values. |
| prefix | String containing the formatted prefix. |
| std::string sup::syssup::common::Generic::GetPrefixName | ( | ) | const |
Get subsystem name for logging purposes.
| std::string sup::syssup::common::Generic::GetScopeStr | ( | ) | const |
Get subsystem scope as string.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Executes a Ignore.
| [in] | last_event | contains the payload of the Ignore message. |
| an | exception if an error ocurrs. |
|
overridevirtual |
Executes a Init command.
| an | exception if an error ocurrs. |
|
overridevirtual |
Check if subsys is disablig.
|
protected |
Check if received message id is addressed to me.
| [in] | id | message id |
|
overridevirtual |
Check if subsys is Standby/NotReady.
|
overridevirtual |
Check if subsys is Operational.
|
overridevirtual |
Check if subsys is Standby/Ready.
|
overridevirtual |
Executes a Reset command.
| an | exception if an error ocurrs. |
| void sup::syssup::common::Generic::SetAccess | ( | const bool & | access | ) |
|
protected |
SetIgnore.
| flag |
|
overridevirtual |
Executes a run time configuration.
| [in] | payload | contains the payload of the setup message. |
| an | exception if an error ocurrs. |
|
overrideprotected |
Start subscription of subsystem status.
|
overridevirtual |
Get subsystem status.
| [in,out] | buffer | Reference to the buffer object. |
|
overridevirtual |
Executes a Stop command.
| an | exception if an error ocurrs. |
|
overridevirtual |
Executes a StopIgn.
| [in] | last_event | contains the payload of the StopIgn message. |
| an | exception if an error ocurrs. |
|
protected |
Start subscription of subsystem status.
|
overridevirtual |
Executes a hardware disable command.
| [in] | last_event | payload of the hw disable message |
| an | exception if an error ocurrs. |
|
overridevirtual |
Executes a hardware enable command.
| [in] | last_event | payload of the hw enable message |
| an | exception if an error ocurrs. |
|
overridevirtual |
Executes a hardware init command.
| [in] | last_event | payload of the hw init message |
| an | exception if an error ocurrs. |
|
overridevirtual |
Executes a hardware reset command.
| [in] | last_event | payload of the hw reset message |
| an | exception if an error ocurrs. |
|
overrideprotected |
Update subsystem configuration.
|
protected |
Update subsys database.
| attr_vector | List of attributes with their values. |
|
protected |
reference to the config object.
|
protected |
|
protected |
reference to the data context object.
|
protected |
|
protected |
name of the subsystem
|
protected |