Function rcl_subscription_event_init

Function Documentation

rcl_ret_t rcl_subscription_event_init(rcl_event_t *event, const rcl_subscription_t *subscription, const rcl_subscription_event_type_t event_type)

Initialize an rcl_event_t with a subscription.

Fill the rcl_event_t with the subscription and desired event_type.

Parameters:
  • event[inout] pointer to fill

  • subscription[in] to get events from

  • event_type[in] to listen for

Returns:

RCL_RET_OK if the rcl_event_t is filled, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_BAD_ALLOC if allocating memory fails, or

Returns:

RCL_RET_UNSUPPORTED if event_type is not supported, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.