RTC Toolkit  1.0.0
ddsSubscriberIf.hpp
Go to the documentation of this file.
1 
11 #ifndef RTCTK_TELSUB_DDSSUBSCRIBERIF_HPP
12 #define RTCTK_TELSUB_DDSSUBSCRIBERIF_HPP
13 #include <rtctk/config.hpp>
14 
15 #include <chrono>
16 #include <cstdint>
17 #include <functional>
18 #include <string>
19 #include <system_error>
20 #include <vector>
21 
24 
25 namespace rtctk::telSub {
26 
36 struct DdsParams {
38  std::string m_qos_library = {};
39  std::string m_qos_profile = {};
40  std::vector<std::string> m_topics = {};
41  std::vector<std::string> m_interface_white_list ={};
42  std::vector<std::string> m_multicast_addresses = {};
43 };
44 
51 public:
54 
63 
98  virtual std::error_code Take(std::chrono::nanoseconds timeout) RTCTK_NOEXCEPT = 0;
99 
109  virtual size_t GetNumberOfTopics() const RTCTK_NOEXCEPT = 0;
110 
124  virtual const std::string& GetTopicName(size_t index) const RTCTK_NOEXCEPT = 0;
125 };
126 
127 } // namespace rtctk::telSub
128 #endif // RTCTK_TELSUB_DDSSUBSCRIBERIF_HPP
rtctk::telSub::DdsParams::m_multicast_addresses
std::vector< std::string > m_multicast_addresses
Definition: ddsSubscriberIf.hpp:42
rtctk::telSub::DdsSubscriberIf::DdsSubscriberIf
DdsSubscriberIf() RTCTK_NOEXCEPT
Definition: ddsSubscriberIf.hpp:52
config.hpp
Project-wide configuration header.
rtctk::telSub::DdsSubscriberIf
Base class abstracting DDS communication code.
Definition: ddsSubscriberIf.hpp:50
rtctk::telSub::DdsSubscriberIf::GetSamples
virtual AgnosticDataSamples & GetSamples() RTCTK_NOEXCEPT=0
Returns reference to data structure holding taken data samples.
rtctk::telSub::DdsSubscriberIf::~DdsSubscriberIf
virtual ~DdsSubscriberIf() RTCTK_NOEXCEPT
Definition: ddsSubscriberIf.hpp:53
rtctk::telSub::DdsParams::m_qos_profile
std::string m_qos_profile
Definition: ddsSubscriberIf.hpp:39
agnosticDataSamples.hpp
Declares AgnosticDataSamples.
rtctk::telSub::DdsSubscriberIf::GetNumberOfTopics
virtual size_t GetNumberOfTopics() const RTCTK_NOEXCEPT=0
Returns the number of configured topics.
rtctk::telSub::DdsParams::m_qos_library
std::string m_qos_library
Definition: ddsSubscriberIf.hpp:38
rtctk::telSub::DdsSubscriberIf::GetTopicName
virtual const std::string & GetTopicName(size_t index) const RTCTK_NOEXCEPT=0
Returns a string containing the name of a configured topic.
rtctk::telSub::DdsParams::m_topics
std::vector< std::string > m_topics
Definition: ddsSubscriberIf.hpp:40
rtctk::telSub
Definition: main.cpp:6
rtctk::telSub::DdsParams
Parameter set to be passed to classes deriving from DdsSubscriberIf.
Definition: ddsSubscriberIf.hpp:36
ddsCommon.hpp
Declares common DDS types.
rtctk::telSub::DdsParams::m_interface_white_list
std::vector< std::string > m_interface_white_list
Definition: ddsSubscriberIf.hpp:41
std
Definition: mudpiProcessingError.hpp:119
rtctk::telSub::DdsParams::m_domain_id
int32_t m_domain_id
Definition: ddsSubscriberIf.hpp:37
mudpi::int32_t
int int32_t
Definition: mudpi.h:17
rtctk::telSub::DdsSubscriberIf::Take
virtual std::error_code Take(std::chrono::nanoseconds timeout) RTCTK_NOEXCEPT=0
Takes new samples from DDS readers and updates data structure accessable from GetSamples()
RTCTK_NOEXCEPT
#define RTCTK_NOEXCEPT
Definition: config.hpp:15
rtctk::telSub::AgnosticDataSamples
Container of DDS samples and associated sample information.
Definition: agnosticDataSamples.hpp:71