The ignore_participant() operation allows an application to ignore all communication from a specific DomainParticipant. Or for even finer control you can use the ignore_publication(), ignore_subscription(), and ignore_topic() operations. These operations are described below.
DDS_ReturnCode_t ignore_participant (const DDS_InstanceHandle_t &handle) DDS_ReturnCode_t ignore_publication (const DDS_InstanceHandle_t &handle) DDS_ReturnCode_t ignore_subscription (const DDS_InstanceHandle_t &handle) DDS_ReturnCode_t ignore_topic (const DDS_InstanceHandle_t &handle)
The entity to ignore is identified by the handle argument. It may be a local or remote entity. For ignore_publication(), the handle will be that of a local DataWriter or a discovered remote DataWriter. For ignore_subscription(), that handle will be that of a local DataReader or a discovered remote DataReader.
The safest approach for ignoring an entity is to call the ignore operation within the Listener callback of the built-in reader, or before any local entities are enabled. This will guarantee that the local entities (entities that are created by the local DomainParticipant) will never have a chance to establish communication with the remote entities (entities that are created by another DomainParticipant) that are going to be ignored.
If the above is not possible and a remote entity is to be ignored after the communication channel has been established, the remote entity will still be removed from the database of the local application as if it never existed. However, since the remote application is not aware that the entity is being ignored, it may potentially be expecting to receive messages or continuing to send messages. Depending on the QoS of the remote entity, this may affect the behavior of the remote application and may potentially stop the remote application from communicating with other entities.
You can use this operation in conjunction with the ParticipantBuiltinTopicData to implement access control. You can pass application data associated with a DomainParticipant in the USER_DATA QosPolicy. This application data is propagated as a field in the built-in topic. Your application can use the data to implement an access control policy.
Ignore operations, in conjunction with the Built-in Topic Data, can be used to implement access control. You can pass data associated with an entity in the USER_DATA QosPolicy, GROUP_DATA QosPolicy or TOPIC_DATA QosPolicy. This data is propagated as a field in the built-in topic. When data for a built-in topic is received, the application can check the user_data, group_data or topic_data field of the remote entity, determine if it meets the security requirement, and ignore the remote entity if necessary.
See also: Discovery.
© 2018 RTI