RTI Connext Traditional C++ API
Version 6.1.2
|
Specifies the wire-protocol-related attributes for the DDSDomainParticipant. More...
Public Attributes | |
DDS_Long | participant_id |
A value used to distinguish among different participants belonging to the same domain on the same host. More... | |
DDS_UnsignedLong | rtps_host_id |
The RTPS Host ID of the domain participant. More... | |
DDS_UnsignedLong | rtps_app_id |
The RTPS App ID of the domain participant. More... | |
DDS_UnsignedLong | rtps_instance_id |
The RTPS Instance ID of the DDSDomainParticipant. More... | |
struct DDS_RtpsWellKnownPorts_t | rtps_well_known_ports |
Configures the RTPS well-known port mappings. More... | |
DDS_RtpsReservedPortKindMask | rtps_reserved_port_mask |
Specifies which well-known ports to reserve when enabling the participant. More... | |
DDS_WireProtocolQosPolicyAutoKind | rtps_auto_id_kind |
Kind of auto mechanism used to calculate the GUID prefix. More... | |
DDS_Boolean | compute_crc |
Adds RTPS CRC submessage to every message when this field is set to DDS_BOOLEAN_TRUE. More... | |
DDS_Boolean | check_crc |
Checks if the received RTPS message is valid by comparing the computed CRC with the received RTPS CRC submessage when this field is set to DDS_BOOLEAN_TRUE. More... | |
Specifies the wire-protocol-related attributes for the DDSDomainParticipant.
This QoS policy configures some participant-wide properties of the DDS Real-Time Publish Subscribe (RTPS) on-the-wire protocol. (DDS_DataWriterProtocolQosPolicy and DDS_DataReaderProtocolQosPolicy configure RTPS and reliability properties on a per DDSDataWriter or DDSDataReader basis.)
NOTE: The default QoS policies returned by RTI Connext contain the correctly initialized wire protocol attributes. The defaults are not normally expected to be modified, but are available to the advanced user customizing the implementation behavior.
The default values should not be modified without an understanding of the underlying Real-Time Publish Subscribe (RTPS) wire protocol.
In order for the discovery process to work correctly, each DDSDomainParticipant must have a unique identifier. This QoS policy specifies how that identifier should be generated.
RTPS defines a 96-bit prefix to this identifier; each DDSDomainParticipant must have a unique value for this prefix relative to all other participants in its domain.
If an application dies unexpectedly and is restarted, the IDs used by the new instance of DomainParticipants should be different than the ones used by the previous instances. A change in these values allows other DomainParticipants to know that they are communicating with a new instance of an application, and not the previous instance.
For legacy reasons, RTI Connext divides the 96-bit prefix into three integers:
The DDS_WireProtocolQosPolicy::rtps_auto_id_kind field can be used to configure the algorithm that RTI Connext uses to populate the 96-bit prefix. Then you can optionally overwrite specific parts of the 96-bit prefix by explicitly configuring the DDS_WireProtocolQosPolicy::rtps_host_id (first integer), DDS_WireProtocolQosPolicy::rtps_app_id (second integer), and DDS_WireProtocolQosPolicy::rtps_instance_id (third integer).
The DDS_WireProtocolQosPolicy::rtps_auto_id_kind field supports three different prefix generation algorithms:
(Legacy) When rtps_auto_id_kind is set to DDS_RTPS_AUTO_ID_FROM_MAC, the 96-bit prefix is generated as follows:
DDS_RTPS_AUTO_ID_FROM_IP is not a good algorithm to guarantee prefix uniqueness, because the process ID can be recycled by the OSs.
Some examples are provided to clarify the behavior of this QoSPolicy in case you want to change the default behavior with DDS_RTPS_AUTO_ID_FROM_MAC.
First, get the participant QoS from the DomainParticipantFactory:
Second, change the DDS_WireProtocolQosPolicy using one of the options shown below.
Third, create the DDSDomainParticipant as usual, using the modified QoS structure instead of the default one.
Option 1: Use DDS_RTPS_AUTO_ID_FROM_MAC to explicitly set just the application/task identifier portion of the rtps_instance_id field.
Option 2: Handle only the per participant counter and let RTI Connext handle the application/task identifier:
Option 3: Handle the entire rtps_instance_id field yourself:
NOTE: If you are using DDS_RTPS_AUTO_ID_FROM_MAC as rtps_auto_id_kind and you decide to manually handle the rtps_instance_id field, you must ensure that both parts are non-zero (otherwise RTI Connext will take responsibility for them). RTI recommends that you always specify the two parts separately in order to avoid errors.
Option 4: Let RTI Connext handle the entire rtps_instance_id field:
NOTE: If you are using DDS_RTPS_AUTO_ID_FROM_MAC as rtps_auto_id_kind and you decide to manually handle the rtps_instance_id field, you must ensure that both parts are non-zero (otherwise RTI Connext will take responsibility for them). RTI recommends that you always specify the two parts separately in order to clearly show the difference.
DDS_Long DDS_WireProtocolQosPolicy::participant_id |
A value used to distinguish among different participants belonging to the same domain on the same host.
Determines the unicast port on which meta-traffic is received. Also defines the default unicast port for receiving user-traffic for DataReaders and DataWriters (can be overridden by the DDS_DataReaderQos::unicast or DDS_DataWriterQos::unicast).
For more information on port mapping, please refer to DDS_RtpsWellKnownPorts_t.
Each DDSDomainParticipant in the same domain and running on the same host, must have a unique participant_id
. The participants may be in the same address space or in distinct address spaces.
A negative number (-1) means that RTI Connext will automatically resolve the participant ID as follows.
[default] -1 [automatic], i.e. RTI Connext will automatically pick the participant_id
, as described above.
[range] [>= 0], or -1, and does not violate guidelines stated in DDS_RtpsWellKnownPorts_t.
DDS_UnsignedLong DDS_WireProtocolQosPolicy::rtps_host_id |
The RTPS Host ID of the domain participant.
A specific host ID that is unique in the domain.
[default] DDS_RTPS_AUTO_ID. The default value is interpreted as follows:
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_IP, the value will be interpreted as the IPv4 address of the first up and running interface of the host machine.
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_MAC, the value will be interpreted as the first 32 bits of the MAC address assigned to the first up and running interface of the host machine.
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_UUID, the value will be the first 32 bits of the GUID prefix assigned by the UUID algorithm.
[range] [0,0xffffffff]
DDS_UnsignedLong DDS_WireProtocolQosPolicy::rtps_app_id |
The RTPS App ID of the domain participant.
A participant specific ID that, together with the rtps_instance_id, is unique within the scope of the rtps_host_id.
If a participant dies and is restarted, it is recommended that it be given an app ID that is distinct from the previous one so that other participants in the domain can distinguish between them.
[default] DDS_RTPS_AUTO_ID. The default value is interpreted as follows:
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_IP the value will be the process (or task) ID.
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_MAC the value will be the last 32 bits of the MAC address assigned to the first up and running interface of the host machine.
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_UUID, the value will be the middle 32 bits of the GUID prefix assigned by the UUID algorithm.
[range] [0,0xffffffff]
DDS_UnsignedLong DDS_WireProtocolQosPolicy::rtps_instance_id |
The RTPS Instance ID of the DDSDomainParticipant.
This is an instance-specific ID of a participant that, together with the rtps_app_id, is unique within the scope of the rtps_host_id.
If a participant dies and is restarted, it is recommended that it be given an instance ID that is distinct from the previous one so that other participants in the domain can distinguish between them.
[default] DDS_RTPS_AUTO_ID. The default value is interpreted as follows:
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_IP, a counter is assigned that is incremented per new participant. For VxWorks-653, the first 8 bits are assigned to the partition id for the application.
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_MAC, the first 24 bits are assigned to the application/task identifier and the last 8 bits are assigned to a counter that is incremented per new paricipant.
If DDS_WireProtocolQosPolicy::rtps_auto_id_kind is equal to DDS_RTPS_AUTO_ID_FROM_UUID, the value will be the last 32 bits of the GUID prefix assigned by the UUID algorithm.
[range] [0,0xffffffff] NOTE: If you use DDS_RTPS_AUTO_ID_FROM_MAC as rtps_auto_id_kind and you decide to manually handle the rtps_instance_id field, you must ensure that both the two parts are non-zero, otherwise the middleware will take responsibility for them. We recommend that you always specify the two parts separately in order to avoid errors. (examples)
struct DDS_RtpsWellKnownPorts_t DDS_WireProtocolQosPolicy::rtps_well_known_ports |
Configures the RTPS well-known port mappings.
Determines the well-known multicast and unicast port mappings for discovery (meta) traffic and user traffic.
[default] DDS_INTEROPERABLE_RTPS_WELL_KNOWN_PORTS
DDS_RtpsReservedPortKindMask DDS_WireProtocolQosPolicy::rtps_reserved_port_mask |
Specifies which well-known ports to reserve when enabling the participant.
Specifies which of the well-known multicast and unicast ports will be reserved when the DomainParticipant is enabled. Failure to allocate a port that is computed based on the DDS_RtpsWellKnownPorts_t will be detected at this time, and the enable operation will fail.
[default] DDS_RTPS_RESERVED_PORT_MASK_DEFAULT
DDS_WireProtocolQosPolicyAutoKind DDS_WireProtocolQosPolicy::rtps_auto_id_kind |
Kind of auto mechanism used to calculate the GUID prefix.
[default] DDS_RTPS_AUTO_ID_FROM_UUID
DDS_Boolean DDS_WireProtocolQosPolicy::compute_crc |
Adds RTPS CRC submessage to every message when this field is set to DDS_BOOLEAN_TRUE.
The computed CRC covers the entire RTPS message excluding the RTPS header.
[default] DDS_BOOLEAN_FALSE
DDS_Boolean DDS_WireProtocolQosPolicy::check_crc |
Checks if the received RTPS message is valid by comparing the computed CRC with the received RTPS CRC submessage when this field is set to DDS_BOOLEAN_TRUE.
DDS_WireProtocolQosPolicy::compute_crc must be enabled at the publishing application for validating the message at the subscribing application.
[default] DDS_BOOLEAN_FALSE