Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19038] Endpoint configurable ignore_local_endpoints feature #518

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,13 +778,31 @@ void dds_domain_examples()
}

{
// IGNORE_LOCAL_ENDPOINTS_DOMAINPARTICIPANT
// IGNORE_LOCAL_ENDPOINTS
// DomainParticipant level: every local endpoint is not matched with
// any other local endpoint.
DomainParticipantQos participant_qos;

// Avoid local matching of this participant's endpoints
participant_qos.properties().properties().emplace_back(
"fastdds.ignore_local_endpoints",
"true");

// Endpoint level: DataWriter ignores any other local endpoint
DataWriterQos datawriter_qos;

// Avoid local matching with any other local endpoint
datawriter_qos.properties().properties().emplace_back(
"fastdds.ignore_local_endpoints",
"true");

// Endpoint level: DataReader ignores any other local endpoint
DataReaderQos datareader_qos;

// Avoid local matching with any other local endpoint
datareader_qos.properties().properties().emplace_back(
"fastdds.ignore_local_endpoints",
"true");
//!--
}
}
Expand Down
27 changes: 26 additions & 1 deletion code/XMLTester.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,7 @@
</data_writer>
<!--><-->

<!-->IGNORE_LOCAL_ENDPOINTS_DOMAINPARTICIPANT<-->
<!-->IGNORE_LOCAL_ENDPOINTS<-->
<!--
<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
Expand All @@ -2606,6 +2606,31 @@
</propertiesPolicy>
</rtps>
</participant>

<data_writer profile_name="ignore_local_endpoints_datawriter_xml_profile">
<propertiesPolicy>
<properties>
<!-- Avoid local matching with any other local DataReader in the participant -->
<property>
<name>fastdds.ignore_local_endpoints</name>
<value>true</value>
</property>
</properties>
</propertiesPolicy>
</data_writer>

<data_reader profile_name="ignore_local_endpoints_datareader_xml_profile">
<propertiesPolicy>
<properties>
<!-- Avoid local matching with any other local DataWriter in the participant -->
<property>
<name>fastdds.ignore_local_endpoints</name>
<value>true</value>
</property>
</properties>
</propertiesPolicy>
</data_reader>

<!--
</profiles>
</dds>
Expand Down
18 changes: 14 additions & 4 deletions docs/fastdds/property_policies/ignore_local_endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ from a |DataWriter| belonging to the same |DomainParticipant| on the |DataReader
|GuidPrefix_t-api|), this entails for a data sample to go all the way to the |DataReaderListener| just to be discarded
by an overcomplicated application business logic.
For this reason, Fast DDS offers the possibility of instructing the |DomainParticipant| to avoid the matching of local
endpoints through the following property:
endpoints through the PropertyPolicyQos.
The property can be configured both at the DomainParticipant level as at the endpoint level:

* When configured in the DomainParticipant, no local endpoint will be matched.
* When configured in a specific endpoint, that specific endpoint will not be matched with any local one, but any other
EduPonz marked this conversation as resolved.
Show resolved Hide resolved
local endpoint will be, unless trying to match with an endpoint with the property set.

.. note::

If the property is set at both the DomainParticipant and endpoint level, the DomainParticipant configuration takes
precedence as it is more restrictive.

.. list-table::
:header-rows: 1
Expand All @@ -34,17 +44,17 @@ endpoints through the following property:

.. literalinclude:: /../code/DDSCodeTester.cpp
:language: c++
:start-after: // IGNORE_LOCAL_ENDPOINTS_DOMAINPARTICIPANT
:start-after: // IGNORE_LOCAL_ENDPOINTS
:end-before: //!--
:dedent: 8

.. tab:: XML

.. literalinclude:: /../code/XMLTester.xml
:language: xml
:start-after: <!-->IGNORE_LOCAL_ENDPOINTS_DOMAINPARTICIPANT<-->
:start-after: <!-->IGNORE_LOCAL_ENDPOINTS<-->
:end-before: <!--><-->
:lines: 2-4,6-18,20-21
:lines: 2-4,6-41,43-44

.. note::
An invalid value of ``fastdds.ignore_local_endpoints`` results in the default behaviour.