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

Handle missing PID_PARTICIPANT_GUID for readers and writers [9296] #1382

Merged
merged 4 commits into from
Sep 11, 2020

Conversation

MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Sep 10, 2020

When receiving EDP information of writers and readers, their participant key can be directly obtained from PID_ENDPOINT_GUID.

This PR ignores PID_PARTICIPANT_GUID on them.

Related to #1380

Signed-off-by: Miguel Company MiguelCompany@eprosima.com

@richiware
Copy link
Member

Build status:

  • Linux Build Status
  • Mac Build Status
  • Windows Build Status

Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (at least this is confirmed #1380 (comment))

and DDSI-RTPS v2.3

For optimization, implementations of the protocol shall not include a parameter in the Data submessage if it contains information that is redundant with other parameters already present in that same Data submessage. As a result of this optimization an implementation shall omit the serialization of the parameters listed in Table
9.10.

@MiguelCompany MiguelCompany changed the title Ignore PID_PARTICIPANT_GUID for readers and writers. Handle missing PID_PARTICIPANT_GUID for readers and writers. Sep 11, 2020
@MiguelCompany
Copy link
Member Author

Reading DDSI-RTPS v2.3 once more, I am interpreting it the following way:

Section 9.6.2.2 indicates that DiscoveredWriterData is defined with the following IDL:

struct DiscoveredWriterData {
 DDS::PublicationBuiltinTopicData ddsPublicationData;
 WriterProxy mWriterProxy;
};

It then says on Table 9.10 that WriterProxy::remoteWriterGuid does not need to be serialized, as it can be obtained from PublicationBuiltinTopicData::key

Mapping of PID_PARTICIPANT_GUID is specified later on Table 9.14 - ParameterId mapping and default values

image

This means that field PublicationBuiltinTopicData::participant_key from the DDS v1.4 standard is serialized using PID_PARTICIPANT_GUID. On the default value it says N/A, meaning there is no default value for it, so it should always be sent.

I have modified this PR to handle the case of a missing PID_PARTICIPANT_GUID and in that case default it to using the GUID prefix coming on PID_ENDPOINT_GUID and the default participant entity id

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Will take participant key from PID_ENDPINT_GUID when not.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@MiguelCompany MiguelCompany changed the title Handle missing PID_PARTICIPANT_GUID for readers and writers. Handle missing PID_PARTICIPANT_GUID for readers and writers [9296] Sep 11, 2020
Copy link
Contributor

@IkerLuengo IkerLuengo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richiware
Copy link
Member

Build status:

  • Linux Build Status
  • Mac Build Status
  • Windows Build Status

@MiguelCompany MiguelCompany merged commit 21946a7 into 2.0.x Sep 11, 2020
@MiguelCompany MiguelCompany deleted the bugfix/participant-guid/2.0.x branch September 11, 2020 11:09
@fujitatomoya
Copy link
Contributor

@MiguelCompany @richiware @IkerLuengo

appreciate for the time in such short notice 😄

MiguelCompany added a commit that referenced this pull request Sep 14, 2020
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request Sep 14, 2020
* Handle missing PID_PARTICIPANT_GUID for readers and writers (#1382)

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Leave correct default values on WriterQos::clear (#1384)

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 9302. Uncrustify.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants