chrono::synchrono::SynDDSTopic Class Reference
Description
Describes information that's being distributed over an abstract "wire" Includes data type and meta information (i.e.
topic name)
#include <SynDDSTopic.h>
Public Member Functions | |
SynDDSTopic (const std::string &topic_name, const std::string &topic_prefix, eprosima::fastdds::dds::TopicDataType *data_type, eprosima::fastdds::dds::DomainParticipant *participant=nullptr) | |
Constructor Will call Initialize. More... | |
~SynDDSTopic () | |
Destructor. More... | |
void | Initialize (eprosima::fastdds::dds::DomainParticipant *participant) |
Creates the TypeSupport and the DDS topic. More... | |
const std::string & | GetTopicName () const |
Get the topic name. More... | |
std::string | GetFullTopicName () |
Get the full topic name with the prefix attached. More... | |
eprosima::fastdds::dds::Topic * | GetDDSTopic () |
Get the DDS topic object. More... | |
void | SetPrefix (const std::string &prefix) |
Set the static prefix for this SynDDSTopic in particular. More... | |
void | DeleteDDSTopic (eprosima::fastdds::dds::DomainParticipant *participant) |
Delete the DDS topic created. More... | |
Static Public Member Functions | |
static std::string | RemovePrefix (const std::string &topic, const std::string &prefix) |
Remove the prefix on a topic If prefix not found, the original string is returned. More... | |
Constructor & Destructor Documentation
◆ SynDDSTopic()
chrono::synchrono::SynDDSTopic::SynDDSTopic | ( | const std::string & | topic_name, |
const std::string & | topic_prefix, | ||
eprosima::fastdds::dds::TopicDataType * | data_type, | ||
eprosima::fastdds::dds::DomainParticipant * | participant = nullptr |
||
) |
Constructor Will call Initialize.
- Parameters
-
topic_name The topic name data_type The topic data type participant the participant used to create the topic and register the type, if necessary topic_prefix The prefix used.
◆ ~SynDDSTopic()
chrono::synchrono::SynDDSTopic::~SynDDSTopic | ( | ) |
Destructor.
Member Function Documentation
◆ DeleteDDSTopic()
void chrono::synchrono::SynDDSTopic::DeleteDDSTopic | ( | eprosima::fastdds::dds::DomainParticipant * | participant | ) |
Delete the DDS topic created.
- Parameters
-
participant The participant used to delete the topic
◆ GetDDSTopic()
|
inline |
Get the DDS topic object.
◆ GetFullTopicName()
std::string chrono::synchrono::SynDDSTopic::GetFullTopicName | ( | ) |
Get the full topic name with the prefix attached.
◆ GetTopicName()
|
inline |
Get the topic name.
◆ Initialize()
void chrono::synchrono::SynDDSTopic::Initialize | ( | eprosima::fastdds::dds::DomainParticipant * | participant | ) |
Creates the TypeSupport and the DDS topic.
The type support will be registered.
- Parameters
-
participant the participant used to create the topic and register the type, if necessary
◆ RemovePrefix()
|
static |
Remove the prefix on a topic If prefix not found, the original string is returned.
- Parameters
-
topic string representation of the topic with a prefix prefix the used prefix
- Returns
- std::string the topic with the prefix removed
◆ SetPrefix()
void chrono::synchrono::SynDDSTopic::SetPrefix | ( | const std::string & | prefix | ) |
Set the static prefix for this SynDDSTopic in particular.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_synchrono/communication/dds/SynDDSTopic.h
- /builds/uwsbel/chrono/src/chrono_synchrono/communication/dds/SynDDSTopic.cpp