Go to the documentation of this file.
12 #ifndef RTCTK_COMPONENTFRAMEWORK_MALDDSEVENTSERVICE_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_MALDDSEVENTSERVICE_HPP
15 #include "Rtctkif.hpp"
19 #include <mal/Cii.hpp>
20 #include <mal/Mal.hpp>
21 #include <mal/utility/LoadMal.hpp>
42 std::unique_ptr<EventPublisherIf>
MakePublisher(std::string
const& topic)
override;
47 std::unique_ptr<EventSubscriberIf>
MakeSubscriber(std::string
const& topic)
override;
50 elt::mal::Mal::Properties GetMalProperties();
53 elt::mal::Mal::Properties
const m_props;
54 std::shared_ptr<elt::mal::Mal> m_mal;
55 elt::mal::CiiFactory& m_factory;
75 std::string
const& topic,
76 elt::mal::Mal::Properties
const& props);
78 std::unique_ptr<elt::mal::ps::Publisher<rtctkif::GenericEvent>> m_publisher;
102 inline static const std::string
QOS_FILE =
"config/rtctk/dds/eventServiceDdsQos.xml";
105 std::string
const& topic,
106 elt::mal::Mal::Properties
const& props);
108 std::unique_ptr<elt::mal::ps::Subscriber<rtctkif::GenericEvent>> m_subscriber;
109 std::unique_ptr<elt::mal::ps::Subscription> m_subscription;
115 #endif // RTCTK_COMPONENTFRAMEWORK_MALDDSEVENTSERVICE_HPP
Implementation of event subscriber.
Definition: malDdsEventService.hpp:87
friend MalDdsEventService
Definition: malDdsEventService.hpp:90
friend MalDdsEventService
Definition: malDdsEventService.hpp:66
Implementation of low-level event service using CII MAL DDS as middleware.
Definition: malDdsEventService.hpp:34
Definition: commandReplier.cpp:20
MalDdsEventService()
Definition: malDdsEventService.cpp:30
Interface class for publishing JSON events.
Definition: eventServiceIf.hpp:48
void Unsubscribe() override
Unsubscribes from the topic.
Definition: malDdsEventService.cpp:126
Interface class for subscribing to JSON events.
Definition: eventServiceIf.hpp:63
Defines the JSON payload type JsonPayload.
void Subscribe(std::function< void(JsonPayload const &)> cb) override
Subscribes to the topic.
Definition: malDdsEventService.cpp:111
std::unique_ptr< EventSubscriberIf > MakeSubscriber(std::string const &topic) override
Factory method to create a new subscriber object.
Definition: malDdsEventService.cpp:71
Interface class for providing pub/sub facilities for JSON events.
Definition: eventServiceIf.hpp:26
void Publish(JsonPayload const &sample) override
Publishes a new data sample.
Definition: malDdsEventService.cpp:86
std::unique_ptr< EventPublisherIf > MakePublisher(std::string const &topic) override
Factory method to create a new publisher object.
Definition: malDdsEventService.cpp:66
Low-level interface of the event service.
Implementation of event publisher.
Definition: malDdsEventService.hpp:63
static const std::string QOS_FILE
Definition: malDdsEventService.hpp:102
nlohmann::json JsonPayload
Type requirements:
Definition: jsonPayload.hpp:24