Skip to content

Commit

Permalink
Exclude missing sample info fields when building rmw_connextddsmicro (r…
Browse files Browse the repository at this point in the history
…os2#79)

* Exclude missing sample info fields when building micro.
* Report features individually for each RMW implementation.
* Return special value for unsupported sequence numbers.

Signed-off-by: Andrea Sorbini <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
  • Loading branch information
2 people authored and cwecht committed Mar 16, 2023
1 parent be74aa2 commit d24d1ae
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 36 deletions.
12 changes: 11 additions & 1 deletion rmw_connextdds/src/rmw_api_impl_ndds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,5 +962,15 @@ rmw_subscription_get_network_flow_endpoints(
bool
rmw_feature_supported(rmw_feature_t feature)
{
return rmw_api_connextdds_feature_supported(feature);
switch (feature) {
case RMW_FEATURE_MESSAGE_INFO_RECEPTION_SEQUENCE_NUMBER:
case RMW_FEATURE_MESSAGE_INFO_PUBLICATION_SEQUENCE_NUMBER:
{
return true;
}
default:
{
return false;
}
}
}
1 change: 0 additions & 1 deletion rmw_connextdds_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ set(RMW_CONNEXT_COMMON_SOURCE_CPP
src/common/rmw_network_flow_endpoints.cpp
src/common/rmw_graph.cpp
src/common/rmw_event.cpp
src/common/rmw_features.cpp
src/common/rmw_impl.cpp
src/common/rmw_impl_waitset_std.cpp
src/common/rmw_info.cpp
Expand Down
33 changes: 0 additions & 33 deletions rmw_connextdds_common/src/common/rmw_features.cpp

This file was deleted.

4 changes: 4 additions & 0 deletions rmw_connextdds_common/src/common/rmw_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1970,9 +1970,13 @@ rmw_connextdds_message_info_from_dds(
to->publication_sequence_number =
static_cast<uint64_t>((from->publication_sequence_number).high) << 32 |
static_cast<uint64_t>((from->publication_sequence_number).low);
#if RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO
to->reception_sequence_number =
static_cast<uint64_t>((from->reception_sequence_number).high) << 32 |
static_cast<uint64_t>((from->reception_sequence_number).low);
#else
to->reception_sequence_number = RMW_MESSAGE_INFO_SEQUENCE_NUMBER_UNSUPPORTED;
#endif // RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO
}

/******************************************************************************
Expand Down
11 changes: 10 additions & 1 deletion rmw_connextddsmicro/src/rmw_api_impl_rtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,5 +967,14 @@ rmw_subscription_get_network_flow_endpoints(
bool
rmw_feature_supported(rmw_feature_t feature)
{
return rmw_api_connextdds_feature_supported(feature);
switch (feature) {
case RMW_FEATURE_MESSAGE_INFO_PUBLICATION_SEQUENCE_NUMBER:
{
return true;
}
default:
{
return false;
}
}
}

0 comments on commit d24d1ae

Please sign in to comment.