12 #ifndef RTCTK_COMPONENTFRAMEWORK_DATAPATH_DDSPUB_HPP_
13 #define RTCTK_COMPONENTFRAMEWORK_DATAPATH_DDSPUB_HPP_
19 using namespace std::chrono_literals;
26 DataWriterListener *listener =
nullptr;
29 : topic_name(tn), listener(l) {
43 Publisher *m_publisher;
45 std::vector<DataWriter *> m_data_writers;
57 DdsPub(
const std::string &qos_file,
58 std::string qos_profile = DEFAULT_QOS_PROFILE,
59 DomainId_t domain_id=DEFAULT_DOMAIN_ID);
66 void CreatePublisher();
71 void DestroyPublisher();
79 DataWriter *CreateDataWriter(Topic *topic, DataWriterListener *listener =
nullptr);
88 void DestroyDataWriter(DataWriter *dw,
bool to_be_removed =
true, std::chrono::milliseconds wait_acks_timeout=5000ms);
94 void CreateDataWriters();
103 void DestroyAllDataWriters(std::chrono::milliseconds wait_acks_timeout=5000ms);
110 void CreateManyDataWriters(std::vector<DdsWriterParams>
const &);
117 void CreateManyDataWriters(std::vector<std::string>
const &topic_names);
122 void DumpDDSstatistics();
128 return m_data_writers;
138 void WaitForAcks(DataWriter *dw, std::chrono::milliseconds wait_acks_timeout=5000ms);
144 #endif // RTCTK_COMPONENTFRAMEWORK_DATAPATH_DDSPUB_HPP_