12#ifndef RTCTK_RTCSUPERVISOR_RTCOBJECT_HPP
13#define RTCTK_RTCSUPERVISOR_RTCOBJECT_HPP
23#include <fmt/format.h>
98 virtual std::string
WaitAsync(std::optional<unsigned> timeout) = 0;
118 std::string
WaitAsync(std::optional<unsigned> timeout)
override;
123 log4cplus::Logger& m_logger;
128 const std::string& m_name;
131 std::shared_ptr<stdif::StdCmdsAsync> m_stdif_async;
132 std::shared_ptr<rtctkif::UpdateCmdsAsync> m_ucif_async;
133 std::shared_ptr<rtctkif::AlertCmdsAsync> m_acif_async;
134 std::shared_ptr<rtctkif::RecoverCmdsAsync> m_rcif_async;
137 elt::mal::future<std::string> m_reply_future;
151struct fmt::formatter<
rtctk::rtcSupervisor::RtcCommand> : formatter<string_view> {
152 template <
typename FormatContext>
154 string_view name =
"unknown";
178 name =
"GET_VERSION";
184 name =
"CLEAR_ALERTS";
190 return formatter<string_view>::format(name, ctx);
Interface class for RtcObject.
Definition rtcObject.hpp:74
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:116
void RunAsync(RtcCommand cmd) override
Starts an async command request.
Definition rtcObject.cpp:120
~RtcObject() override=default
RtcObject(const RtcObjectInfo &obj_info)
Constructor for default RtcObject.
Definition rtcObject.cpp:58
std::string WaitAsync(std::optional< unsigned > timeout) override
Weits for a previously started command request to conclude.
Definition rtcObject.cpp:178
RtcCommand
List of commands that can be issued by the RtcSupervisor.
Definition rtcObject.hpp:54
@ UPDATE
Definition rtcObject.hpp:63
@ GET_VERSION
Definition rtcObject.hpp:62
@ STOP
Definition rtcObject.hpp:55
@ GET_STATE
Definition rtcObject.hpp:61
@ EXIT
Definition rtcObject.hpp:60
@ ENABLE
Definition rtcObject.hpp:58
@ RESET
Definition rtcObject.hpp:57
@ RECOVER
Definition rtcObject.hpp:65
@ CLEAR_ALERTS
Definition rtcObject.hpp:64
@ INIT
Definition rtcObject.hpp:56
@ DISABLE
Definition rtcObject.hpp:59
Logging Support Library based on log4cplus.
Definition alertAggregator.cpp:18
Definition commandReplier.cpp:21
Basic information necessary to construct an RtcObject.
Definition rtcObject.hpp:33
std::string ps_uri
publish/subscribe uri
Definition rtcObject.hpp:43
std::string rr_uri
request/response uri
Definition rtcObject.hpp:40
std::string name
component name
Definition rtcObject.hpp:37