ifw-sup  2.1.0-pre1
iSubsys.hpp
Go to the documentation of this file.
1 
9 #ifndef SUP_SYSSUP_COMMON_ISUBSYS_HPP
10 #define SUP_SYSSUP_COMMON_ISUBSYS_HPP
11 
12 #include <any>
13 
14 #include "sup/syssup/common/events.rad.hpp"
15 #include <rad/getPayload.hpp>
16 
17 
18 namespace sup {
19  namespace syssup {
20  namespace common {
21 
22 
23 
24  class ISubsysConfig;
32  class ISubsys {
33 
34  public:
35 
41  virtual bool IsNotReady() const = 0;
47  virtual bool IsReady() const = 0;
48 
54  virtual bool IsOperational() const = 0;
55 
61  virtual void CheckSubsysFailure() const = 0;
62 
68  virtual bool IsDisabling() const = 0;
69 
70  virtual std::optional<elt::mal::future<void>> Connect() = 0;
71 
72  virtual void StartSubscription() = 0;
78  virtual elt::mal::future<std::string> Init() = 0;
79 
85  virtual elt::mal::future<std::string> Enable() = 0;
86 
92  virtual elt::mal::future<std::string> Disable() = 0;
93 
99  virtual elt::mal::future<std::string> Stop() = 0;
100 
101  virtual elt::mal::future<std::string> GetState() = 0;
102 
103  virtual elt::mal::future<std::string> GetStatus() = 0;
104 
105  virtual elt::mal::future<std::string> GetVersion() = 0;
111  virtual elt::mal::future<std::string> Reset() = 0;
112 
113 
118  virtual void Status(const std::string& payload, std::string& buffer) = 0;
119 
120 
128  virtual void Ignore(rad::AnyEvent const& last_event) = 0;
129 
137  virtual void StopIgn(rad::AnyEvent const& last_event) = 0;
138 
146  virtual void SubsysReset(rad::AnyEvent const& last_event) = 0;
147 
155  virtual void SubsysInit(rad::AnyEvent const& last_event) = 0;
156 
164  virtual void SubsysEnable(rad::AnyEvent const& last_event) = 0;
165 
173  virtual void SubsysDisable(rad::AnyEvent const& last_event) = 0;
174 
175 
183  virtual void Setup(const std::any& payload) = 0;
184 
189  virtual void UpdateConfig() = 0;
194  virtual std::string GetName() const = 0;
195  };
196 
197  }
198  }
199 }
200 
201 
202 #endif //SUP_SYSSUP_COMMON_ISUBSYS_HPP
sup::syssup::common::ISubsys::IsReady
virtual bool IsReady() const =0
Check if subsys is Standby/Ready.
sup::syssup::common::ISubsys::SubsysReset
virtual void SubsysReset(rad::AnyEvent const &last_event)=0
Executes a hardware reset command.
sup::syssup::common::ISubsys::Disable
virtual elt::mal::future< std::string > Disable()=0
Executes a Disable command.
sup::syssup::common::ISubsys::GetName
virtual std::string GetName() const =0
Get subsys name.
sup::syssup::common::ISubsys::GetState
virtual elt::mal::future< std::string > GetState()=0
sup::syssup::common::ISubsys::SubsysInit
virtual void SubsysInit(rad::AnyEvent const &last_event)=0
Executes a hardware init command.
sup::syssup::common::ISubsys::StartSubscription
virtual void StartSubscription()=0
sup::syssup::common::ISubsys::IsDisabling
virtual bool IsDisabling() const =0
Check if subsys is disablig.
sup::syssup::common::ISubsys::Ignore
virtual void Ignore(rad::AnyEvent const &last_event)=0
Executes a Ignore.
sup::syssup::common::ISubsys::IsNotReady
virtual bool IsNotReady() const =0
Check if subsys is Standby/NotReady.
sup::syssup::common::ISubsys::SubsysEnable
virtual void SubsysEnable(rad::AnyEvent const &last_event)=0
Executes a hardware enable command.
sup::syssup::common::ISubsys::GetStatus
virtual elt::mal::future< std::string > GetStatus()=0
sup::syssup::common::ISubsys::Setup
virtual void Setup(const std::any &payload)=0
Executes a run time configuration.
sup::syssup::common::ISubsys::Stop
virtual elt::mal::future< std::string > Stop()=0
Executes a Stop command.
sup::syssup::common::ISubsys::CheckSubsysFailure
virtual void CheckSubsysFailure() const =0
Check if subsys is in failure state.
sup::syssup::common::ISubsys
Definition: iSubsys.hpp:32
sup::syssup::common::ISubsys::UpdateConfig
virtual void UpdateConfig()=0
Update subsystem configuration.
sup::syssup::common::ISubsys::Connect
virtual std::optional< elt::mal::future< void > > Connect()=0
sup::syssup::common::ISubsys::GetVersion
virtual elt::mal::future< std::string > GetVersion()=0
sup
Definition: actionMgr.cpp:32
sup::syssup::common::ISubsys::IsOperational
virtual bool IsOperational() const =0
Check if subsys is Operational.
sup::syssup::common::ISubsys::SubsysDisable
virtual void SubsysDisable(rad::AnyEvent const &last_event)=0
Executes a hardware disable command.
sup::syssup::common::ISubsys::Reset
virtual elt::mal::future< std::string > Reset()=0
Executes a Reset command.
sup::syssup::common::ISubsys::StopIgn
virtual void StopIgn(rad::AnyEvent const &last_event)=0
Executes a StopIgn.
sup::syssup::common::ISubsys::Init
virtual elt::mal::future< std::string > Init()=0
Executes a Init command.
sup::syssup::common::ISubsys::Status
virtual void Status(const std::string &payload, std::string &buffer)=0
Obtain the status of the subsys.
sup::syssup::common::ISubsys::Enable
virtual elt::mal::future< std::string > Enable()=0
Executes a Enable command.