RTPS locator port calculation
Locator used for discovery traffic
Discovery traffic is the traffic generated by the Participant and Endpoint Discovery Protocols(SPDP and SEDP). Discovery traffic is the traffic exchanged between the built-in topics. [1][2][3]
Ports used by the built-in endpoints
traffic type | default port number expression |
---|---|
Multicast | |
Unicast | |
where: |
domain_id
: domain identifierparticipant_id
: participant identifier- PB, DG, d0 and d1: tunable parameters
- PB: port base number (default: 7400)
- DG: domain gain (default: 250)
- d0: additional offsets (default: 0)
- d1: additional offsets (default: 10)
The domain_id and participant_id are used to avoid conflicts among Participants
on the same node. Each Participant
on the same node and in the same domain must use a unique participant_id.
Locator used for user traffic
User traffic is the traffic exchanged between user-defined endpoints (e.g. non built-in endpoints).
Ports used by the user-defined endpoints
traffic type | default port number expression |
---|---|
Multicast | |
Unicast | |
where: |
domain_id
: domain identifierparticipant_id
: participant identifier- PB, DG, d0 and d1: tunable parameters
- PB: port base number (default: 7400)
- DG: domain gain (default: 250)
- d1: additional offsets (default: 1)
- d3: additional offsets (default: 11)
Given UDP port numbers are limited to 64K, the above default enables the use of about 230 domains with up to 120 participants per node per domain.