52.10.1 Transport Locators

This section provides information about the format of the locators associated with the Real-Time WAN Transport. For general information about RTPS locators, see Chapter 26 Discovered RTPS Locators and Changes with IP Mobility.

An RTPS locator is an address at which a DDS endpoint (DataWriter or DataReader) can be reached. Default locators for discovery endpoints and user data endpoints are exchanged with the Participant Announcement (PA).

An RTPS locator consists of a transport Class ID, an address of 128 bits, and a logical port called the RTPS port, as shown in Figure 52.16: RTPS Locator.

Figure 52.16: RTPS Locator

0

 

8

16

24

31

DDS_Long class_id

DDS_UnsignedLong rtps_port

DDS_Octet address[16]

The locators for Real-Time WAN Transport use the following mapping:

Figure 52.17: RTPS WAN Locator

0

 

8

16

24

31

DDS_Long class_id

DDS_UnsignedLong rtps_port

Flags

 

DDS_Octet UUID[9]

 

public_port

DDS_Octet public_ip_address[4]

Flags has the following format: x|x|x|x|x|B|P|U

The B flag indicates whether the locator is unidirectional or bidirectional. Bidirectional locators can send/receive RTPS traffic. Unidirectional locators can only receive RTPS traffic. If the B flag is set, the P flag must be set, too. Locators with the B flag set are called BIDIRECTIONAL locators.

The P flag indicates that the locator contains a public IP address and public port where a DDS endpoint can be reached. public_ip_address contains the public IP address, and public_port contains the public UDP port. The public UDP port is always used to receive data, and, if the B flag is set, it is also used to send data. Locators with the P flag set are called PUBLIC locators.

The U flag indicates whether the locator contains a UUID. While this identifier by itself cannot be directly used to reach a DDS endpoint in a DomainParticipant DP1, the UUID can be mapped to a public address by Cloud Discovery Service and other DomainParticipants. Also, a locator can have both the U flag and the P flag, enabled simultaneously. Locators with the U flag set are called UUID locators.

A PUBLIC+UUID locator is a locator in which both the U flag and P flag are set.

Initial peers locators will have the B and P flags set and the U flag unset.

The U flag will be set for locators generated automatically by a DomainParticipant.

The P flag will be automatically set for locators generated for a transport that is configured using the property dds.transport.UDPv4_WAN.builtin.public_address. The flag will be also be set by Cloud Discovery Service when generating locators that contain the service reflexive address for a UUID locator.