(Note: in the Modern C++ API FlowControllers have reference semantics, see Creating and Deleting Entities)
If you do not want to use one of the three built-in FlowControllers described in FlowControllers (DDS Extension), you can create your own with the DomainParticipant’s create_flowcontroller() operation:
DDSFlowController* create_flowcontroller
(const char * name,
const DDS_FlowControllerProperty_t & property)
To associate a FlowController with a DataWriter, you set the FlowController’s name in the PUBLISH_MODE QosPolicy (DDS Extension) (flow_controller_name).
A single FlowController may service multiple DataWriters, even if they belong to a different Publisher. The FlowController’s property structure determines how the FlowController shapes the network traffic.
name | Name of the FlowController to create. A DataWriter is associated with a DDSFlowController by name. Limited to 255 characters. |
property | Properties to be used for creating the FlowController. The special value DDS_FLOW_CONTROLLER_PROPERTY_DEFAULT can be used to indicate that the FlowController should be created with the default DDS_FlowControllerProperty_t set in the DomainParticipant. |
Note: If you use DDS_FLOW_CONTROLLER_PROPERTY_DEFAULT, it is not safe to create the FlowController while another thread may be simultaneously calling set_default_flowcontroller_property() or looking for that FlowController with lookup_flowcontroller().
To delete an existing FlowController, use the DomainParticipant’s delete_flowcontroller() operation:
DDS_ReturnCode_t delete_flowcontroller (DDSFlowController * fc)
The FlowController must belong this the DomainParticipant and not have any attached DataWriters or the delete call will return an error (PRECONDITION_NOT_MET).
© 2015 RTI