Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions rmw_opensplice_cpp/src/event_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
static const std::unordered_map<rmw_event_type_t, DDS::StatusKind> mask_map{
{RMW_EVENT_LIVELINESS_CHANGED, DDS::LIVELINESS_CHANGED_STATUS},
{RMW_EVENT_REQUESTED_DEADLINE_MISSED, DDS::REQUESTED_DEADLINE_MISSED_STATUS},
{RMW_EVENT_REQUESTED_INCOMPATIBLE_QOS, DDS::REQUESTED_INCOMPATIBLE_QOS_STATUS},
{RMW_EVENT_LIVELINESS_LOST, DDS::LIVELINESS_LOST_STATUS},
{RMW_EVENT_OFFERED_DEADLINE_MISSED, DDS::OFFERED_DEADLINE_MISSED_STATUS},
{RMW_EVENT_OFFERED_INCOMPATIBLE_QOS, DDS::OFFERED_INCOMPATIBLE_QOS_STATUS},
};

DDS::StatusKind get_status_kind_from_rmw(const rmw_event_type_t event_t)
Expand Down
39 changes: 39 additions & 0 deletions rmw_opensplice_cpp/src/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,25 @@ rmw_ret_t OpenSpliceStaticPublisherInfo::get_status(
offered_deadline_missed.total_count_change;
break;
}
case DDS::OFFERED_INCOMPATIBLE_QOS_STATUS:
{
DDS::OfferedIncompatibleQosStatus offered_incompatible_qos;
DDS::ReturnCode_t dds_return_code =
topic_writer->get_offered_incompatible_qos_status(offered_incompatible_qos);
rmw_ret_t from_dds = check_dds_ret_code(dds_return_code);
Comment thread
ivanpauno marked this conversation as resolved.
if (from_dds != RMW_RET_OK) {
return from_dds;
}

auto rmw_offered_incompatible_qos =
static_cast<rmw_offered_incompatible_qos_status_t *>(event);
rmw_offered_incompatible_qos->total_count = offered_incompatible_qos.total_count;
rmw_offered_incompatible_qos->total_count_change =
offered_incompatible_qos.total_count_change;
rmw_offered_incompatible_qos->last_policy_id =
offered_incompatible_qos.last_policy_id;
break;
}
default:
return RMW_RET_UNSUPPORTED;
}
Expand All @@ -407,6 +426,7 @@ rmw_ret_t OpenSpliceStaticSubscriberInfo::get_status(
const DDS::StatusMask mask,
void * event)
{
RMW_CHECK_ARGUMENT_FOR_NULL(event, RMW_RET_INVALID_ARGUMENT);
Comment thread
ivanpauno marked this conversation as resolved.
switch (mask) {
case DDS::LIVELINESS_CHANGED_STATUS:
{
Expand Down Expand Up @@ -444,6 +464,25 @@ rmw_ret_t OpenSpliceStaticSubscriberInfo::get_status(
requested_deadline_missed.total_count_change;
break;
}
case DDS::REQUESTED_INCOMPATIBLE_QOS_STATUS:
{
DDS::RequestedIncompatibleQosStatus requested_incompatible_qos;
DDS::ReturnCode_t dds_return_code =
topic_reader->get_requested_incompatible_qos_status(requested_incompatible_qos);
rmw_ret_t from_dds = check_dds_ret_code(dds_return_code);
if (from_dds != RMW_RET_OK) {
return from_dds;
}

auto rmw_requested_incompatible_qos =
static_cast<rmw_requested_incompatible_qos_status_t *>(event);
rmw_requested_incompatible_qos->total_count = requested_incompatible_qos.total_count;
rmw_requested_incompatible_qos->total_count_change =
requested_incompatible_qos.total_count_change;
rmw_requested_incompatible_qos->last_policy_id =
requested_incompatible_qos.last_policy_id;
break;
}
default:
return RMW_RET_UNSUPPORTED;
}
Expand Down
1 change: 0 additions & 1 deletion rmw_opensplice_cpp/src/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class OpenSplicePublisherListener : public DDS::PublisherListener
virtual void on_publication_matched(
DDS::DataWriter_ptr writer,
const DDS::PublicationMatchedStatus & status);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed new line to make code style more consistent with the rest of the file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please, avoid unrelated changes.
In any case, adding the missing spaces in other places would be better.

virtual void on_offered_deadline_missed(
DDS::DataWriter_ptr,
const DDS::OfferedDeadlineMissedStatus &) {}
Expand Down