|
ifw-sup
3.0.0-pre3
|
#include <subsys.hpp>
Public Types | |
| using | UpdateHandler = boost::signals2::signal< void()> |
Public Member Functions | |
| Subsys (Key) | |
| Subsys abstract class constructor. More... | |
| virtual | ~Subsys () |
| Default destructor. More... | |
| virtual bool | IsNotReady () const |
| Check if subsys is Standby/NotReady. More... | |
| virtual bool | IsReady () const |
| Check if subsys is Standby/Ready. More... | |
| virtual bool | IsOperational () const |
| Check if subsys is Operational. More... | |
| virtual void | CheckSubsysFailure () const |
| Check if subsys is in failure state. More... | |
| virtual bool | IsDisabling () const |
| Check if subsys is disablig. More... | |
| virtual void | Ignore (rad::AnyEvent const &last_event) |
| Executes a Ignore. More... | |
| virtual void | StopIgn (rad::AnyEvent const &last_event) |
| Executes a StopIgn. More... | |
| virtual void | SubsysReset (rad::AnyEvent const &last_event) |
| Executes a hardware reset command. More... | |
| virtual void | SubsysInit (rad::AnyEvent const &last_event) |
| Executes a hardware init command. More... | |
| virtual void | SubsysEnable (rad::AnyEvent const &last_event) |
| Executes a hardware enable command. More... | |
| virtual void | SubsysDisable (rad::AnyEvent const &last_event) |
| Executes a hardware disable command. More... | |
| void | Subscribe (UpdateHandler::slot_type handler) |
| Implements a notification for updates in the subsystem status. More... | |
| void | SetDataState (const std::string state) |
| Set actual subsystem state. More... | |
| std::string | GetDataStateStr () const |
| Get actual state as string. More... | |
| State::StateEnum | GetDataState () const |
| Get actual state as a enumeration. More... | |
| void | SetDataSubstate (const std::string subtate) |
| Set actual subsystem substate. More... | |
| std::string | GetDataSubstateStr () const |
| Get actual subtate as string. More... | |
| State::SubstateEnum | GetDataSubstate () const |
| Get actual subtate as a enumeration. More... | |
| void | SetDataConnection (const SubsysData::ConnectionEnum connection) |
| Set actual connection state. More... | |
| std::string | GetDataConnectionStr () const |
| Get actual connection as string. More... | |
| SubsysData::ConnectionEnum | GetDataConnection () const |
| Get actual connection as enumeration. More... | |
Public Member Functions inherited from sup::syssup::common::ISubsys | |
| virtual std::optional< elt::mal::future< void > > | Connect ()=0 |
| virtual void | StartSubscription ()=0 |
| virtual elt::mal::future< std::string > | Init ()=0 |
| Executes a Init command. More... | |
| virtual elt::mal::future< std::string > | Enable ()=0 |
| Executes a Enable command. More... | |
| virtual elt::mal::future< std::string > | Disable ()=0 |
| Executes a Disable command. More... | |
| virtual elt::mal::future< std::string > | Stop ()=0 |
| Executes a Stop command. More... | |
| virtual elt::mal::future< std::string > | GetState ()=0 |
| virtual elt::mal::future< std::string > | GetStatus ()=0 |
| virtual elt::mal::future< std::string > | GetVersion ()=0 |
| virtual elt::mal::future< std::string > | Reset ()=0 |
| Executes a Reset command. More... | |
| virtual void | Status (const std::string &payload, std::string &buffer)=0 |
| Obtain the status of the subsys. More... | |
| virtual void | Setup (const std::any &payload)=0 |
| Executes a run time configuration. More... | |
| virtual void | UpdateConfig ()=0 |
| Update subsystem configuration. More... | |
| virtual std::string | GetName () const =0 |
| Get subsys name. More... | |
Protected Member Functions | |
| void | UpdateDb (std::vector< std::string > attr_vector) |
| Update subsys database. 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... | |
Protected Attributes | |
| UpdateHandler | m_signal |
| notification signal. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from sup::syssup::common::Factory< Subsys, const std::string, Config &, DataContext & > | |
| static std::unique_ptr< Subsys > | Create (const std::string &s, T &&... args) |
| create subsystem object instance More... | |
Public Attributes inherited from sup::syssup::common::Factory< Subsys, const std::string, Config &, DataContext & > | |
| friend | Base |
Subsystem base class. This class represents the basic implementation of a subsystem class. Most of the subsystems share common properties and behavioural aspects. This class is implementing the common behaviour and defining the basic properties of all subsystems classes.
| using sup::syssup::common::Subsys::UpdateHandler = boost::signals2::signal<void()> |
| sup::syssup::common::Subsys::Subsys | ( | Key | ) |
Subsys abstract class constructor.
|
virtual |
Default destructor.
|
virtual |
Check if subsys is in failure state.
| an | exception if an error ocurrs. |
Implements sup::syssup::common::ISubsys.
| SubsysData::ConnectionEnum sup::syssup::common::Subsys::GetDataConnection | ( | ) | const |
Get actual connection as enumeration.
| std::string sup::syssup::common::Subsys::GetDataConnectionStr | ( | ) | const |
Get actual connection as string.
| State::StateEnum sup::syssup::common::Subsys::GetDataState | ( | ) | const |
Get actual state as a enumeration.
| std::string sup::syssup::common::Subsys::GetDataStateStr | ( | ) | const |
Get actual state as string.
| State::SubstateEnum sup::syssup::common::Subsys::GetDataSubstate | ( | ) | const |
Get actual subtate as a enumeration.
| std::string sup::syssup::common::Subsys::GetDataSubstateStr | ( | ) | const |
Get actual subtate as string.
|
protected |
Get prefix for writing attributes to the DB.
| prefix_list | List of intermediate prefix values. |
| prefix | String containing the formatted prefix. |
|
virtual |
Executes a Ignore.
| [in] | last_event | contains the payload of the Ignore message. |
| an | exception if an error ocurrs. |
Implements sup::syssup::common::ISubsys.
|
virtual |
Check if subsys is disablig.
Implements sup::syssup::common::ISubsys.
|
virtual |
Check if subsys is Standby/NotReady.
Implements sup::syssup::common::ISubsys.
|
virtual |
Check if subsys is Operational.
Implements sup::syssup::common::ISubsys.
|
virtual |
Check if subsys is Standby/Ready.
Implements sup::syssup::common::ISubsys.
| void sup::syssup::common::Subsys::SetDataConnection | ( | const SubsysData::ConnectionEnum | connection | ) |
Set actual connection state.
| connection |
| void sup::syssup::common::Subsys::SetDataState | ( | const std::string | state | ) |
Set actual subsystem state.
| state | state as string |
| void sup::syssup::common::Subsys::SetDataSubstate | ( | const std::string | subtate | ) |
Set actual subsystem substate.
| subtate | subtate as string |
|
protected |
SetIgnore.
| flag |
|
virtual |
Executes a StopIgn.
| [in] | last_event | contains the payload of the StopIgn message. |
| an | exception if an error ocurrs. |
Implements sup::syssup::common::ISubsys.
| void sup::syssup::common::Subsys::Subscribe | ( | UpdateHandler::slot_type | handler | ) |
Implements a notification for updates in the subsystem status.
| handler | method/function to called by the update. |
|
virtual |
Executes a hardware disable command.
| [in] | last_event | payload of the hw disable message |
| an | exception if an error ocurrs. |
Implements sup::syssup::common::ISubsys.
|
virtual |
Executes a hardware enable command.
| [in] | last_event | payload of the hw enable message |
| an | exception if an error ocurrs. |
Implements sup::syssup::common::ISubsys.
|
virtual |
Executes a hardware init command.
| [in] | last_event | payload of the hw init message |
| an | exception if an error ocurrs. |
Implements sup::syssup::common::ISubsys.
|
virtual |
Executes a hardware reset command.
| [in] | last_event | payload of the hw reset message |
| an | exception if an error ocurrs. |
Implements sup::syssup::common::ISubsys.
|
protected |
Update subsys database.
| attr_vector | List of attributes with their values. |
|
protected |
notification signal.