Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow null arguments in the EventsExecutor parameters (Humble backport) #605

Merged
merged 1 commit into from
Jun 2, 2022
Merged
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_fastrtps_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ rmw_client_set_on_new_response_callback(
rmw_event_callback_t callback,
const void * user_data)
{
RMW_CHECK_ARGUMENT_FOR_NULL(rmw_client, RMW_RET_INVALID_ARGUMENT);

return rmw_fastrtps_shared_cpp::__rmw_client_set_on_new_response_callback(
rmw_client,
callback,
Expand Down
2 changes: 2 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ rmw_event_set_callback(
rmw_event_callback_t callback,
const void * user_data)
{
RMW_CHECK_ARGUMENT_FOR_NULL(rmw_event, RMW_RET_INVALID_ARGUMENT);

return rmw_fastrtps_shared_cpp::__rmw_event_set_callback(
rmw_event,
callback,
Expand Down
2 changes: 2 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@ rmw_service_set_on_new_request_callback(
rmw_event_callback_t callback,
const void * user_data)
{
RMW_CHECK_ARGUMENT_FOR_NULL(rmw_service, RMW_RET_INVALID_ARGUMENT);

return rmw_fastrtps_shared_cpp::__rmw_service_set_on_new_request_callback(
rmw_service,
callback,
Expand Down
2 changes: 2 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ rmw_subscription_set_on_new_message_callback(
rmw_event_callback_t callback,
const void * user_data)
{
RMW_CHECK_ARGUMENT_FOR_NULL(rmw_subscription, RMW_RET_INVALID_ARGUMENT);

return rmw_fastrtps_shared_cpp::__rmw_subscription_set_on_new_message_callback(
rmw_subscription,
callback,
Expand Down
14 changes: 14 additions & 0 deletions rmw_fastrtps_dynamic_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,4 +572,18 @@ rmw_client_response_subscription_get_actual_qos(

return rmw_fastrtps_shared_cpp::__rmw_client_response_subscription_get_actual_qos(client, qos);
}

rmw_ret_t
rmw_client_set_on_new_response_callback(
rmw_client_t * rmw_client,
rmw_event_callback_t callback,
const void * user_data)
{
RMW_CHECK_ARGUMENT_FOR_NULL(rmw_client, RMW_RET_INVALID_ARGUMENT);

return rmw_fastrtps_shared_cpp::__rmw_client_set_on_new_response_callback(
rmw_client,
callback,
user_data);
}
} // extern "C"
14 changes: 14 additions & 0 deletions rmw_fastrtps_dynamic_cpp/src/rmw_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,18 @@ rmw_subscription_event_init(
subscription->data,
event_type);
}

rmw_ret_t
rmw_event_set_callback(
rmw_event_t * rmw_event,
rmw_event_callback_t callback,
const void * user_data)
{
RMW_CHECK_ARGUMENT_FOR_NULL(rmw_event, RMW_RET_INVALID_ARGUMENT);

return rmw_fastrtps_shared_cpp::__rmw_event_set_callback(
rmw_event,
callback,
user_data);
}
} // extern "C"
1 change: 0 additions & 1 deletion rmw_fastrtps_dynamic_cpp/src/rmw_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

extern "C"
{

bool
rmw_feature_supported(rmw_feature_t feature)
{
Expand Down
14 changes: 14 additions & 0 deletions rmw_fastrtps_dynamic_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,4 +571,18 @@ rmw_service_request_subscription_get_actual_qos(

return rmw_fastrtps_shared_cpp::__rmw_service_request_subscription_get_actual_qos(service, qos);
}

rmw_ret_t
rmw_service_set_on_new_request_callback(
rmw_service_t * rmw_service,
rmw_event_callback_t callback,
const void * user_data)
{
RMW_CHECK_ARGUMENT_FOR_NULL(rmw_service, RMW_RET_INVALID_ARGUMENT);

return rmw_fastrtps_shared_cpp::__rmw_service_set_on_new_request_callback(
rmw_service,
callback,
user_data);
}
} // extern "C"
14 changes: 14 additions & 0 deletions rmw_fastrtps_dynamic_cpp/src/rmw_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,18 @@ rmw_destroy_subscription(rmw_node_t * node, rmw_subscription_t * subscription)
return rmw_fastrtps_shared_cpp::__rmw_destroy_subscription(
eprosima_fastrtps_identifier, node, subscription);
}

rmw_ret_t
rmw_subscription_set_on_new_message_callback(
rmw_subscription_t * rmw_subscription,
rmw_event_callback_t callback,
const void * user_data)
{
RMW_CHECK_ARGUMENT_FOR_NULL(rmw_subscription, RMW_RET_INVALID_ARGUMENT);

return rmw_fastrtps_shared_cpp::__rmw_subscription_set_on_new_message_callback(
rmw_subscription,
callback,
user_data);
}
} // extern "C"