Function rcl_publisher_event_init

Function Documentation

rcl_ret_t rcl_publisher_event_init(rcl_event_t *event, const rcl_publisher_t *publisher, const rcl_publisher_event_type_t event_type)

Initialize an rcl_event_t with a publisher.

Fill the rcl_event_t with the publisher and desired event_type.

Parameters:
  • event[inout] pointer to fill

  • publisher[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.