RTI Connext C# API Version 7.2.0
|
Provides access to XML-defined QoS profiles, data types, and complete DDS systems. More...
Inherits IDisposable.
Public Member Functions | |
QosProvider (Profile profilePolicy) | |
Create a QosProvider with additional configuration More... | |
QosProvider (string uri) | |
Create a QosProvider fetching the QoS configuration from a URI More... | |
QosProvider (string uri, string profile) | |
Create a QosProvider fetching the QoS configuration from a URI More... | |
void | Dispose () |
Releases the native resources used by this object. A finalizer is also provided. More... | |
DomainParticipant | CreateParticipantFromConfig (string configName) |
Creates a DomainParticipant given its configuration name from a description provided in an XML configuration file. More... | |
DomainParticipant | CreateParticipantFromConfig (string configName, DomainParticipantConfigParams parameters) |
Creates a DomainParticipant given its configuration name from a description provided in an XML configuration file and a set of parameters that allow changing some properties of such configuration. More... | |
DomainParticipantQos | GetDomainParticipantQos () |
Get the DomainParticipantQos currently associated with the default profile. More... | |
DomainParticipantQos | GetDomainParticipantQos (string profile) |
Get the DomainParticipantQos from a profile More... | |
TopicQos | GetTopicQos (string profile) |
Get the TopicQos from a profile More... | |
TopicQos | GetTopicQos () |
Get the TopicQos currently associated with the default profile. More... | |
TopicQos | GetTopicQosWithTopicName (string profile, string topicName) |
Get the TopicQos from a profile for a given topic. More... | |
TopicQos | GetTopicQosWithTopicName (string topicName) |
Get the TopicQos currently associated with the default profile for a given topic. More... | |
PublisherQos | GetPublisherQos (string profile) |
Get the PublisherQos from a profile More... | |
PublisherQos | GetPublisherQos () |
Get the PublisherQos currently associated with the default profile. More... | |
SubscriberQos | GetSubscriberQos (string profile) |
Get the SubscriberQos from a profile More... | |
SubscriberQos | GetSubscriberQos () |
Get the SubscriberQos currently associated with the default profile. More... | |
DataWriterQos | GetDataWriterQos (string profile) |
Get the DataWriterQos from a profile More... | |
DataWriterQos | GetDataWriterQos () |
Get the DataWriterQos currently associated with the default profile. More... | |
DataWriterQos | GetDataWriterQosWithTopicName (string profile, string topicName) |
Get the DataWriterQos from a profile and a given topic. More... | |
DataWriterQos | GetDataWriterQosWithTopicName (string topicName) |
Get the DataWriterQos for a given topic currently associated with the default profile. More... | |
DataReaderQos | GetDataReaderQos (string profile) |
Get the DataReaderQos from a profile. More... | |
DataReaderQos | GetDataReaderQos () |
Get the DataReaderQos currently associated with the default profile. More... | |
DataReaderQos | GetDataReaderQosWithTopicName (string profile, string topicName) |
Get the DataReaderQos from a profile for a given topic. More... | |
DataReaderQos | GetDataReaderQosWithTopicName (string topicName) |
Get the DataReaderQos for a given topic currently associated with the default profile. More... | |
DynamicType | GetType (string typeName) |
Load a type from its XML definition More... | |
IEnumerable< string > | GetQosProfileLibraries () |
Get a list of the QoS profile libraries loaded by this QosProvider More... | |
IEnumerable< string > | GetQosProfiles (string libraryName) |
Get a list of the QoS profiles under a library More... | |
IEnumerable< string > | GetQosProfiles () |
Get a list of all the QoS profiles associated with this QosProvider. More... | |
void | ReloadProfiles () |
Reloads the profiles by parsing the XML documents again More... | |
void | UnloadProfiles () |
Unload the profiles More... | |
Static Public Member Functions | |
static void | SetDefaultProviderParams (Profile profile) |
This method can be called before accessing QosProvider.Default to configure which profiles the default provider will load. More... | |
Properties | |
static QosProvider | Default [get] |
Get the default QosProvider, a singleton that gives access to the QoS profiles and data types that are loaded by default. More... | |
Profile | ProviderParams [get, set] |
Get or modify this QosProvider's configuration. When the configuration is modified, the profiles are reloaded. More... | |
string | DefaultProfile [get, set] |
Get or set the profile used by default (can be null). More... | |
string | DefaultLibrary [get, set] |
Get or set the library used by default (can be null) More... | |
bool | Disposed [get] |
Indicates whether this object has been disposed More... | |
Provides access to XML-defined QoS profiles, data types, and complete DDS systems.
A QosProvider is created with a URI that identifies a resource from where to load the definition of:
The URI can be:
str://"..."
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
:
To load type definitions, see GetType(string).
To create a DomainParticipant and its contained entities, see CreateParticipantFromConfig(string).
The profile name argument is optional:
When omitted, the QosProvider looks for a profile as follows (in order of precedence):
<qos_profile>
identified as the default profile with the attribute is_default_qos=true
A QosProvider can be used in combination with functions such as Rti.Dds.Publication.Publisher.DefaultDataWriterQos or Rti.Dds.Subscription.Subscriber.DefaultDataReaderQos to set the profile that entities are created with by default:
More information about QoS Profiles can be found in the QoS Profiles section, in the User's Manual.
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 QosProvider.SetDefaultProviderParams(Profile). This method should be called before QosProvider.Default is accessed.
QosProvider.Default also determines the default values for <participant_factory_qos>
, which can be used to configure logging.
Any QosProvider, including the default QosProvider, has access to the built-in profiles. For example, to obtain the DataWriterQos
from the "strict reliable" built-in profile:
XML QoS definitions can specify a topic_filter
attribute. Several functions (such as GetDataReaderQosWithTopicName(string) receive a topicName
argument. When these functions look for the QoS, they will try to match the topicName
against the topic_filter
s, if they are used. See the Topic Filters section in the User's Manual.
Rti.Dds.Core.QosProvider.QosProvider | ( | Profile | profilePolicy | ) |
Create a QosProvider with additional configuration
profilePolicy | Specifies multiple locations where to look for profiles |
|
inline |
Create a QosProvider fetching the QoS configuration from a URI
uri | A file such as "path/to/my_config.xml" , or an inline definition, "str://\"<dds>...</dds>\"" (note the quotes after str:// ) |
|
inline |
Create a QosProvider fetching the QoS configuration from a URI
uri | A file such as "file:///somewhere/on/disk/qos-config.xml", or an inline definition, "str://"<dds;>...</dds;>"" |
profile | The QoS profile to set as the default, overriding any is_default_qos tag in the loaded XML file. |
|
inlinestatic |
This method can be called before accessing QosProvider.Default to configure which profiles the default provider will load.
profile | The configuration for QosProvider.Default |
|
inline |
Releases the native resources used by this object. A finalizer is also provided.
DomainParticipant Rti.Dds.Core.QosProvider.CreateParticipantFromConfig | ( | string | configName | ) |
Creates a DomainParticipant given its configuration name from a description provided in an XML configuration file.
.
DomainParticipant Rti.Dds.Core.QosProvider.CreateParticipantFromConfig | ( | string | configName, |
DomainParticipantConfigParams | parameters | ||
) |
Creates a DomainParticipant given its configuration name from a description provided in an XML configuration file and a set of parameters that allow changing some properties of such configuration.
The full documentation is available in the C API: DDS_DomainParticipantFactory_create_participant_from_config_w_params
DomainParticipantQos Rti.Dds.Core.QosProvider.GetDomainParticipantQos | ( | ) |
Get the DomainParticipantQos currently associated with the default profile.
DomainParticipantQos Rti.Dds.Core.QosProvider.GetDomainParticipantQos | ( | string | profile | ) |
Get the DomainParticipantQos from a profile
profile | The profile from which to get the DomainParticipantQos, for example "MyLibrary::MyProfile" |
TopicQos Rti.Dds.Core.QosProvider.GetTopicQos | ( | string | profile | ) |
Get the TopicQos from a profile
profile | The profile from which to get the TopicQos, for example "MyLibrary::MyProfile" |
TopicQos Rti.Dds.Core.QosProvider.GetTopicQos | ( | ) |
Get the TopicQos currently associated with the default profile.
TopicQos Rti.Dds.Core.QosProvider.GetTopicQosWithTopicName | ( | string | profile, |
string | topicName | ||
) |
Get the TopicQos from a profile for a given topic.
profile | The profile from which to get the TopicQos, for example "MyLibrary::MyProfile" |
topicName | The topic name used to select a qos within the profile, if the topic_filter attribute is used. |
TopicQos Rti.Dds.Core.QosProvider.GetTopicQosWithTopicName | ( | string | topicName | ) |
Get the TopicQos currently associated with the default profile for a given topic.
topicName | The topic name used to select a qos within the profile, if the topic_filter attribute is used. |
PublisherQos Rti.Dds.Core.QosProvider.GetPublisherQos | ( | string | profile | ) |
Get the PublisherQos from a profile
profile | The profile from which to get the PublisherQos, for example "MyLibrary::MyProfile" |
PublisherQos Rti.Dds.Core.QosProvider.GetPublisherQos | ( | ) |
Get the PublisherQos currently associated with the default profile.
SubscriberQos Rti.Dds.Core.QosProvider.GetSubscriberQos | ( | string | profile | ) |
Get the SubscriberQos from a profile
profile | The profile from which to get the SubscriberQos, for example "MyLibrary::MyProfile" |
SubscriberQos Rti.Dds.Core.QosProvider.GetSubscriberQos | ( | ) |
Get the SubscriberQos currently associated with the default profile.
DataWriterQos Rti.Dds.Core.QosProvider.GetDataWriterQos | ( | string | profile | ) |
Get the DataWriterQos from a profile
profile | The profile from which to get the DataWriterQos, for example "MyLibrary::MyProfile" |
DataWriterQos Rti.Dds.Core.QosProvider.GetDataWriterQos | ( | ) |
Get the DataWriterQos currently associated with the default profile.
DataWriterQos Rti.Dds.Core.QosProvider.GetDataWriterQosWithTopicName | ( | string | profile, |
string | topicName | ||
) |
Get the DataWriterQos from a profile and a given topic.
profile | The profile from which to get the DataWriterQos, for example "MyLibrary::MyProfile" |
topicName | The topic name used to select a qos within the profile, if the topic_filter attribute is used. |
DataWriterQos Rti.Dds.Core.QosProvider.GetDataWriterQosWithTopicName | ( | string | topicName | ) |
Get the DataWriterQos for a given topic currently associated with the default profile.
topicName | The topic name used to select a qos within the profile, if the topic_filter attribute is used. |
DataReaderQos Rti.Dds.Core.QosProvider.GetDataReaderQos | ( | string | profile | ) |
Get the DataReaderQos from a profile.
profile | The profile from which to get the DataReaderQos, for example "MyLibrary::MyProfile" |
DataReaderQos Rti.Dds.Core.QosProvider.GetDataReaderQos | ( | ) |
Get the DataReaderQos currently associated with the default profile.
DataReaderQos Rti.Dds.Core.QosProvider.GetDataReaderQosWithTopicName | ( | string | profile, |
string | topicName | ||
) |
Get the DataReaderQos from a profile for a given topic.
profile | The profile from which to get the DataReaderQos, for example "MyLibrary::MyProfile" |
topicName | The topic name used to select a qos within the profile, if the topic_filter attribute is used. |
DataReaderQos Rti.Dds.Core.QosProvider.GetDataReaderQosWithTopicName | ( | string | topicName | ) |
Get the DataReaderQos for a given topic currently associated with the default profile.
topicName | The topic name used to select a qos within the profile, if the topic_filter attribute is used. |
|
inline |
Load a type from its XML definition
typeName | The name of a type defined under the <types> tag. |
IEnumerable< string > Rti.Dds.Core.QosProvider.GetQosProfileLibraries | ( | ) |
Get a list of the QoS profile libraries loaded by this QosProvider
The full documentation is available in the C API: DDS_DomainParticipantFactory_get_qos_profile_libraries
IEnumerable< string > Rti.Dds.Core.QosProvider.GetQosProfiles | ( | string | libraryName | ) |
Get a list of the QoS profiles under a library
libraryName | The library containing the profiles |
|
inline |
Get a list of all the QoS profiles associated with this QosProvider.
void Rti.Dds.Core.QosProvider.ReloadProfiles | ( | ) |
Reloads the profiles by parsing the XML documents again
void Rti.Dds.Core.QosProvider.UnloadProfiles | ( | ) |
Unload the profiles
|
staticget |
Get the default QosProvider, a singleton that gives access to the QoS profiles and data types that are loaded by default.
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.
|
getset |
Get or modify this QosProvider's configuration. When the configuration is modified, the profiles are reloaded.
|
getset |
Get or set the profile used by default (can be null).
|
getset |
Get or set the library used by default (can be null)
|
get |
Indicates whether this object has been disposed