Skip to content

Commit

Permalink
Set DataSharing in Writer|ReaderProxyData (#4761)
Browse files Browse the repository at this point in the history
* Refs #20933: Set datasharing on when pid is found

Signed-off-by: elianalf <[email protected]>

* Refs #20933: Set datasharing off after the clear

Signed-off-by: elianalf <[email protected]>

* Refs #20933: Add tests

Signed-off-by: elianalf <[email protected]>

* Refs #20933: Fix other_vendor_parameter_list_with_custom_pids test

Signed-off-by: elianalf <[email protected]>

* Refs #20933: Change implementation to fix failing tests

Signed-off-by: elianalf <[email protected]>

* Refs #20933: Apply suggestions

Signed-off-by: elianalf <[email protected]>

---------

Signed-off-by: elianalf <[email protected]>
(cherry picked from commit 904c523)

# Conflicts:
#	test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp
  • Loading branch information
elianalf authored and mergify[bot] committed May 17, 2024
1 parent f8d09ba commit fcd6e76
Show file tree
Hide file tree
Showing 4 changed files with 540 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/fastdds/core/policy/QosPoliciesSerializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ inline bool QosPoliciesSerializer<DataSharingQosPolicy>::read_content_from_cdr_m
uint32_t pos_ref = cdr_message->pos;

// If the parameter is sent, the remote endpoint is datasharing compatible
qos_policy.automatic();
qos_policy.on(".");

uint32_t num_domains = 0;
bool valid = fastrtps::rtps::CDRMessage::readUInt32(cdr_message, &num_domains);
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/builtin/data/ReaderProxyData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ bool ReaderProxyData::readFromCDRMessage(
"Received with error.");
return false;
}

break;
}

Expand All @@ -1008,6 +1009,7 @@ bool ReaderProxyData::readFromCDRMessage(

uint32_t qos_size;
clear();
m_qos.data_sharing.off();
try
{
if (ParameterList::readParameterListfromCDRMsg(*msg, param_process, true, qos_size))
Expand Down
1 change: 1 addition & 0 deletions src/cpp/rtps/builtin/data/WriterProxyData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ bool WriterProxyData::readFromCDRMessage(

uint32_t qos_size;
clear();
m_qos.data_sharing.off();
try
{
if (ParameterList::readParameterListfromCDRMsg(*msg, param_process, true, qos_size))
Expand Down
Loading

0 comments on commit fcd6e76

Please sign in to comment.