Skip to content

Commit

Permalink
Rework executor callback data
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Passerino committed Feb 26, 2021
1 parent 2d7af4e commit d97b249
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 42 deletions.
3 changes: 1 addition & 2 deletions rcl/include/rcl/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,7 @@ rcl_ret_t
rcl_client_set_listener_callback(
const rcl_client_t * client,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * client_handle);
const void * user_data);

#ifdef __cplusplus
}
Expand Down
3 changes: 1 addition & 2 deletions rcl/include/rcl/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ rcl_ret_t
rcl_event_set_listener_callback(
const rcl_event_t * event,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * event_handle,
const void * user_data,
bool use_previous_events);

#ifdef __cplusplus
Expand Down
3 changes: 1 addition & 2 deletions rcl/include/rcl/guard_condition.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ rcl_ret_t
rcl_guard_condition_set_listener_callback(
const rcl_guard_condition_t * guard_condition,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * guard_condition_handle,
const void * user_data,
bool use_previous_events);

#ifdef __cplusplus
Expand Down
3 changes: 1 addition & 2 deletions rcl/include/rcl/service.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,7 @@ rcl_ret_t
rcl_service_set_listener_callback(
const rcl_service_t * service,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * service_handle);
const void * user_data);

#ifdef __cplusplus
}
Expand Down
3 changes: 1 addition & 2 deletions rcl/include/rcl/subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,7 @@ rcl_ret_t
rcl_subscription_set_listener_callback(
const rcl_subscription_t * subscription,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * subscription_handle);
const void * user_data);

#ifdef __cplusplus
}
Expand Down
10 changes: 4 additions & 6 deletions rcl/src/rcl/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,12 @@ rcl_ret_t
rcl_client_set_listener_callback(
const rcl_client_t * client,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * client_handle)
const void * user_data)
{
return rmw_client_set_listener_callback(
client->impl->rmw_handle,
listener_callback,
user_data,
client_handle);
client->impl->rmw_handle,
listener_callback,
user_data);
}

#ifdef __cplusplus
Expand Down
12 changes: 5 additions & 7 deletions rcl/src/rcl/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,14 @@ rcl_ret_t
rcl_event_set_listener_callback(
const rcl_event_t * event,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * event_handle,
const void * user_data,
bool use_previous_events)
{
return rmw_event_set_listener_callback(
&event->impl->rmw_handle,
listener_callback,
user_data,
event_handle,
use_previous_events);
&event->impl->rmw_handle,
listener_callback,
user_data,
use_previous_events);
}

#ifdef __cplusplus
Expand Down
12 changes: 5 additions & 7 deletions rcl/src/rcl/guard_condition.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,14 @@ rcl_ret_t
rcl_guard_condition_set_listener_callback(
const rcl_guard_condition_t * guard_condition,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * guard_condition_handle,
const void * user_data,
bool use_previous_events)
{
return rmw_guard_condition_set_listener_callback(
guard_condition->impl->rmw_handle,
listener_callback,
user_data,
guard_condition_handle,
use_previous_events);
guard_condition->impl->rmw_handle,
listener_callback,
user_data,
use_previous_events);
}

#ifdef __cplusplus
Expand Down
10 changes: 4 additions & 6 deletions rcl/src/rcl/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,12 @@ rcl_ret_t
rcl_service_set_listener_callback(
const rcl_service_t * service,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * service_handle)
const void * user_data)
{
return rmw_service_set_listener_callback(
service->impl->rmw_handle,
listener_callback,
user_data,
service_handle);
service->impl->rmw_handle,
listener_callback,
user_data);
}


Expand Down
10 changes: 4 additions & 6 deletions rcl/src/rcl/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,14 +441,12 @@ rcl_ret_t
rcl_subscription_set_listener_callback(
const rcl_subscription_t * subscription,
rmw_listener_callback_t listener_callback,
void * user_data,
const void * subscription_handle)
const void * user_data)
{
return rmw_subscription_set_listener_callback(
subscription->impl->rmw_handle,
listener_callback,
user_data,
subscription_handle);
subscription->impl->rmw_handle,
listener_callback,
user_data);
}

#ifdef __cplusplus
Expand Down

0 comments on commit d97b249

Please sign in to comment.