Common functionallty needed to create DDS entities like participant and topic that can be later used (extent) for DDS data publishing and subscribing .
More...
#include <dds.hpp>
Common functionallty needed to create DDS entities like participant and topic that can be later used (extent) for DDS data publishing and subscribing .
- Note
- Please refer to FastDDS documentation for details of DDS
-
when this DDS class is used together with other MAL PS FastDDS things like Event channel service which is based in MAL PS FastDDS it is important that MAL things (Event Channel) is created/initialized before the DDS using this class.
◆ Dds() [1/2]
Constructor for Base class for both DDS Publisher and DDS Subscriber.
- Parameters
-
qos_file | name of QoS XML file. That needs to be located in subfolder: resource/config/rtctk/dds of $CFGPATH. |
qos_profile | FastDDS QoS profile (please refer to FastDDS documentation for details) |
domain_id | DDS domain Id (see FastDDS documentation for details) |
- Note
- The class is intended to be used just RTC Toolkit internal.
◆ ~Dds()
rtctk::componentFramework::Dds::~Dds |
( |
| ) |
|
|
virtualnoexcept |
◆ Dds() [2/2]
rtctk::componentFramework::Dds::Dds |
( |
Dds && |
rhs | ) |
|
|
delete |
◆ CreateManyTopics()
void rtctk::componentFramework::Dds::CreateManyTopics |
( |
std::vector< std::string > & |
topic_names | ) |
|
Creates many DDS topics.
Internal it calls CreateTopic, and add created topic to internal map.
- Parameters
-
topic_names | vector of names for topic to be created. |
◆ CreateParticipant()
void rtctk::componentFramework::Dds::CreateParticipant |
( |
| ) |
|
Creates DDS participant.
It is enough to have one particpant, so this shall be called just once.
◆ CreateTopic()
Topic * rtctk::componentFramework::Dds::CreateTopic |
( |
const std::string & |
topic_name | ) |
|
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
-
topic_name | name of the DDS topic to be created. |
- Returns
- created or already existing DDS topic
◆ DestroyAllTopics()
void rtctk::componentFramework::Dds::DestroyAllTopics |
( |
| ) |
|
Destroys all DDS topics from internal map.
Internal it calls DestroyTopic.
◆ DestroyParticipant()
void rtctk::componentFramework::Dds::DestroyParticipant |
( |
| ) |
|
Destroys DDS participant created in CreateParticipant.
As there should be just one participant this method should be called at most once.
◆ DestroyTopic()
void rtctk::componentFramework::Dds::DestroyTopic |
( |
Topic * |
topic, |
|
|
bool |
to_be_removed = true |
|
) |
| |
Destroys DDS topic.
- Parameters
-
topic | DDS topic to be destroyed |
to_be_removed | flag that indicates if the topic should be also removed from internal map. Default is to be removed. |
◆ DumpDDSstatistics()
void rtctk::componentFramework::Dds::DumpDDSstatistics |
( |
| ) |
|
|
virtual |
◆ GetNumberOfTopics()
size_t rtctk::componentFramework::Dds::GetNumberOfTopics |
( |
| ) |
const |
|
noexcept |
◆ GetTopicName()
const std::string rtctk::componentFramework::Dds::GetTopicName |
( |
size_t |
index | ) |
const |
|
noexcept |
◆ operator=()
Dds& rtctk::componentFramework::Dds::operator= |
( |
Dds && |
rhs | ) |
|
|
delete |
◆ SetInterfaceWhiteList()
void rtctk::componentFramework::Dds::SetInterfaceWhiteList |
( |
const std::vector< std::string > & |
iwl | ) |
|
Sets the interfaces that can be used for DDS sample traffic.
This allows to specify the interfaces, e.g. IP numbers, on the local machine that are allowed to be used for DDS traffic, i.e. this is the interface white list for allowed interfaces.
- Note
- This method needs to be called before calling CreateParticipant, otherwise the white list will not be used.
- Parameters
-
iwl | List of interfaces that can be used. |
◆ SetQosProfile()
void rtctk::componentFramework::Dds::SetQosProfile |
( |
std::string & |
qos_profile | ) |
|
|
inline |
Set FastDDS QoS profile after creation.
- Parameters
-
qos_profile | DDS QoS profile (please refer to FastDDS documentation for details) |
◆ DEFAULT_DOMAIN_ID
const DomainId_t rtctk::componentFramework::Dds::DEFAULT_DOMAIN_ID = 0 |
|
inlinestatic |
default Domain Id for different DDS
◆ DEFAULT_QOS_PROFILE
const std::string rtctk::componentFramework::Dds::DEFAULT_QOS_PROFILE = "RtcTk_Default_Profile" |
|
inlinestatic |
default profile name for different DDS QoSs
◆ m_domain_id
DomainId_t rtctk::componentFramework::Dds::m_domain_id =0 |
|
protected |
◆ m_factory
DomainParticipantFactory* rtctk::componentFramework::Dds::m_factory |
|
protected |
◆ m_interfaceWhiteList
std::vector<std::string> rtctk::componentFramework::Dds::m_interfaceWhiteList |
|
protected |
◆ m_logger
log4cplus::Logger rtctk::componentFramework::Dds::m_logger |
|
protected |
◆ m_participant
DomainParticipant* rtctk::componentFramework::Dds::m_participant |
|
protected |
◆ m_qos_profile
std::string rtctk::componentFramework::Dds::m_qos_profile |
|
protected |
◆ m_topics
std::vector<Topic *> rtctk::componentFramework::Dds::m_topics |
|
protected |
◆ TELEM_DP_QOS_FILE
const std::string rtctk::componentFramework::Dds::TELEM_DP_QOS_FILE = "telemDataPathDdsQos.xml" |
|
inlinestatic |
default file name for different DDS QoSs
The documentation for this class was generated from the following files:
- componentFramework/services/dataPath/dds/src/include/rtctk/componentFramework/dds.hpp
- componentFramework/services/dataPath/dds/src/dds.cpp