1#ifndef RTCTK_COMPONENTFRAMEWORK_INTROSPECTIONIMPL_HPP
2#define RTCTK_COMPONENTFRAMEWORK_INTROSPECTIONIMPL_HPP
15#include <Introspectionif.hpp>
18#include <rtctk/componentFramework/events.rad.hpp>
27#include <nlohmann/json.hpp>
40 std::shared_ptr<elt::mal::rr::RrEntity>
rr_service =
42 replier.RegisterService<introspectionif::AsyncIntrospection>(
"Introspection",
rr_service);
51 boost::promise<std::string>
promise;
56 ::nlohmann::json
ret_json = ::nlohmann::json::object({});
58 ret_json += ::nlohmann::json::object_t::value_type(
xml.first,
xml.second);
61 }
catch (::nlohmann::json::type_error&
ex) {
63 fmt::format(
"Error while creating JSON reply: \nmessage: {}\nexception id: {}",
68 stdif::ExceptionErr(
msg, 3002);
75 ::elt::mal::future<std::string>
GetTopics(
const std::string& topic) {
77 boost::promise<std::string>
promise;
80 stdif::ExceptionErr(
"NOT IMPLEMENTED", 3001);
86 boost::promise<std::string>
promise;
88 auto new_exception = stdif::ExceptionErr(
"NOT IMPLEMENTED", 3001);
Class that handles reception of commands using MAL.
Definition commandReplier.hpp:30
std::vector< std::pair< std::string, std::string > > GetServiceDescriptions(const std::string &service_name=std::string())
Definition commandReplier.hpp:42
Class that handles reception of introspection commands.
Definition introspectionImpl.hpp:37
static void Register(CommandReplier &replier, StateMachineEngine &engine)
Definition introspectionImpl.hpp:39
::elt::mal::future< std::string > GetOldbPrefix()
Definition introspectionImpl.hpp:84
::elt::mal::future< std::string > GetTopics(const std::string &topic)
Definition introspectionImpl.hpp:75
::elt::mal::future< std::string > GetInterfaces(const std::string &service)
Definition introspectionImpl.hpp:49
IntrospectionImpl(StateMachineEngine &engine, CommandReplier &replier)
Definition introspectionImpl.hpp:45
Definition stateMachineEngine.hpp:35
Receive commands via MAL.
Logging Support Library based on log4cplus.
Provides core functionality of an RTC Component.
Definition commandReplier.cpp:22
log4cplus::Logger & GetLogger(const std::string &name="app")
Get handle to a specific logger.
Definition logger.cpp:193
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Wrapper around the SCXML State Machine Engine.