Skip to content

Commit

Permalink
address feedback in pull request
Browse files Browse the repository at this point in the history
Signed-off-by: Miaofei <miaofei@amazon.com>
  • Loading branch information
mm318 committed May 1, 2019
1 parent 5a641ea commit a035d29
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
1 change: 1 addition & 0 deletions rmw_fastrtps_shared_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ __rmw_node_assert_liveliness(
}

// node_info->participant->assert_liveliness();
RMW_SET_ERROR_MSG("assert_liveliness() of node is currently not supported");

return RMW_RET_UNSUPPORTED;
}
Expand Down
1 change: 1 addition & 0 deletions rmw_fastrtps_shared_cpp/src/rmw_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ __rmw_publisher_assert_liveliness(
}

// info->publisher_->assert_liveliness();
RMW_SET_ERROR_MSG("assert_liveliness() of publisher is currently not supported");

return RMW_RET_UNSUPPORTED;
}
Expand Down
27 changes: 21 additions & 6 deletions rmw_fastrtps_shared_cpp/src/rmw_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ __rmw_wait(
rmw_guard_conditions_t * guard_conditions,
rmw_services_t * services,
rmw_clients_t * clients,
rmw_events_t * events,
rmw_events_t * /*events*/,
rmw_wait_set_t * wait_set,
const rmw_time_t * wait_timeout)
{
Expand Down Expand Up @@ -131,6 +131,15 @@ __rmw_wait(
}
}

// TODO(mm318): implement attachCondition for events when feature becomes available in fastrtps
// if (events) {
// for (size_t i = 0; i < events->event_count; ++i) {
// void * data = events->events[i];
// auto custom_event_info = static_cast<CustomEventInfo *>(data);
// custom_event_info->getListener()->attachCondition(conditionMutex, conditionVariable);
// }
// }

if (guard_conditions) {
for (size_t i = 0; i < guard_conditions->guard_condition_count; ++i) {
void * data = guard_conditions->guard_conditions[i];
Expand Down Expand Up @@ -204,11 +213,17 @@ __rmw_wait(
}
}

if (events) {
for (size_t i = 0; i < events->event_count; ++i) {
// no-op
}
}
// TODO(mm318): implement detachCondition for events when feature becomes available in fastrtps
// if (events) {
// for (size_t i = 0; i < events->event_count; ++i) {
// void * data = events->events[i];
// auto custom_event_info = static_cast<CustomEventInfo *>(data);
// custom_event_info->getListener()->detachCondition();
// if (!custom_event_info->getListener()->hasEvent()) {
// services->services[i] = 0;
// }
// }
// }

if (guard_conditions) {
for (size_t i = 0; i < guard_conditions->guard_condition_count; ++i) {
Expand Down

0 comments on commit a035d29

Please sign in to comment.