![]() |
OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
This page provides information on using the QoS provider API of OpenSpliceDDS. The QoS provider API allows users to specify the QoS settings of their DCPS entities outside of application code in XML. This can be seen as a useful feature where code recompilation is restricted during the later stages of application development / during application support. The following sections explain the API in a language independent manner and explain how to build QoS Profiles in XML.
The QosProvider is delivered as part of the DCPS API of OpenSpliceDDS and has no factory. It is created as an object directly by the natural means in each language binding. This is because it is not necessarily associated with a single DomainParticipant. Below you'll find a link to the available operations, which are explained in detail there.
ISOCPP2 QosProvider API
The XML configuration file must follow these syntax rules:
<>
; closing tags are enclosed in </>
.Please also see: OMG DDS4CCM specification for more details on the exact notation.
The primitive types for tag values are specified in the following table:
Type | Format | Notes |
---|---|---|
Boolean | yes, 1, true or BOOLEAN_TRUE | Not case-sensitive |
no, 0, false or BOOLEAN_FALSE | ||
Enum | A string. Legal values are the ones defined for QoS Policies in the DCPS IDL of DDS specification. | Must be specified as a string. (Do not use numeric values.) |
Long | -2147483648 to 2147483647 or 0x80000000 to 0x7fffffff or LENGTH_UNLIMITED | A 32-bit signed integer |
UnsignedLong | 0 to 4294967296 or 0 to 0xffffffff | A 32-bit unsigned integer |
To configure the QoS for a DDS Entity using XML, the following tags have to be used:
<domainparticipant_qos>
<publisher_qos>
<subscriber_qos>
<topic_qos>
<datawriter_qos>
<datareader_qos>
Each XML tag with an associated name can be uniquely identified by its fully qualified name in C++ style.
The fields in a QosPolicy are described in XML using a 1-to-1 mapping with the equivalent IDL representation in the DDS specification. For example, the Reliability QosPolicy is represented with the following structures:
The equivalent representation in XML is as follows:
In general, the sequences contained in the QoS policies are described with the following XML format:
Each element of the sequence is enclosed in an <element>
tag., as shown in the following example:
A sequence without elements represents a sequence of length 0. For example: <a_sequence_member_name/>
As a special case, sequences of octets are represented with a single XML tag enclosing a sequence of decimal/hexadecimal values between 0..255 separated with commas. For example:
In general, the arrays contained in the QoS policies are described with the following XML format:
Each element of the array is enclosed in an <element>
tag. As a special case, arrays of octets are represented with a single XML tag enclosing an array of decimal/hexadecimal values between 0..255 separated with commas. For example:
Enumeration values are represented using their IDL string representation. For example:
Following values can be used for fields that require seconds or nanoseconds:
The following example shows the use of time values:
A QoS profile groups a set of related QoS, usually one per entity. For example:
QoS Profiles with a Single QoS
The definition of an individual QoS is a shortcut for defining a QoS profile with a single QoS. For example:
is equivalent to the following:
consider the following XML file that describes two QoS profiles;
The following ISOCPP2 application is an example to illustrate how the QoS settings from the above XML could be accessed.