RTC Toolkit  2.0.0
ddsWaitSetIf.hpp
Go to the documentation of this file.
1 
11 #ifndef RTCTK_TELSUB_DDSWAITSETIF_HPP
12 #define RTCTK_TELSUB_DDSWAITSETIF_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 
26 
27 namespace rtctk::telSub {
28 
29  using namespace rtctk::componentFramework;
30 
40 struct DdsParams {
42  std::string m_qos_file = Dds::TELEM_DP_QOS_FILE;
43  std::string m_qos_profile = Dds::DEFAULT_QOS_PROFILE;
44 
45 // the size of m_topics and m_multicast_addresses (if defined) should be the same
46  std::vector<std::string> m_topics = {};
47  std::vector<std::string> m_multicast_addresses = {};
48 
49 // size is the number of network interfaces that we want, not the same as size of m_topics/m_multicast_addresses
50  std::vector<std::string> m_interface_white_list ={};
51 };
52 
58 class DdsWaitSetIf {
59 public:
62 
71 
106  virtual std::error_code Take(std::chrono::nanoseconds timeout) RTCTK_NOEXCEPT = 0;
107 
117  virtual size_t GetNumberOfTopics() const RTCTK_NOEXCEPT = 0;
118 
132  virtual std::string GetTopicName(size_t index) const RTCTK_NOEXCEPT = 0;
133 };
134 
135 } // namespace rtctk::telSub
136 #endif // RTCTK_TELSUB_DDSWAITSETIF_HPP
rtctk::componentFramework::Dds::DEFAULT_QOS_PROFILE
static const std::string DEFAULT_QOS_PROFILE
default profile name for different DDS QoSs
Definition: dds.hpp:147
config.hpp
Project-wide configuration header.
rtctk::componentFramework
Definition: commandReplier.cpp:20
agnosticDataSamples.hpp
Declares AgnosticDataSamples.
rtctk::componentFramework::Dds::DEFAULT_DOMAIN_ID
static const DomainId_t DEFAULT_DOMAIN_ID
default Domain Id for different DDS
Definition: dds.hpp:153
rtctk::telSub
Definition: main.cpp:6
rtctk::telSub::DdsWaitSetIf
Base class abstracting DDS communication code.
Definition: ddsWaitSetIf.hpp:58
rtctk::telSub::DdsParams
Parameter set to be passed to classes deriving from DdsWaitSetIf.
Definition: ddsWaitSetIf.hpp:40
ddsCommon.hpp
Declares some common DDS functionality.
rtctk::telSub::DdsWaitSetIf::GetSamples
virtual AgnosticDataSamples & GetSamples() RTCTK_NOEXCEPT=0
Returns reference to data structure holding taken data samples.
std
Definition: mudpiProcessingError.hpp:119
rtctk::telSub::DdsWaitSetIf::~DdsWaitSetIf
virtual ~DdsWaitSetIf() RTCTK_NOEXCEPT
Definition: ddsWaitSetIf.hpp:61
mudpi::int32_t
int int32_t
Definition: mudpi.h:17
RTCTK_NOEXCEPT
#define RTCTK_NOEXCEPT
Definition: config.hpp:15
rtctk::componentFramework::Dds::TELEM_DP_QOS_FILE
static const std::string TELEM_DP_QOS_FILE
default file name for different DDS QoSs
Definition: dds.hpp:141
rtctk::telSub::DdsWaitSetIf::DdsWaitSetIf
DdsWaitSetIf() RTCTK_NOEXCEPT
Definition: ddsWaitSetIf.hpp:60
rtctk::telSub::AgnosticDataSamples
Container of DDS samples and associated sample information.
Definition: agnosticDataSamples.hpp:71
rtctk::componentFramework::GetTopicName
const char * GetTopicName(DataWriter *writer)
Definition: ddsCommon.cpp:21