13#ifndef RTCTK_RTCSUPERVISOR_RTCOBJECT_HPP
14#define RTCTK_RTCSUPERVISOR_RTCOBJECT_HPP
24#include <fmt/format.h>
99 virtual std::string
WaitAsync(std::optional<unsigned> timeout) = 0;
119 std::string
WaitAsync(std::optional<unsigned> timeout)
override;
124 log4cplus::Logger& m_logger;
129 const std::string& m_name;
132 std::shared_ptr<stdif::StdCmdsAsync> m_stdif_async;
133 std::shared_ptr<rtctkif::UpdateCmdsAsync> m_ucif_async;
134 std::shared_ptr<rtctkif::AlertCmdsAsync> m_acif_async;
135 std::shared_ptr<rtctkif::RecoverCmdsAsync> m_rcif_async;
138 elt::mal::future<std::string> m_reply_future;
152struct fmt::formatter<
rtctk::rtcSupervisor::RtcCommand> : formatter<string_view> {
153 template <
typename FormatContext>
155 string_view name =
"unknown";
179 name =
"GET_VERSION";
185 name =
"CLEAR_ALERTS";
191 return formatter<string_view>::format(name, ctx);
Interface class for RtcObject.
Definition rtcObject.hpp:75
virtual std::string WaitAsync(std::optional< unsigned > timeout)=0
Weits for a previously started command request to conclude.
virtual ~RtcObjectIf()=default
virtual void RunAsync(RtcCommand cmd)=0
Starts an async command request.
virtual RtcObjectInfo GetInfo() const =0
Get basic object information.
RtcObjectInfo GetInfo() const override
Get basic object information.
Definition rtcObject.cpp:117
void RunAsync(RtcCommand cmd) override
Starts an async command request.
Definition rtcObject.cpp:121
~RtcObject() override=default
RtcObject(const RtcObjectInfo &obj_info)
Constructor for default RtcObject.
Definition rtcObject.cpp:59
std::string WaitAsync(std::optional< unsigned > timeout) override
Weits for a previously started command request to conclude.
Definition rtcObject.cpp:179
Logging Support Library based on log4cplus.
Definition alertAggregator.cpp:19
RtcCommand
List of commands that can be issued by the RtcSupervisor.
Definition rtcObject.hpp:55
@ UPDATE
Definition rtcObject.hpp:64
@ GET_VERSION
Definition rtcObject.hpp:63
@ STOP
Definition rtcObject.hpp:56
@ GET_STATE
Definition rtcObject.hpp:62
@ EXIT
Definition rtcObject.hpp:61
@ ENABLE
Definition rtcObject.hpp:59
@ RESET
Definition rtcObject.hpp:58
@ RECOVER
Definition rtcObject.hpp:66
@ CLEAR_ALERTS
Definition rtcObject.hpp:65
@ INIT
Definition rtcObject.hpp:57
@ DISABLE
Definition rtcObject.hpp:60
Definition commandReplier.cpp:22
Basic information necessary to construct an RtcObject.
Definition rtcObject.hpp:34
std::string ps_uri
publish/subscribe uri
Definition rtcObject.hpp:44
std::string rr_uri
request/response uri
Definition rtcObject.hpp:41
std::string name
component name
Definition rtcObject.hpp:38