RTI Connext Modern C++ API
Version 5.3.0
|
<<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>
Static Public Member Functions | |
static QosProvider | Default () |
Get the default QosProvider. | |
static void | reset_default () |
Reset the default settings of the default QosProvider. | |
Related Functions | |
(Note that these are not member functions.) | |
const char * | USE_DDS_DEFAULT_QOS_PROFILE |
Special value to select the default QoS profile. | |
<<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 file location containing QoS profiles, a string representation of the QoS profiles that you want the QosProvider to load, or a URL group that has a combination of files and strings from which to load profiles. For more information on the correct format of these URIs and URL groups, please see section 17.11 URL Groups in the RTI_CoreLibrariesAndUtilities_Users_Manual.pdf. More information about QoS Profiles can be found in section 17.9 QoS Profiles, also in the User's Manual.
For examples of how to use the QosProvider see Qos Provider Use Cases.
Any of the methods that take a profile name can be passed either just the profile name or the library and profile name as a string in the form of "library_name::profile_name".
Passing rti::core::USE_DDS_DEFAULT_QOS_PROFILE for the profile or library name in dds::core::QosProvider::default_profile(const std::string&) or dds::core::QosProvider::default_library(const std::string&) will unset the current default profile or library.
|
inline |
Create a QosProvider fetching QoS configuration from the specified URI.
For instance, the following code:
will create a QosProvider which loads all of the QoS profiles from qos-config.xml and uses "MyLibrary::MyProfile" as the default profile.
uri | The URI describing the location of the QoS profiles to load. |
profile | The QoS profile to set as the default, overriding any is_default_qos tag in the loaded XML file. |
|
inlineexplicit |
Create a QosProvider fetching QoS configuration from the specified URI.
For instance, the following code:
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.
uri | The 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. |
|
inline |
Get the dds::domain::qos::DomainParticipantQos currently associated with this QosProvider.
|
inline |
Set the dds::domain::qos::DomainParticipantQos that this QosProvider is currently associated with.
id | The profile from which to get the DomainParticipantQos |
|
inline |
Get the dds::topic::qos::TopicQos currently associated with this QosProvider.
|
inline |
Set the dds::topic::qos::TopicQos that this QosProvider is currently associated with.
id | The profile from which to get the TopicQos |
|
inline |
Get the dds::sub::qos::SubscriberQos currently associated with this QosProvider.
|
inline |
Set the dds::sub::qos::SubscriberQos that this QosProvider is currently associated with.
id | The profile from which to get the SubscriberQos |
|
inline |
Get the dds::sub::qos::DataReaderQos currently associated with this QosProvider.
|
inline |
Set the dds::sub::qos::DataReaderQos that this QosProvider is currently associated with.
id | The profile from which to get the DataReaderQos |
|
inline |
Get the dds::pub::qos::PublisherQos currently associated with this QosProvider.
|
inline |
Set the dds::pub::qos::PublisherQos that this QosProvider is currently associated with.
id | The profile from which to get the PublisherQos |
|
inline |
Get the dds::pub::qos::DataWriterQos currently associated with this QosProvider.
|
inline |
Set the dds::pub::qos::DataWriterQos that this QosProvider is currently associated with.
id | The profile from which to get the DataWriterQos |
|
inlinestatic |
Get the default QosProvider.
The default QosProvider represents the Qos profiles that the DDS entities will be created with if no Qos is provided. By modifying the default QosProvider you are altering the QoS settings that entities will be created with by 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.
static rti::core::QosProviderParams default_provider_params | ( | ) |
<<extension>> Get the rti::core::QosProviderParams for the default QosProvider
static void default_provider_params | ( | const rti::core::QosProviderParams & | params | ) |
<<extension>> Set the rti::core::QosProviderParams for the default QosProvider
params | The QosProviderParams to set |
dds::topic::qos::TopicQos topic_qos_w_topic_name | ( | const std::string & | id, |
const std::string & | topic_name | ||
) | const |
<<extension>> Set the dds::topic::qos::TopicQos that this QosProvider is currently associated with.
The TopicQos will be found based on the given profile name and topic name.
id | The profile to look for the TopicQos in |
topic_name | The topic name associated with profile to set |
dds::topic::qos::TopicQos topic_qos_w_topic_name | ( | const std::string & | topic_name | ) | const |
<<extension>> Set the dds::topic::qos::TopicQos that this QosProvider is currently associated with.
The TopicQos will be found based on the given topic name and must be located in the current default profile associated with the QosProvider.
topic_name | The topic name associated with profile to set |
dds::sub::qos::DataReaderQos datareader_qos_w_topic_name | ( | const std::string & | id, |
const std::string & | topic_name | ||
) | const |
<<extension>> Set the dds::sub::qos::DataReaderQos that this QosProvider is currently associated with.
The DataReaderQos will be found based on the given profile name and topic name.
id | The profile to look for the DataReaderQos in |
topic_name | The topic name associated with profile to set |
dds::sub::qos::DataReaderQos datareader_qos_w_topic_name | ( | const std::string & | topic_name | ) | const |
<<extension>> Set the dds::sub::qos::DataReaderQos that this QosProvider is currently associated with.
The DataReaderQos will be found based on the given topic name and must be located in the current default profile associated with the QosProvider.
topic_name | The topic name associated with profile to set |
dds::pub::qos::DataWriterQos datawriter_qos_w_topic_name | ( | const std::string & | id, |
const std::string & | topic_name | ||
) | const |
<<extension>> Set the dds::pub::qos::DataWriterQos that this QosProvider is currently associated with.
The DataWriterQos will be found based on the given profile name and topic name.
id | The profile to look for the DataWriterQos in |
topic_name | The topic name associated with profile to set |
dds::pub::qos::DataWriterQos datawriter_qos_w_topic_name | ( | const std::string & | topic_name | ) | const |
<<extension>> Set the dds::pub::qos::DataWriterQos that this QosProvider is currently associated with.
The DataWriterQos will be found based on the given topic name and must be located in the current default profile associated with the QosProvider.
topic_name | The topic name associated with profile to set |
rti::core::optional_value< std::string > default_library | ( | ) | const |
<<extension>> Get the default library associated with this QosProvider.
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.
rti::core::optional_value< std::string > default_profile | ( | ) | const |
<<extension>> Get the default profile associated with this QosProvider.
There may not be a default profile set.
rti::core::optional_value< std::string > default_profile_library | ( | ) | const |
<<extension>> Get the default profile library associated with this QosProvider.
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.
dds::core::StringSeq qos_profile_libraries | ( | ) | const |
<<extension>> Get a list of the QoS profile libraries loaded by this QosProvider.
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.
bool profiles_loaded | ( | ) | const |
<<extension>> Check if the profiles are loaded by this QosProvider
const dds::core::xtypes::DynamicType & type | ( | const std::string & | type_library_name, |
const std::string & | type_name | ||
) | const |
<<extension>> Load a type
type_library_name | The name of the library that contains the type |
type_name | The name of the type |
This function loads a type from its XML definition.
dds::core::StringSeq type_libraries | ( | ) | const |
<<extension>> Get a list of the type libraries loaded by this QosProvider.
rti::core::QosProviderParams provider_params | ( | ) | const |
<<extension>> Get the QosProvider params for this QosProvider.
void default_library | ( | const std::string & | library_name | ) |
<<extension>> Set the default library for this QosProvider.
library_name | The library to set as the default or rti::core::USE_DDS_DEFAULT_QOS_PROFILE to unset the default library and use the system default. |
void default_profile | ( | const std::string & | profile_name | ) |
<<extension>> Set the default profile for this QosProvider.
The profile must be located in the current default library unless the library is also specified in the name.
profile_name | The profile to set as the default or rti::core::USE_DDS_DEFAULT_QOS_PROFILE to unset the default profile and use the system default. |
void provider_params | ( | const rti::core::QosProviderParams & | provider_params | ) |
<<extension>> Set the rti::core::QosProviderParams for this QosProvider.
provider_params | The QosProviderParams to set. |
void load_profiles | ( | ) |
<<extension>> Load the XML QoS profiles.
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().
void reload_profiles | ( | ) |
<<extension>> Reload the XML QoS profiles.
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().
void unload_profiles | ( | ) |
<<extension>> Unload the XML QoS profiles.
The resources associated with the XML QoS profiles are freed. Any reference to the profiles after calling this function will fail with an Exception.
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.
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:
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.
config_name | Name of the participant configuration in the XML file. |
params | input 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. |
|
related |
Special value to select the default QoS profile.