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, eprosima::fastdds::dds::TopicDataType *data_type, eprosima::fastdds::dds::DomainParticipant *participant=nullptr, const std::string &topic_prefix="/syn/")
 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,
eprosima::fastdds::dds::TopicDataType *  data_type,
eprosima::fastdds::dds::DomainParticipant *  participant = nullptr,
const std::string &  topic_prefix = "/syn/" 
)

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. Will default to /syn/ if nothing passed

◆ ~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
participantThe participant used to delete the topic

◆ GetDDSTopic()

eprosima::fastdds::dds::Topic* chrono::synchrono::SynDDSTopic::GetDDSTopic ( )
inline

Get the DDS topic object.

◆ GetFullTopicName()

std::string chrono::synchrono::SynDDSTopic::GetFullTopicName ( )

Get the full topic name with the prefix attached.

◆ GetTopicName()

const std::string& chrono::synchrono::SynDDSTopic::GetTopicName ( ) const
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
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

◆ 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