You are here: Part 3: Advanced Concepts > Discovery > Ports Used for Discovery > Tuning domain_id_gain and participant_id_gain

Tuning domain_id_gain and participant_id_gain

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.

 

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.

© 2016 RTI