Skip to content

Commit

Permalink
Fix basic request reply mapping for ConnextDDS Pro
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Wecht <cwecht@mailbox.org>
  • Loading branch information
cwecht committed Feb 2, 2024
1 parent a91bc8f commit dc9a6fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions rmw_connextdds_common/src/common/rmw_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2723,7 +2723,6 @@ RMW_Connext_Client::send_request(
reinterpret_cast<const uint32_t *>(rr_msg.gid.data)[3],
rr_msg.sn)


RMW_Connext_WriteParams write_params;

if (DDS_RETCODE_OK !=
Expand All @@ -2737,7 +2736,9 @@ RMW_Connext_Client::send_request(

rmw_ret_t rc = this->request_pub->write(&rr_msg, false /* serialized */, &write_params);

*sequence_id = write_params.sequence_number;
if (this->ctx->request_reply_mapping != RMW_Connext_RequestReplyMapping::Basic) {
*sequence_id = write_params.sequence_number;
}

RMW_CONNEXT_LOG_DEBUG_A(
"[%s] SENT REQUEST: "
Expand Down
5 changes: 1 addition & 4 deletions rmw_connextdds_common/src/common/rmw_type_support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ RMW_Connext_RequestReplyMapping_Basic_serialize(
if (RMW_RET_OK != rc) {
return rc;
}
sample_identity.sequence_number.high =
static_cast<DDS_Long>((rr_msg->sn & 0xFFFFFFFF00000000) >> 8);
sample_identity.sequence_number.low =
static_cast<DDS_UnsignedLong>(rr_msg->sn & 0x00000000FFFFFFFF);
rmw_connextdds_sn_ros_to_dds(rr_msg->sn, sample_identity.sequence_number);

try {
// Cyclone only serializes 8 bytes of the writer guid.
Expand Down

0 comments on commit dc9a6fa

Please sign in to comment.