Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches

Class Domain, use to interact with the Publisher Subscriber API of the Fast RTPS implementation. More...

#include <Domain.h>

Static Public Member Functions

RTPS_DllAPI static DEPRECATED ParticipantcreateParticipant (const std::string &participant_profile, ParticipantListener *listen=nullptr)
 Create a Participant from a profile name.
 
RTPS_DllAPI static DEPRECATED ParticipantcreateParticipant (const ParticipantAttributes &att, ParticipantListener *listen=nullptr)
 Create a Participant.
 
static RTPS_DllAPI void getDefaultParticipantAttributes (ParticipantAttributes &participant_attributes)
 Fills participant_attributes with the default values.
 
static RTPS_DllAPI PublishercreatePublisher (Participant *part, const std::string &publisher_profile, PublisherListener *listen=nullptr)
 Create a Publisher in a Participant from a profile name.
 
static RTPS_DllAPI PublishercreatePublisher (Participant *part, const PublisherAttributes &att, PublisherListener *listen=nullptr)
 Create a Publisher in a Participant.
 
static RTPS_DllAPI void getDefaultPublisherAttributes (PublisherAttributes &publisher_attributes)
 Fills publisher_attributes with the default values.
 
static RTPS_DllAPI SubscribercreateSubscriber (Participant *part, const std::string &subscriber_profile, SubscriberListener *listen=nullptr)
 Create a Subscriber in a Participant from a profile name.
 
static RTPS_DllAPI SubscribercreateSubscriber (Participant *part, const SubscriberAttributes &att, SubscriberListener *listen=nullptr)
 Create a Subscriber in a Participant.
 
static RTPS_DllAPI void getDefaultSubscriberAttributes (SubscriberAttributes &subscriber_attributes)
 Fills subscriber_attributes with the default values.
 
static RTPS_DllAPI bool removeParticipant (Participant *part)
 Remove a Participant and all associated publishers and subscribers.
 
static RTPS_DllAPI bool removePublisher (Publisher *pub)
 Remove a Publisher.
 
static RTPS_DllAPI bool removeSubscriber (Subscriber *sub)
 Remove a Subscriber.
 
static RTPS_DllAPI bool getRegisteredType (Participant *part, const char *typeName, fastdds::dds::TopicDataType **type)
 Return a registered type.
 
static RTPS_DllAPI bool registerType (Participant *part, fastdds::dds::TopicDataType *type)
 Register a type in a participant.
 
static RTPS_DllAPI bool registerDynamicType (Participant *part, types::DynamicPubSubType *type)
 Register a type in a participant.
 
static RTPS_DllAPI bool unregisterType (Participant *part, const char *typeName)
 Unregister a type in a participant.
 
static RTPS_DllAPI void stopAll ()
 Stop and remove all participants, publishers and subscribers in this Domain.
 
static RTPS_DllAPI bool loadXMLProfilesFile (const std::string &xml_profile_file)
 Load profiles from XML file.
 
static RTPS_DllAPI bool loadXMLProfilesString (const char *data, size_t length)
 Load profiles from XML string.
 

Detailed Description

Class Domain, use to interact with the Publisher Subscriber API of the Fast RTPS implementation.

Member Function Documentation

◆ createParticipant() [1/2]

RTPS_DllAPI static DEPRECATED Participant * createParticipant ( const ParticipantAttributes att,
ParticipantListener listen = nullptr 
)
static

Create a Participant.

Parameters
attParticipant Attributes.
listenParticipantListener Pointer.
Returns
Participant pointer. (nullptr if not created.)

◆ createParticipant() [2/2]

RTPS_DllAPI static DEPRECATED Participant * createParticipant ( const std::string &  participant_profile,
ParticipantListener listen = nullptr 
)
static

Create a Participant from a profile name.

Parameters
participant_profileParticipant profile name.
listenParticipantListener Pointer.
Returns
Participant pointer. (nullptr if not created.)

◆ createPublisher() [1/2]

static RTPS_DllAPI Publisher * createPublisher ( Participant part,
const PublisherAttributes att,
PublisherListener listen = nullptr 
)
static

Create a Publisher in a Participant.

Parameters
partPointer to the participant where you want to create the Publisher.
attPublisherAttributes.
listenPointer to the PublisherListener.
Returns
Pointer to the created Publisher (nullptr if not created).

◆ createPublisher() [2/2]

static RTPS_DllAPI Publisher * createPublisher ( Participant part,
const std::string &  publisher_profile,
PublisherListener listen = nullptr 
)
static

Create a Publisher in a Participant from a profile name.

Parameters
partPointer to the participant where you want to create the Publisher.
publisher_profilePublisher profile name.
listenPointer to the PublisherListener.
Returns
Pointer to the created Publisher (nullptr if not created).

◆ createSubscriber() [1/2]

static RTPS_DllAPI Subscriber * createSubscriber ( Participant part,
const std::string &  subscriber_profile,
SubscriberListener listen = nullptr 
)
static

Create a Subscriber in a Participant from a profile name.

Parameters
partPointer to the participant where you want to create the Publisher.
subscriber_profileSubscriber profile name.
listenPointer to the SubscriberListener.
Returns
Pointer to the created Subscriber (nullptr if not created).

◆ createSubscriber() [2/2]

static RTPS_DllAPI Subscriber * createSubscriber ( Participant part,
const SubscriberAttributes att,
SubscriberListener listen = nullptr 
)
static

Create a Subscriber in a Participant.

Parameters
partPointer to the participant where you want to create the Publisher.
attSubscriberAttributes.
listenPointer to the SubscriberListener.
Returns
Pointer to the created Subscriber (nullptr if not created).

◆ getDefaultParticipantAttributes()

static RTPS_DllAPI void getDefaultParticipantAttributes ( ParticipantAttributes participant_attributes)
static

Fills participant_attributes with the default values.

◆ getDefaultPublisherAttributes()

static RTPS_DllAPI void getDefaultPublisherAttributes ( PublisherAttributes publisher_attributes)
static

Fills publisher_attributes with the default values.

◆ getDefaultSubscriberAttributes()

static RTPS_DllAPI void getDefaultSubscriberAttributes ( SubscriberAttributes subscriber_attributes)
static

Fills subscriber_attributes with the default values.

◆ getRegisteredType()

static RTPS_DllAPI bool getRegisteredType ( Participant part,
const char *  typeName,
fastdds::dds::TopicDataType **  type 
)
static

Return a registered type.

Parameters
partPointer to the Participant.
typeNameName of the type.
typeReturned type.
Returns
True if type was found.

◆ loadXMLProfilesFile()

static RTPS_DllAPI bool loadXMLProfilesFile ( const std::string &  xml_profile_file)
static

Load profiles from XML file.

Parameters
xml_profile_fileXML profile file.
Returns
True if correctly loaded.

◆ loadXMLProfilesString()

static RTPS_DllAPI bool loadXMLProfilesString ( const char *  data,
size_t  length 
)
static

Load profiles from XML string.

Parameters
databuffer containing XML data.
lengthlength of data.
Returns
True if correctly loaded.

◆ registerDynamicType()

static RTPS_DllAPI bool registerDynamicType ( Participant part,
types::DynamicPubSubType type 
)
static

Register a type in a participant.

Parameters
partPointer to the Participant.
typePointer to the Type.
Returns
True if correctly registered.

◆ registerType()

static RTPS_DllAPI bool registerType ( Participant part,
fastdds::dds::TopicDataType *  type 
)
static

Register a type in a participant.

Parameters
partPointer to the Participant.
typePointer to the Type.
Returns
True if correctly registered.

◆ removeParticipant()

static RTPS_DllAPI bool removeParticipant ( Participant part)
static

Remove a Participant and all associated publishers and subscribers.

Parameters
partPointer to the participant.
Returns
True if correctly removed.

◆ removePublisher()

static RTPS_DllAPI bool removePublisher ( Publisher pub)
static

Remove a Publisher.

Parameters
pubPointer to the Publisher.
Returns
True if correctly removed.

◆ removeSubscriber()

static RTPS_DllAPI bool removeSubscriber ( Subscriber sub)
static

Remove a Subscriber.

Parameters
subPointer to the Subscriber.
Returns
True if correctly removed.

◆ stopAll()

static RTPS_DllAPI void stopAll ( )
static

Stop and remove all participants, publishers and subscribers in this Domain.

◆ unregisterType()

static RTPS_DllAPI bool unregisterType ( Participant part,
const char *  typeName 
)
static

Unregister a type in a participant.

Parameters
partPointer to the Participant.
typeNameName of the type.
Returns
True if correctly unregistered.

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