How do I set the multicast_receive_addresses when using rtiddsping and rtiddsspy?
Note: Applies to RTI Data Distribution Service 4.3x and above,
Both rtiddsping and rtiddsspy can be configured to use multicast for discovery announcements by specifying a multicast address as part of the initial peer list (using -preer <PEER>
).
However, rtiddsping and rtiddsspy do not have command-line options to modify multicast_receive_addresses
(this is a known issue, RTI bug # 12462). As a result, rtiddsping and rtiddsspy always use the default multicast address, 239.255.0.1.
In version 4.4b and higher, there is a workaround to this problem. You can use the attribute, is_default_qos
, in a <qos_profile>
tag to overwrite the default QoS values, including multicast_receive_addresses
. For example:
<dds> <qos_library name="foo_Library"> <qos_profile name="foo_Profile" is_default_qos="true"> <!-- QoS to configure data writer created in the example code --> <participant_qos> <discovery> <initial_peers> <element>shmem://</element> <element>builtin.udpv4://127.0.0.1</element> <!-- NEW, non-default multicast --> <element>239.255.1.2</element> </initial_peers> <multicast_receive_addresses> <!-- NEW, non-default multicast receive address --> <element>239.255.1.2</element> </multicast_receive_addresses> </discovery> </participant_qos> </qos_profile> </qos_library> </dds>