OpenSplice C# API  v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
DDS.QosProvider Class Reference

Create a QosProvider fetching QoS configuration from the specified URI. More...

Inheritance diagram for DDS.QosProvider:
Inheritance graph
Collaboration diagram for DDS.QosProvider:
Collaboration graph

Public Member Functions

 QosProvider (string uri, string profile)
 Constructs a new QosProvider based on the provided uri and profile. More...
 
ReturnCode GetDataReaderQos (ref DataReaderQos datareaderQos, string id)
 Resolves the DataReaderQos identified by the id from the uri this QosProvider is associated with. More...
 
ReturnCode GetDataWriterQos (ref DataWriterQos datawriterQos, string id)
 Resolves the DataWriterQos identified by the id from the uri this QosProvider is associated with. More...
 
ReturnCode GetParticipantQos (ref DomainParticipantQos participantQos, string id)
 Resolves the DomainParticipantQos identified by the id from the uri this QosProvider is associated with. More...
 
ReturnCode GetPublisherQos (ref PublisherQos publisherQos, string id)
 Resolves the PublisherQos identified by the id from the uri this QosProvider is associated with. More...
 
ReturnCode GetSubscriberQos (ref SubscriberQos subscriberQos, string id)
 Resolves the SubscriberQos identified by the id from the uri this QosProvider is associated with. More...
 
ReturnCode GetTopicQos (ref TopicQos topicQos, string id)
 Resolves the TopicQos identified by the id from the uri this QosProvider is associated with. More...
 

Detailed Description

Create a QosProvider fetching QoS configuration from the specified URI.

For instance, the following code:

DDS.QosProvider xml_file_provider("file://somewhere/on/disk/qos-config.xml", null);
DDS.QosProvider json_file_provider("file://somewhere/on/disk/json-config.json", null);
DDS.QosProvider json_http_provider("http:///somewhere.org/here/json-config.json", null);

The URI determines the how the Qos configuration is fetched and the format in which it is represented. This specification requires compliant implementations to support at least one file based configuration using the XML syntax defined as part of the DDS for CCM specification (formal/12.02.01).

Then you can extract QoS Policies from the QosProvider

/* Create QoS Policies. */
DDS.TopicQos tpcQos = new DDS.TopicQos();
/* Set the QoS Policies according to the QosProvider XML content. */
DDS.QosProvider qosProvider("file://somewhere/on/disk/qos-config.xml", string.Empty);
/* Expect the functions to return ReturnCode.Ok. */
qosProvider.GetParticipantQos(ref parQos, null);
qosProvider.GetTopicQos (ref tpcQos, null);
qosProvider.GetSubscriberQos (ref subQos, null);
qosProvider.GetDataReaderQos (ref rdrQos, null);
qosProvider.GetPublisherQos (ref pubQos, null);
qosProvider.GetDataWriterQos (ref wrtQos, null);
See also
QoS Provider extensive information.

Definition at line 69 of file QosProvider.cs.

Constructor & Destructor Documentation

◆ QosProvider()

DDS.QosProvider.QosProvider ( string  uri,
string  profile 
)
inline

Constructs a new QosProvider based on the provided uri and profile.

A QosProvider instance that is instantiated with all profiles and/or QoS’s loaded from the location specified by the provided uri.

Initialization of the QosProvider will fail under the following conditions:

  • No uri is provided.
  • The resource pointed to by uri cannot be found.
  • The content of the resource pointed to by uri is malformed (e.g., malformed XML). When initialization fails (for example, due to a parse error or when the resource identified by uri cannot be found), then System.NullReferenceException will be thrown.

Look here for more information.

Parameters
uriA Uniform Resource Identifier (URI) that points to the location where the QoS profile needs to be loaded from. Currently only URI’s with a ‘file’ scheme that point to an XML file are supported. If profiles and/or QoS settings are not uniquely identifiable by name within the resource pointed to by uri, a random one of them will be stored.
profileThe name of the QoS profile within the xml file that serves as the default QoS profile for the get qos operations.
Returns
New initialized QosProvider

Definition at line 136 of file QosProvider.cs.

Member Function Documentation

◆ GetDataReaderQos()

ReturnCode DDS.QosProvider.GetDataReaderQos ( ref DataReaderQos  datareaderQos,
string  id 
)
inline

Resolves the DataReaderQos identified by the id from the uri this QosProvider is associated with.

Parameters
datareaderQosReference to a DataReaderQos that will be set with the DataReaderQos from the given URI (and profile) using the id.
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance.
When id is null, it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
Return codes are:

Definition at line 353 of file QosProvider.cs.

◆ GetDataWriterQos()

ReturnCode DDS.QosProvider.GetDataWriterQos ( ref DataWriterQos  datawriterQos,
string  id 
)
inline

Resolves the DataWriterQos identified by the id from the uri this QosProvider is associated with.

Parameters
datawriterQosReference to a DataWriterQos that will be set with the DataWriterQos from the given URI (and profile) using the id.
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance.
When id is null, it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
Return codes are:

Definition at line 443 of file QosProvider.cs.

◆ GetParticipantQos()

ReturnCode DDS.QosProvider.GetParticipantQos ( ref DomainParticipantQos  participantQos,
string  id 
)
inline

Resolves the DomainParticipantQos identified by the id from the uri this QosProvider is associated with.

Parameters
participantQosReference to a DomainParticipantQos that will be set with the DomainParticipantQos from the given URI (and profile) using the id.
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance.
When id is null, it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
Return codes are:

Definition at line 221 of file QosProvider.cs.

◆ GetPublisherQos()

ReturnCode DDS.QosProvider.GetPublisherQos ( ref PublisherQos  publisherQos,
string  id 
)
inline

Resolves the PublisherQos identified by the id from the uri this QosProvider is associated with.

Parameters
publisherQosReference to a PublisherQos that will be set with the PublisherQos from the given URI (and profile) using the id.
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance.
When id is null, it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
Return codes are:

Definition at line 398 of file QosProvider.cs.

◆ GetSubscriberQos()

ReturnCode DDS.QosProvider.GetSubscriberQos ( ref SubscriberQos  subscriberQos,
string  id 
)
inline

Resolves the SubscriberQos identified by the id from the uri this QosProvider is associated with.

Parameters
subscriberQosReference to a SubscriberQos that will be set with the SubscriberQos from the given URI (and profile) using the id.
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance.
When id is null, it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
Return codes are:

Definition at line 309 of file QosProvider.cs.

◆ GetTopicQos()

ReturnCode DDS.QosProvider.GetTopicQos ( ref TopicQos  topicQos,
string  id 
)
inline

Resolves the TopicQos identified by the id from the uri this QosProvider is associated with.

Parameters
topicQosReference to a TopicQos that will be set with the TopicQos from the given URI (and profile) using the id.
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance.
When id is null, it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
Return codes are:

Definition at line 265 of file QosProvider.cs.


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