RTPS also defines the default multicast and unicast ports on which DataReaders and DataWriters receive user traffic. These default ports can be overridden using the DataReader’s TRANSPORT_MULTICAST QosPolicy (DDS Extension) and TRANSPORT_UNICAST QosPolicy (DDS Extension), or the DataWriter’s TRANSPORT_UNICAST QosPolicy (DDS Extension).
The WireProtocol QosPolicy’s rtps_well_known_ports.usertraffic_unicast_port determines the port used for receiving user data using unicast:
usertraffic_unicast_port = port_base +
(domain_id_gain * Domain ID) +
(participant_id_gain * participant_id)+
user_unicast_port_offset
Similarly, rtps_well_known_ports.usertraffic_multicast_port determines the port used for receiving user data using multicast. The corresponding multicast group addresses can be configured using the TRANSPORT_UNICAST QosPolicy (DDS Extension).
usertraffic_multicast_port = port_base + (domain_id_gain * Domain ID) +
user_multicast_port_offset
© 2017 RTI