Go to the documentation of this file.
11 #ifndef RTCKT_TELSUB_DDSSUBSCRIBER_HPP
12 #define RTCKT_TELSUB_DDSSUBSCRIBER_HPP
32 using Alloc = std::pmr::polymorphic_allocator<std::byte>;
40 std::error_code
Take(
std::chrono::nanoseconds timeout) noexcept override;
57 struct ReaderContext {
58 ReaderContext() : m_topic_name(
""), m_reader(
nullptr), m_topic(
nullptr){};
63 std::string m_topic_name;
69 rtctk::AgnosticTopicDataReader* m_reader;
80 DomainParticipantFactory* m_factory;
81 DomainParticipant* m_participant;
82 Subscriber* m_subscriber;
83 std::unique_ptr<DdsReaderListener> m_listener;
84 std::vector<ReaderContext> m_readers;
85 std::map<Condition*, std::vector<ReaderContext>::iterator> m_reader_context_lut;
86 std::unique_ptr<WaitSet> m_waitset;
91 #endif // RTCKT_TELSUB_DDSSUBSCRIBER_HPP
std::error_code ReturnLoan(std::uint8_t idx, DdsSampleSeq &samples, DdsInfoSeq &infos) noexcept override
Returns loaned sample sequence.
Definition: ddsSubscriber.cpp:571
Implements DDS communication using RTI DDS.
Definition: ddsSubscriber.hpp:30
Base class abstracting DDS communication code.
Definition: ddsSubscriberIf.hpp:50
Loaner interface.
Definition: agnosticDataSamples.hpp:36
SampleInfoSeq DdsInfoSeq
Definition: agnosticDataSamples.hpp:29
const std::string & GetTopicName(size_t index) const noexcept override
Returns a string containing the name of a configured topic.
Definition: ddsSubscriber.cpp:586
std::error_code Take(std::chrono::nanoseconds timeout) noexcept override
Takes new samples from DDS readers and updates data structure accessable from GetSamples()
Definition: ddsSubscriber.cpp:519
std::pmr::polymorphic_allocator< std::byte > Alloc
Definition: ddsSubscriber.hpp:32
rtctk::AgnosticTopicSeq DdsSampleSeq
Definition: agnosticDataSamples.hpp:27
DdsSubscriber(const DdsParams ¶ms, Alloc const &alloc={})
Constructs a DDS subscriber from given configuration parameters.
Definition: ddsSubscriber.cpp:52
Parameter set to be passed to classes deriving from DdsSubscriberIf.
Definition: ddsSubscriberIf.hpp:36
Definition: mudpiProcessingError.hpp:119
Declares DdsSubscriberIf.
size_t GetNumberOfTopics() const noexcept override
Returns the number of configured topics.
Definition: ddsSubscriber.cpp:582
Declares common DDS class.
AgnosticDataSamples & GetSamples() noexcept override
Returns reference to data structure holding taken data samples.
Definition: ddsSubscriber.cpp:102
Container of DDS samples and associated sample information.
Definition: agnosticDataSamples.hpp:71
virtual ~DdsSubscriber() noexcept
Destroys the DDS subscriber and releases all RTI DDS resources.
Definition: ddsSubscriber.cpp:77