8 #ifndef RTCTK_REUSABLECOMPONENT_TELREPUB_DDSPUB_HPP_
9 #define RTCTK_REUSABLECOMPONENT_TELREPUB_DDSPUB_HPP_
11 #pragma GCC diagnostic push
12 #pragma GCC diagnostic ignored "-Wregister"
14 #include "agnostictopicifSupport.h"
15 #include "agnostictopicif.h"
16 #include <ndds/ndds_cpp.h>
17 #include <ndds/ndds_namespace_cpp.h>
19 #pragma GCC diagnostic pop
37 DDSDomainParticipantFactory *m_factory;
38 DDS::DomainParticipant* m_participant;
39 DDS::Publisher *m_publisher;
45 std::list<DDS::Topic*> m_topics;
46 std::list<rtctk::AgnosticTopic::DataWriter*> m_dataWriters;
56 DdsPub(
string qos_library=
"RtcTk_Default_Library",
string qos_profile=
"RtcTk_Default_Profile");
74 void createParticipant();
79 void createPublisher();
88 DDS::Topic* createTopic(
const std::string& topicName);
95 void destroyDDSTopic(DDS::Topic *topic,
bool toBeRemoved=
true);
102 rtctk::AgnosticTopic::DataWriter* createDataWriter(DDS::Topic *topic);
109 void destroyDDSWriter (rtctk::AgnosticTopic::DataWriter* dw,
bool toBeRemoved=
true);
116 void createManyTopics(std::vector<string> &topicNames);
122 void destroyAllTopics();
128 void createDataWriters();
134 void destroyAllDataWriters();
140 void createManyDataWriters(std::vector<string> &topicNames);
145 void dumpDDSstatistics();
150 std::list<rtctk::AgnosticTopic::DataWriter*> &
getDataWriters(){
return m_dataWriters; }
156 #endif //RTCTK_REUSABLECOMPONENT_TELREPUB_DDSPUB_HPP_