Skip to content
Merged
Changes from all 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
15 changes: 15 additions & 0 deletions rmw_cyclonedds_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2458,6 +2458,7 @@ static const std::unordered_map<rmw_event_type_t, uint32_t> mask_map{
{RMW_EVENT_OFFERED_DEADLINE_MISSED, DDS_OFFERED_DEADLINE_MISSED_STATUS},
{RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE, DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS},
{RMW_EVENT_OFFERED_QOS_INCOMPATIBLE, DDS_OFFERED_INCOMPATIBLE_QOS_STATUS},
{RMW_EVENT_MESSAGE_LOST, DDS_SAMPLE_LOST_STATUS},
};

static bool is_event_supported(const rmw_event_type_t event_t)
Expand Down Expand Up @@ -2566,6 +2567,20 @@ extern "C" rmw_ret_t rmw_take_event(
}
}

case RMW_EVENT_MESSAGE_LOST: {
auto ei = static_cast<rmw_message_lost_status_t *>(event_info);
auto sub = static_cast<CddsSubscription *>(event_handle->data);
dds_sample_lost_status_t st;
if (dds_get_sample_lost_status(sub->enth, &st) < 0) {
*taken = false;
return RMW_RET_ERROR;
}
ei->total_count = static_cast<size_t>(st.total_count);
ei->total_count_change = static_cast<size_t>(st.total_count_change);
*taken = true;
return RMW_RET_OK;
}

case RMW_EVENT_LIVELINESS_LOST: {
auto ei = static_cast<rmw_liveliness_lost_status_t *>(event_info);
auto pub = static_cast<CddsPublisher *>(event_handle->data);
Expand Down