13#ifndef RTCTK_COMPONENTFRAMEWORK_MALDDSEVENTSERVICE_HPP
14#define RTCTK_COMPONENTFRAMEWORK_MALDDSEVENTSERVICE_HPP
22#include <mal/utility/LoadMal.hpp>
43 std::unique_ptr<EventPublisherIf>
MakePublisher(std::string
const& topic)
override;
48 std::unique_ptr<EventSubscriberIf>
MakeSubscriber(std::string
const& topic)
override;
51 elt::mal::Mal::Properties GetMalProperties();
54 elt::mal::Mal::Properties
const m_props;
55 std::shared_ptr<elt::mal::Mal> m_mal;
56 elt::mal::CiiFactory& m_factory;
77 std::string
const& topic,
78 elt::mal::Mal::Properties
const& props);
80 std::unique_ptr<elt::mal::ps::Publisher<rtctkif::GenericEvent>> m_publisher;
105 inline static const std::string
QOS_FILE =
"config/rtctk/dds/eventServiceDdsQos.xml";
109 std::string
const& topic,
110 elt::mal::Mal::Properties
const& props);
112 std::unique_ptr<elt::mal::ps::Subscriber<rtctkif::GenericEvent>> m_subscriber;
113 std::unique_ptr<elt::mal::ps::Subscription> m_subscription;
Interface class for publishing JSON events.
Definition: eventServiceIf.hpp:52
Interface class for providing pub/sub facilities for JSON events.
Definition: eventServiceIf.hpp:29
Interface class for subscribing to JSON events.
Definition: eventServiceIf.hpp:68
Implementation of event publisher.
Definition: malDdsEventService.hpp:65
void Publish(JsonPayload const &sample) override
Publishes a new data sample.
Definition: malDdsEventService.cpp:91
friend MalDdsEventService
Definition: malDdsEventService.hpp:68
Implementation of low-level event service using CII MAL DDS as middleware.
Definition: malDdsEventService.hpp:36
MalDdsEventService()
Definition: malDdsEventService.cpp:31
std::unique_ptr< EventPublisherIf > MakePublisher(std::string const &topic) override
Factory method to create a new publisher object.
Definition: malDdsEventService.cpp:71
std::unique_ptr< EventSubscriberIf > MakeSubscriber(std::string const &topic) override
Factory method to create a new subscriber object.
Definition: malDdsEventService.cpp:76
Implementation of event subscriber.
Definition: malDdsEventService.hpp:90
friend MalDdsEventService
Definition: malDdsEventService.hpp:93
void Unsubscribe() override
Unsubscribes from the topic.
Definition: malDdsEventService.cpp:131
void Subscribe(std::function< void(JsonPayload const &)> cb) override
Subscribes to the topic.
Definition: malDdsEventService.cpp:116
static const std::string QOS_FILE
Definition: malDdsEventService.hpp:105
Low-level interface of the event service.
Defines the JSON payload type JsonPayload.
Definition: commandReplier.cpp:22
nlohmann::json JsonPayload
Type requirements:
Definition: jsonPayload.hpp:25