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.
 
 ~SynDDSTopic ()
 Destructor.
 
void Initialize (eprosima::fastdds::dds::DomainParticipant *participant)
 Creates the TypeSupport and the DDS topic.
 
const std::string & GetTopicName () const
 Get the topic name.
 
std::string GetFullTopicName ()
 Get the full topic name with the prefix attached.
 
eprosima::fastdds::dds::Topic * GetDDSTopic ()
 Get the DDS topic object.
 
void SetPrefix (const std::string &prefix)
 Set the static prefix for this SynDDSTopic in particular.
 
void DeleteDDSTopic (eprosima::fastdds::dds::DomainParticipant *participant)
 Delete the DDS topic created.
 

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.
 

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_nameThe topic name
data_typeThe topic data type
participantthe participant used to create the topic and register the type, if necessary
topic_prefixThe prefix used.

Member Function Documentation

◆ DeleteDDSTopic()

void chrono::synchrono::SynDDSTopic::DeleteDDSTopic ( eprosima::fastdds::dds::DomainParticipant * participant)

Delete the DDS topic created.

Parameters
participantThe participant used to delete the topic

◆ 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
participantthe participant used to create the topic and register the type, if necessary

◆ RemovePrefix()

std::string chrono::synchrono::SynDDSTopic::RemovePrefix ( const std::string & topic,
const std::string & prefix )
static

Remove the prefix on a topic If prefix not found, the original string is returned.

Parameters
topicstring representation of the topic with a prefix
prefixthe used prefix
Returns
std::string the topic with the prefix removed

The documentation for this class was generated from the following files:
  • C:/M/B/src/chrono-9.0.1/src/chrono_synchrono/communication/dds/SynDDSTopic.h
  • C:/M/B/src/chrono-9.0.1/src/chrono_synchrono/communication/dds/SynDDSTopic.cpp