Disabling multicast after setting it from reading xml qos file

2 posts / 0 new
Last post
Offline
Last seen: 2 years 6 months ago
Joined: 08/09/2017
Posts: 3
Disabling multicast after setting it from reading xml qos file

Is it possible turn off multicast after reading in a qos file that has it set? I am reading in a qos file using this:

 

 retcode = dds_factory->get_participant_qos_from_profile(interfaceDomainParticipantQos, "Definitions", "common");

 

where this profile has it set. But then try to unset multicast_enable:

 

retcode = DDSPropertyQosPolicyHelper::add_property( interfaceDomainParticipantQos.property,
"dds.transport.UDPv4.builtin.multicast_enabled", "0",
DDS_BOOLEAN_FALSE);

 

But getting a return code of 4 which is PRECONDITION_NOT_MET

 

Is this not allowed? Is there some other step to doing it this way? Can this only be done when getting a default qos?

Keywords:
matt's picture
Offline
Last seen: 1 week 6 days ago
Joined: 09/29/2020
Posts: 2

Hi Michael,

Any transport property changes made after the plugin is registered will have no effect.

Reference: Builtin Transport Plugins in the Core Libraries User's Manual.

Builtin transports that are turned "on" in the 9.5.7 TRANSPORT_BUILTIN QosPolicy (DDS Extension) are implicitly registered when (a) the DomainParticipant is enabled, (b) the first DataWriter/DataReader is created, or (c) you look up a builtin DataReader (by calling lookup_datareader() on a Subscriber), whichever happens first. The builtin transport plugins have default properties. If you want to change these properties, do so before the transports are registered.

Regards,

Matt