The domain_id_gain is used as a multiplier of the domain ID. Together with participant_id_gain (Tuning domain_id_gain and participant_id_gain), these values determine the highest domain ID and participant_id allowed on this network.
In general, there are two ways to set up the domain_id_gain and participant_id_gain parameters.
(port_base + (domain_id_gain * Domain ID))
and:
(port_base + (domain_id_gain * (Domain ID + 1)) - 1)
In this case, the highest domain ID is limited only by the underlying transport's maximum port. The highest participant_id, however, must satisfy:
max_participant_id < (domain_id_gain / participant_id_gain)
Mapped Port |
Domain ID |
Participant ID |
higher port number |
1 |
2 |
0 |
||
1 |
1 |
|
0 |
||
1 |
0 |
|
lower port number |
0 |
In this case, the highest participant_id is limited only by the underlying transport's maximum port. The highest domain_id, however, must satisfy:
max_domain_id < (participant_id_gain / domain_id_gain)
The domain_id_gain also determines the range of the port-specific offsets:
domain_id_gain >
abs(builtin_multicast_port_offset - user_multicast_port_offset)
and
domain_id_gain >
abs(builtin_unicast_port_offset - user_unicast_port_offset)
Violating this may result in port aliasing and undefined discovery behavior.
The participant_id_gain also determines the range of builtin_unicast_port_offset and user_unicast_port_offset.
participant_id_gain >
abs(builtin_unicast_port_offset - user_unicast_port_offset)
In all cases, the resulting ports must be within the range imposed by the underlying transport.
© 2015 RTI