RTI Connext Modern C++ API  Version 6.1.0
dds::core::QosProvider Class Reference

<<reference-type>> The QosProvider class provides a way for a user to control and access the XML QoS profiles that are loaded by RTI Connext More...

#include <dds/core/QosProvider.hpp>

Public Member Functions

 QosProvider (const std::string &uri, const std::string &profile)
 Create a QosProvider fetching QoS configuration from the specified URI. More...
 
 QosProvider (const std::string &uri)
 Create a QosProvider fetching QoS configuration from the specified URI. More...
 
const dds::domain::qos::DomainParticipantQos participant_qos ()
 Get the dds::domain::qos::DomainParticipantQos in the default profile. More...
 
const dds::domain::qos::DomainParticipantQos participant_qos (const std::string &profile)
 Get the DomainParticipantQos from a QoS profile. More...
 
const dds::topic::qos::TopicQos topic_qos ()
 Get the dds::topic::qos::TopicQos in the default profile. More...
 
const dds::topic::qos::TopicQos topic_qos (const std::string &profile)
 Get the dds::topic::qos::TopicQos from a QoS profile. More...
 
const dds::sub::qos::SubscriberQos subscriber_qos ()
 Get the dds::sub::qos::SubscriberQos in the default profile. More...
 
const dds::sub::qos::SubscriberQos subscriber_qos (const std::string &profile)
 Get the dds::sub::qos::SubscriberQos from a QoS profile. More...
 
const dds::sub::qos::DataReaderQos datareader_qos ()
 Get the dds::sub::qos::DataReaderQos in the default profile. More...
 
const dds::sub::qos::DataReaderQos datareader_qos (const std::string &profile)
 Get the dds::sub::qos::DataReaderQos from a QoS profile. More...
 
const dds::pub::qos::PublisherQos publisher_qos ()
 Get the dds::pub::qos::PublisherQos in the default profile. More...
 
dds::pub::qos::PublisherQos publisher_qos (const std::string &profile)
 Get the dds::pub::qos::PublisherQos from a QoS profile. More...
 
const dds::pub::qos::DataWriterQos datawriter_qos ()
 Get the dds::pub::qos::DataWriterQos from the default profile. More...
 
const dds::pub::qos::DataWriterQos datawriter_qos (const std::string &profile)
 Get the dds::pub::qos::DataWriterQos from a QoS profile. More...
 
static rti::core::QosProviderParams default_provider_params ()
 <<extension>> (deprecated) Get the rti::core::QosProviderParams for the default QosProvider More...
 
static void default_provider_params (const rti::core::QosProviderParams &params)
 <<extension>> (deprecated) Set the rti::core::QosProviderParams for the default QosProvider More...
 
const dds::topic::qos::TopicQos topic_qos_w_topic_name (const std::string &profile, const std::string &topic_name) const
 <<extension>> Get the dds::topic::qos::TopicQos for a topic name in a given profile. More...
 
const dds::topic::qos::TopicQos topic_qos_w_topic_name (const std::string &topic_name) const
 <<extension>> Get the dds::topic::qos::TopicQos for a topic name in the default profile. More...
 
const dds::sub::qos::DataReaderQos datareader_qos_w_topic_name (const std::string &profile, const std::string &topic_name) const
 <<extension>> Get the dds::sub::qos::DataReaderQos for a topic name in a given profile. More...
 
const dds::sub::qos::DataReaderQos datareader_qos_w_topic_name (const std::string &topic_name) const
 <<extension>> Get the dds::sub::qos::DataReaderQos for a topic name in the default profile. More...
 
const dds::pub::qos::DataWriterQos datawriter_qos_w_topic_name (const std::string &profile, const std::string &topic_name) const
 <<extension>> Get the dds::pub::qos::DataWriterQos for a topic name. More...
 
const dds::pub::qos::DataWriterQos datawriter_qos_w_topic_name (const std::string &topic_name) const
 <<extension>> Get the dds::pub::qos::DataWriterQos for a topic name. More...
 
void default_library (const std::string &library_name)
 <<extension>> Set the default library for this QosProvider. More...
 
void default_profile (const std::string &profile_name)
 <<extension>> Set the default profile for this QosProvider. More...
 
rti::core::optional_value< std::string > default_library () const
 <<extension>> Get the default library associated with this QosProvider. More...
 
rti::core::optional_value< std::string > default_profile () const
 <<extension>> Get the default profile associated with this QosProvider. More...
 
rti::core::optional_value< std::string > default_profile_library () const
 <<extension>> Get the default profile library associated with this QosProvider. More...
 
dds::core::StringSeq qos_profile_libraries () const
 <<extension>> Get a list of the QoS profile libraries loaded by this QosProvider. More...
 
dds::core::StringSeq qos_profiles (const std::string &library_name) const
 <<extension>> Get a list of the QoS profiles located in the default library of this QosProvider. More...
 
bool profiles_loaded () const
 <<extension>> Check if the profiles are loaded by this QosProvider More...
 
const dds::core::xtypes::DynamicTypetype (const std::string &type_name) const
 <<extension>> Load a type More...
 
rti::core::QosProviderParams provider_params () const
 <<extension>> Get the QosProvider params for this QosProvider. More...
 
void provider_params (const rti::core::QosProviderParams &provider_params)
 <<extension>> Set the rti::core::QosProviderParams for this QosProvider. More...
 
void load_profiles ()
 <<extension>> Load the XML QoS profiles. More...
 
void reload_profiles ()
 <<extension>> Reload the XML QoS profiles. More...
 
void unload_profiles ()
 <<extension>> Unload the XML QoS profiles. More...
 
dds::domain::DomainParticipant create_participant_from_config (const std::string &config_name, const rti::domain::DomainParticipantConfigParams &params=rti::domain::DomainParticipantConfigParams())
 <<extension>> Creates a dds::domain::DomainParticipant given its configuration name from a description provided in an XML configuration file that has been loaded by this QosProvider. More...
 

Static Public Member Functions

static QosProvider Default ()
 Get the default QosProvider. More...
 
static void reset_default ()
 Reset the default settings of the default QosProvider. More...
 

Related Functions

(Note that these are not member functions.)

const char * USE_DDS_DEFAULT_QOS_PROFILE
 Special value to select the default QoS profile. More...
 
QosProviderParams default_qos_provider_params ()
 <<extension>> Get the rti::core::QosProviderParams for the default QosProvider More...
 
void default_qos_provider_params (const rti::core::QosProviderParams &params)
 <<extension>> Set the rti::core::QosProviderParams for the default QosProvider More...
 

Detailed Description

<<reference-type>> The QosProvider class provides a way for a user to control and access the XML QoS profiles that are loaded by RTI Connext

A QosProvider is created with a URI that identifies a resource from where to load the definition of:

  • QoS profiles
  • Type definitions
  • Full XML-defined DDS systems

The URI can be:

  • An XML file
  • A string representation of an XML document str://"..."
  • A group of several files and strings (see URL Groups in the User's Manual)

The following example loads a file named "MyProfiles.xml" in the current directory. Then it retrieves the DataReaderQos from a <qos_profile> named "MyProfile" under a <qos_library> named "MyLibrary" to create a DataReader:

dds::core::QosProvider my_qos_provider("MyProfiles.xml");
my_subscriber,
my_topic,
my_qos_provider.datareader_qos("MyLibrary::MyProfile"));

To load type definitions, see QosProvider::type().

To create a DomainParticipant and its contained entities, see QosProvider::create_participant_from_config().

Selecting a QoS profile

The profile name argument is optional:

auto reader_qos = my_qos_provider.datareader_qos();

When omitted, the QosProvider looks for a profile as follows (in order of precedence):

  • The profile set with default_profile()
  • The profile set in the constructor (an optional argument)
  • The <qos_profile> identified as the default profile with the attribute is_default_qos=true
  • If none of the above methods have been used, a QoS object with the documented default values is returned

A QosProvider can be used in combination with functions such as dds::pub::Publisher::default_datawriter_qos() or dds::sub::Subscriber::default_datareader_qos() to set the profile that entities are created with by default:

my_qos_provider.datareader_qos("MyLibrary::MyProfile"));
// reader created with the QoS in the profile "MyLibrary::MyProfile"
dds::sub::DataReader<Foo> reader(subscriber, topic);

More information about QoS Profiles can be found in the QoS Profiles section, in the User's Manual.

The Default QosProvider

A special QosProvider, QosProvider::Default() is always available to obtain the QoS profiles from the default locations, such as the file USER_QOS_PROFILES.xml in the current directory. For example, the following code obtains the default DataReaderQos:

This section in the User's Manual explains which profiles are automatically loaded by the default QosProvider.

The profiles that QosProvider::Default() loads can be configured with rti::core::default_qos_provider_params().

QosProvider::Default() also determines the default values for <participant_factory_qos>, which can be used to configure logging.

Built-in QoS Profiles

Any QosProvider, including the default QosProvider, has access to the Builtin Qos Profiles For example, to obtain the DataWriterQos from the "strict reliable" built-in profile:

Specifying a Topic Filter

XML QoS definitions can specify a topic_filter attribute. Several functions (such as datareader_qos_w_topic_name()) receive a topic_name argument. When these functions look for the QoS, they will try to match the topic_name against the topic_filters, if they are used. See the Topic Filters section in the User's Manual.

See also
For more examples, see Qos Provider Use Cases

Constructor & Destructor Documentation

◆ QosProvider() [1/2]

dds::core::QosProvider::QosProvider ( const std::string &  uri,
const std::string &  profile 
)
inline

Create a QosProvider fetching QoS configuration from the specified URI.

For instance, the following code:

dds::core::QosProvider xml_file_provider(
"file:///somewhere/on/disk/qos-config.xml", "MyLibrary::MyProfile");

will create a QosProvider which loads all of the QoS profiles from qos-config.xml and uses "MyLibrary::MyProfile" as the default profile.

Parameters
uriThe URI describing the location of the QoS profiles to load.
profileThe QoS profile to set as the default, overriding any is_default_qos tag in the loaded XML file.

◆ QosProvider() [2/2]

dds::core::QosProvider::QosProvider ( const std::string &  uri)
inlineexplicit

Create a QosProvider fetching QoS configuration from the specified URI.

For instance, the following code:

QosProvider xml_file_provider("file:///somewhere/on/disk/qos-config.xml");

will create a QosProvider which loads all of the QoS profiles from qos-config.xml and will only have a default profile if one of the profiles in qos-config.xml is marked with the is_default_qos set to true.

Parameters
uriThe URI describing the location of the QoS profiles to load. If no is_default_qos tag is found in the QoS profiles, then no profile will be set as default. Instead, the QosProvider will be associated with the DDS default QoS values until a default profile is set using the default_library and default_profile methods.

Member Function Documentation

◆ participant_qos() [1/2]

const dds::domain::qos::DomainParticipantQos dds::core::QosProvider::participant_qos ( )
inline

Get the dds::domain::qos::DomainParticipantQos in the default profile.

See Selecting a QoS profile for information on how the default profile is chosen.

Returns
The DomainParticipantQos

◆ participant_qos() [2/2]

const dds::domain::qos::DomainParticipantQos dds::core::QosProvider::participant_qos ( const std::string &  profile)
inline

Get the DomainParticipantQos from a QoS profile.

Parameters
profileThe profile from which to get the DomainParticipantQos, for example "MyLibrary::MyProfile"
Returns
The DomainParticipantQos that is located in the specified profile

◆ topic_qos() [1/2]

const dds::topic::qos::TopicQos dds::core::QosProvider::topic_qos ( )
inline

Get the dds::topic::qos::TopicQos in the default profile.

See Selecting a QoS profile for information on how the default profile is chosen.

Returns
The TopicQos

◆ topic_qos() [2/2]

const dds::topic::qos::TopicQos dds::core::QosProvider::topic_qos ( const std::string &  profile)
inline

Get the dds::topic::qos::TopicQos from a QoS profile.

Parameters
profileThe profile from which to get the TopicQos, for example "MyLibrary::MyProfile"
Returns
The TopicQos that is located in the specified profile

◆ subscriber_qos() [1/2]

const dds::sub::qos::SubscriberQos dds::core::QosProvider::subscriber_qos ( )
inline

Get the dds::sub::qos::SubscriberQos in the default profile.

See Selecting a QoS profile for information on how the default profile is chosen.

Returns
The SubscriberQos

◆ subscriber_qos() [2/2]

const dds::sub::qos::SubscriberQos dds::core::QosProvider::subscriber_qos ( const std::string &  profile)
inline

Get the dds::sub::qos::SubscriberQos from a QoS profile.

Parameters
profileThe profile from which to get the SubscriberQos, for example "MyLibrary::MyProfile"
Returns
The SubscriberQos that is located in the specified profile

◆ datareader_qos() [1/2]

const dds::sub::qos::DataReaderQos dds::core::QosProvider::datareader_qos ( )
inline

Get the dds::sub::qos::DataReaderQos in the default profile.

See Selecting a QoS profile for information on how the default profile is chosen.

Note
This function doesn't take into account the topic_filter used in the profile, if any. See datareader_qos_w_topic_name().
Returns
The DataReaderQos

◆ datareader_qos() [2/2]

const dds::sub::qos::DataReaderQos dds::core::QosProvider::datareader_qos ( const std::string &  profile)
inline

Get the dds::sub::qos::DataReaderQos from a QoS profile.

Note
This function doesn't take into account the topic_filter used in the profile, if any. See datareader_qos_w_topic_name().
Parameters
profileThe profile from which to get the DataReaderQos, for example "MyLibrary::MyProfile"
Returns
The DataReaderQos that is located in the specified profile

◆ publisher_qos() [1/2]

const dds::pub::qos::PublisherQos dds::core::QosProvider::publisher_qos ( )
inline

Get the dds::pub::qos::PublisherQos in the default profile.

See Selecting a QoS profile for information on how the default profile is chosen.

Returns
The PublisherQos

◆ publisher_qos() [2/2]

dds::pub::qos::PublisherQos dds::core::QosProvider::publisher_qos ( const std::string &  profile)
inline

Get the dds::pub::qos::PublisherQos from a QoS profile.

Parameters
profileThe profile from which to get the PublisherQos, for example "MyLibrary::MyProfile"
Returns
The PublisherQos that is located in the specified profile

◆ datawriter_qos() [1/2]

const dds::pub::qos::DataWriterQos dds::core::QosProvider::datawriter_qos ( )
inline

Get the dds::pub::qos::DataWriterQos from the default profile.

See Selecting a QoS profile for information on how the default profile is chosen.

Note
This function doesn't take into account the topic_filter used in the profile, if any. See datawriter_qos_w_topic_name().
Returns
The DataWriterQos

◆ datawriter_qos() [2/2]

const dds::pub::qos::DataWriterQos dds::core::QosProvider::datawriter_qos ( const std::string &  profile)
inline

Get the dds::pub::qos::DataWriterQos from a QoS profile.

Note
This function doesn't take into account the topic_filter used in the profile, if any. See datawriter_qos_w_topic_name().
Parameters
profileThe profile from which to get the DataWriterQos, for example "MyLibrary::MyProfile"
Returns
The DataWriterQos that is located in the specified profile

◆ Default()

static QosProvider dds::core::QosProvider::Default ( )
inlinestatic

Get the default QosProvider.

The default QosProvider automatically loads XML QoS, types and application profiles from several predetermined locations, such as the file USER_QOS_PROFILES.xml in the current working directory.

Returns
The Default QosProvider
See also
The Default QosProvider
Default QoS
Default QosProvider Use Cases

◆ reset_default()

static void dds::core::QosProvider::reset_default ( )
inlinestatic

Reset the default settings of the default QosProvider.

If you change the default library or profile associated with the default QosProvider, calling reset_default will set the library and profile back to the default values.

◆ default_provider_params() [1/2]

static rti::core::QosProviderParams default_provider_params ( )

◆ default_provider_params() [2/2]

static void default_provider_params ( const rti::core::QosProviderParams params)

<<extension>> (deprecated) Set the rti::core::QosProviderParams for the default QosProvider

[DEPRECATED] Use rti::core::default_qos_provider_params()

Parameters
paramsThe QosProviderParams to set

◆ topic_qos_w_topic_name() [1/2]

const dds::topic::qos::TopicQos topic_qos_w_topic_name ( const std::string &  profile,
const std::string &  topic_name 
) const

<<extension>> Get the dds::topic::qos::TopicQos for a topic name in a given profile.

Note
This function is an extension, it must be called via this->extensions()

The TopicQos will be found based on the given profile name and topic name.

Parameters
profileThe profile where the QosProvider should look for the TopicQos
topic_nameThe topic name used to select a qos within the profile, if the topic_filter attribute is used
Returns
dds::topic::qos::TopicQos The TopicQos that is located in the specified profile

◆ topic_qos_w_topic_name() [2/2]

const dds::topic::qos::TopicQos topic_qos_w_topic_name ( const std::string &  topic_name) const

<<extension>> Get the dds::topic::qos::TopicQos for a topic name in the default profile.

Note
This function is an extension, it must be called via this->extensions()

The TopicQos will be found based on the given topic name and must be located in the default profile (see Selecting a QoS profile for information on how the default profile is determined).

Parameters
topic_nameThe topic name used to select a qos within the profile, if the topic_filter attribute is used
Returns
dds::topic::qos::TopicQos The TopicQos that is located in the specified profile

◆ datareader_qos_w_topic_name() [1/2]

const dds::sub::qos::DataReaderQos datareader_qos_w_topic_name ( const std::string &  profile,
const std::string &  topic_name 
) const

<<extension>> Get the dds::sub::qos::DataReaderQos for a topic name in a given profile.

Note
This function is an extension, it must be called via this->extensions()

The DataReaderQos will be found based on the given profile name and topic name.

Parameters
profileThe profile where the QosProvider should look for the DataReaderQos
topic_nameThe topic name used to select a qos within the profile, if the topic_filter attribute is used
Returns
dds::sub::qos::DataReaderQos The DataReaderQos that is located in the specified profile

◆ datareader_qos_w_topic_name() [2/2]

const dds::sub::qos::DataReaderQos datareader_qos_w_topic_name ( const std::string &  topic_name) const

<<extension>> Get the dds::sub::qos::DataReaderQos for a topic name in the default profile.

Note
This function is an extension, it must be called via this->extensions()

The DataReaderQos will be found based on the given topic name and must be located in the default profile (see Selecting a QoS profile for information on how the default profile can is determined).

Parameters
topic_nameThe topic name used to select a qos within the profile, if the topic_filter attribute is used
Returns
dds::sub::qos::DataReaderQos The DataReaderQos that is located in the specified profile

◆ datawriter_qos_w_topic_name() [1/2]

const dds::pub::qos::DataWriterQos datawriter_qos_w_topic_name ( const std::string &  profile,
const std::string &  topic_name 
) const

<<extension>> Get the dds::pub::qos::DataWriterQos for a topic name.

Note
This function is an extension, it must be called via this->extensions()

The DataWriterQos will be found based on the given profile name and topic name.

Parameters
profileThe profile where the QosProvider should look for the DataWriterQos
topic_nameThe topic name used to select a qos within the profile, if the topic_filter attribute is used
Returns
dds::pub::qos::DataWriterQos The DataWriterQos that is located in the specified profile

◆ datawriter_qos_w_topic_name() [2/2]

const dds::pub::qos::DataWriterQos datawriter_qos_w_topic_name ( const std::string &  topic_name) const

<<extension>> Get the dds::pub::qos::DataWriterQos for a topic name.

Note
This function is an extension, it must be called via this->extensions()

The DataWriterQos will be found based on the given topic name and must be located in the current default profile associated with the QosProvider.

Parameters
topic_nameThe topic name used to select a qos within the profile, if the topic_filter attribute is used
Returns
dds::pub::qos::DataWriterQos The DataWriterQos that is located in the specified profile

◆ default_library() [1/2]

void default_library ( const std::string &  library_name)

<<extension>> Set the default library for this QosProvider.

Note
This function is an extension, it must be called via this->extensions()

After a default library is set, the functions that expect a profile argument don't need the library name prefix. For example:

auto reader_qos = qos_provider.datareader_qos("MyLibrary::MyProfile");
// This has the same effect:
qos_provider.extensions().default_library("MyLibrary");
reader_qos = qos_provider.datareader_qos("MyProfile");
Parameters
library_nameThe library to set as the default, or rti::core::USE_DDS_DEFAULT_QOS_PROFILE to unset the default library and use the system default.

◆ default_profile() [1/2]

void default_profile ( const std::string &  profile_name)

<<extension>> Set the default profile for this QosProvider.

Note
This function is an extension, it must be called via this->extensions()

When a default profile is set, the getters that don't receive a profile argument retrieve the QoS object from this profile (see Selecting a QoS profile).

The profile must be located in the current default library unless the library is also specified in the name.

Parameters
profile_nameThe profile to set as the default in the form "MyLibrary::MyProfile", or if the default_library() is also set, "MyProfile". The special value rti::core::USE_DDS_DEFAULT_QOS_PROFILE unsets a previously set default profile.

◆ default_library() [2/2]

rti::core::optional_value< std::string > default_library ( ) const

<<extension>> Get the default library associated with this QosProvider.

Note
This function is an extension, it must be called via this->extensions()

There may not be a default library set. The default library is the library that is checked in when setting the default profile if no library name is explicitly given. The default library is configurable.

Returns
rti::core::optional_value<std::string> The default library.

◆ default_profile() [2/2]

rti::core::optional_value< std::string > default_profile ( ) const

<<extension>> Get the default profile associated with this QosProvider.

Note
This function is an extension, it must be called via this->extensions()

There may not be a default profile set.

Returns
rti::core::optional_value<std::string> The default profile.

◆ default_profile_library()

rti::core::optional_value< std::string > default_profile_library ( ) const

<<extension>> Get the default profile library associated with this QosProvider.

Note
This function is an extension, it must be called via this->extensions()

There may not be a default profile library set. The default profile library is the library in which the default profile resides and is not necessarily the same library as the one returned from default_library(). The default profile library is not configurable.

Returns
rti::core::optional_value<std::string> The default profile library.

◆ qos_profile_libraries()

dds::core::StringSeq qos_profile_libraries ( ) const

<<extension>> Get a list of the QoS profile libraries loaded by this QosProvider.

Note
This function is an extension, it must be called via this->extensions()
Returns
dds::core::StringSeq A list of the currently loaded QoS profile libraries.

◆ qos_profiles()

dds::core::StringSeq qos_profiles ( const std::string &  library_name) const

<<extension>> Get a list of the QoS profiles located in the default library of this QosProvider.

Returns
dds::core::StringSeq A list of profiles.

◆ profiles_loaded()

bool profiles_loaded ( ) const

<<extension>> Check if the profiles are loaded by this QosProvider

Note
This function is an extension, it must be called via this->extensions()
Returns
bool false if the profiles are not loaded, true otherwise.

◆ type()

const dds::core::xtypes::DynamicType & type ( const std::string &  type_name) const

<<extension>> Load a type

Note
This function is an extension, it must be called via this->extensions()
Parameters
type_nameThe name of the type

This function loads a type from its XML definition under the tags <dds><types>.

See also
Example.

◆ provider_params() [1/2]

rti::core::QosProviderParams provider_params ( ) const

<<extension>> Get the QosProvider params for this QosProvider.

Note
This function is an extension, it must be called via this->extensions()
Returns
rti::core::QosProviderParams The QosProviderParams for this QosProvider.

◆ provider_params() [2/2]

void provider_params ( const rti::core::QosProviderParams provider_params)

<<extension>> Set the rti::core::QosProviderParams for this QosProvider.

Note
This function is an extension, it must be called via this->extensions()
Parameters
provider_paramsThe QosProviderParams to set.

◆ load_profiles()

void load_profiles ( )

<<extension>> Load the XML QoS profiles.

Note
This function is an extension, it must be called via this->extensions()

The XML QoS profiles are loaded implicitly after the first dds::domain::DomainParticipant is created or explicitly, after a call to this function. This method has the same effect as reload_profiles().

◆ reload_profiles()

void reload_profiles ( )

<<extension>> Reload the XML QoS profiles.

Note
This function is an extension, it must be called via this->extensions()

The XML QoS profiles are loaded implicitly after the first DomainParticipant is created or explicitly, after a call to this function. This method has the same effect as load_profiles().

◆ unload_profiles()

void unload_profiles ( )

<<extension>> Unload the XML QoS profiles.

Note
This function is an extension, it must be called via this->extensions()

The resources associated with the XML QoS profiles are freed. Any reference to the profiles after calling this function will fail with an Exception.

◆ create_participant_from_config()

dds::domain::DomainParticipant create_participant_from_config ( const std::string &  config_name,
const rti::domain::DomainParticipantConfigParams params = rti::domain::DomainParticipantConfigParams() 
)

<<extension>> Creates a dds::domain::DomainParticipant given its configuration name from a description provided in an XML configuration file that has been loaded by this QosProvider.

Note
This function is an extension, it must be called via this->extensions()

This operation creates a dds::domain::DomainParticipant registering all the necessary data types and creating all the contained entities (dds::topic::Topic, dds::pub::Publisher, dds::sub::Subscriber, dds::pub::DataWriter, dds::sub::DataReader) from a description given in an XML configuration file.

The configuration name is the fully qualified name of the XML participant object, consisting of the name of the participant library plus the name of participant configuration.

For example the name "MyParticipantLibrary::PublicationParticipant" can be used to create the domain participant from the description in an XML file with contents shown in the snippet below:

<participant_library name="MyParticipantLibrary">
<domain_participant name="PublicationParticipant" domain_ref="MyDomainLibrary::HelloWorldDomain">
<publisher name="MyPublisher">
<data_writer name="HelloWorldWriter" topic_ref="HelloWorldTopic"/>
</publisher>
</domain_participant>
</participant_library>

The entities belonging to the newly created dds::domain::DomainParticipant can be retrieved with the help of lookup operations such as: rti::sub::find_datareader_by_name.

MT Safety:
UNSAFE. It is not safe to create a dds::domain::DomainParticipant while another thread may be simultaneously creating another dds::domain::DomainParticipant.
See also
rti::domain::find_participant_by_name
dds::topic::find()
rti::pub::find_publisher
rti::sub::find_subscriber
rti::sub::find_datareader_by_name
rti::pub::find_datawriter_by_name
rti::pub::find_datawriter_by_name
rti::sub::find_datareader_by_name
Parameters
config_nameName of the participant configuration in the XML file.
paramsinput parameters that allow changing some properties of the configuration referred to by config_name. Specifically, params allows overriding the domain ID, participant name, and entities QoS specified in the XML configuration.
See also
XML Application Creation

Friends And Related Function Documentation

◆ USE_DDS_DEFAULT_QOS_PROFILE

const char* USE_DDS_DEFAULT_QOS_PROFILE
related

Special value to select the default QoS profile.

◆ default_qos_provider_params() [1/2]

QosProviderParams default_qos_provider_params ( )
related

<<extension>> Get the rti::core::QosProviderParams for the default QosProvider

Note
This is a standalone function in the namespace rti::core
Returns
rti::core::QosProviderParams

◆ default_qos_provider_params() [2/2]

void default_qos_provider_params ( const rti::core::QosProviderParams params)
related

<<extension>> Set the rti::core::QosProviderParams for the default QosProvider

Note
This is a standalone function in the namespace rti::core

Use this function to configure the profiles that dds::core::QosProvider::Default() loads.

Parameters
paramsThe QosProviderParams to set