RTC Toolkit  0.1.0-alpha
Public Member Functions | List of all members
rtctk::telRepub::DdsPub Class Reference

#include <ddsPub.hpp>

Public Member Functions

 DdsPub (string qos_library="RtcTk_Default_Library", string qos_profile="RtcTk_Default_Profile")
 
 ~DdsPub ()
 
void SetQosLibrary (string &qos_library)
 
void SetQosProfile (string &qos_profile)
 
void createParticipant ()
 
void createPublisher ()
 
DDS::Topic * createTopic (const std::string &topicName)
 
void destroyDDSTopic (DDS::Topic *topic, bool toBeRemoved=true)
 
rtctk::AgnosticTopic::DataWriter * createDataWriter (DDS::Topic *topic)
 
void destroyDDSWriter (rtctk::AgnosticTopic::DataWriter *dw, bool toBeRemoved=true)
 
void createManyTopics (std::vector< string > &topicNames)
 
void destroyAllTopics ()
 
void createDataWriters ()
 
void destroyAllDataWriters ()
 
void createManyDataWriters (std::vector< string > &topicNames)
 
void dumpDDSstatistics ()
 
std::list< rtctk::AgnosticTopic::DataWriter * > & getDataWriters ()
 

Detailed Description

All functionallty needed to create DDS entities for DDS data publishing is concentrated in this class.

Note
Please refer to RTI DDS documentation for details of DDS

Constructor & Destructor Documentation

◆ DdsPub()

rtctk::telRepub::DdsPub::DdsPub ( string  qos_library = "RtcTk_Default_Library",
string  qos_profile = "RtcTk_Default_Profile" 
)
Parameters
qos_libraryRTI DDS QoS library (please refer to RTI DDS documentation for details)
qos_profileRTI DDS QoS profile (please refer to RTI DDS documentation for details)

◆ ~DdsPub()

rtctk::telRepub::DdsPub::~DdsPub ( )
inline

Member Function Documentation

◆ createDataWriter()

rtctk::AgnosticTopic::DataWriter * rtctk::telRepub::DdsPub::createDataWriter ( DDS::Topic *  topic)

Creates DDS writer for particular topic for topic of type: rtctk::AgnosticTopic.

Parameters
topicDDS topic for which DDS writer shall be created
Returns
created DDS data writer

◆ createDataWriters()

void rtctk::telRepub::DdsPub::createDataWriters ( )

Creates DDS Data Writer for all DDS topics. Internal it calls createDataWriter for each topic from the internal topic map.

◆ createManyDataWriters()

void rtctk::telRepub::DdsPub::createManyDataWriters ( std::vector< string > &  topicNames)

create DDS topics and DDS writers for the given list of topic names Internally it calls for each topic name createTopic, and on the created topic createDataWriter.

◆ createManyTopics()

void rtctk::telRepub::DdsPub::createManyTopics ( std::vector< string > &  topicNames)

Creates many DDS topics. Internal it calls createTopic, and add created topic to internal map.

Parameters
topicNamesvector of names for topic to be created.

◆ createParticipant()

void rtctk::telRepub::DdsPub::createParticipant ( )

Creates DDS participant. It is enough to have one particpant, so this shall be called just once.

◆ createPublisher()

void rtctk::telRepub::DdsPub::createPublisher ( )

Creates DDS publisher. It is enough to have one publisher, so this shall be called just once. It has to be called after DS particpant has been created.

◆ createTopic()

DDS::Topic * rtctk::telRepub::DdsPub::createTopic ( const std::string &  topicName)

Creates DDS topic. It has to be called after DDS publisher has been created. It checks if the topic with the provided name already exists, and if exists returns it.

Parameters
topicNamename of the DDS topic to be created.
Returns
created or already existing DDS topic

◆ destroyAllDataWriters()

void rtctk::telRepub::DdsPub::destroyAllDataWriters ( )

Destroys DDS Data Writer for all DDS topics. Internal it calls destroyDDSWriter for each data write for each topic from the internal topic map.

◆ destroyAllTopics()

void rtctk::telRepub::DdsPub::destroyAllTopics ( )

Destroys all DDS topics from internal map. Internal it calls destroyDDSTopic.

◆ destroyDDSTopic()

void rtctk::telRepub::DdsPub::destroyDDSTopic ( DDS::Topic *  topic,
bool  toBeRemoved = true 
)

Destroys DDS topic.

Parameters
topicDDS topic to be destroyed
toBeRemovedflag that indicates if the topic should be also removed from internal map. Default is to be removed.

◆ destroyDDSWriter()

void rtctk::telRepub::DdsPub::destroyDDSWriter ( rtctk::AgnosticTopic::DataWriter *  dw,
bool  toBeRemoved = true 
)

Destroys DDS data writer.

Parameters
dwDDS Data writter to be destroyed
toBeRemovedflag that indicates if the data writer should be also removed from internal map. Default is to be removed.

◆ dumpDDSstatistics()

void rtctk::telRepub::DdsPub::dumpDDSstatistics ( )

Dumps / logs varios DDS statistic like NACks, ACKs, ... for each DDS writer

◆ getDataWriters()

std::list<rtctk::AgnosticTopic::DataWriter*>& rtctk::telRepub::DdsPub::getDataWriters ( )
inline

returns vector of all DDS Data writers

◆ SetQosLibrary()

void rtctk::telRepub::DdsPub::SetQosLibrary ( string &  qos_library)
inline

Set RTI DDS QoS library after creation

Parameters
qos_libraryRTI DDS QoS library (please refer to RTI DDS documentation for details)

◆ SetQosProfile()

void rtctk::telRepub::DdsPub::SetQosProfile ( string &  qos_profile)
inline

Set RTI DDS QoS profile after creation

Parameters
qos_profileRTI DDS QoS profile (please refer to RTI DDS documentation for details)

The documentation for this class was generated from the following files: