rmw
master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
|
#include <stdint.h>
#include "rcutils/allocator.h"
#include "rmw/macros.h"
#include "rmw/types.h"
#include "rmw/ret_types.h"
#include "rmw/visibility_control.h"
Go to the source code of this file.
Classes | |
struct | rmw_event_t |
Encapsulate the RMW event implementation, data, and type. More... | |
Typedefs | |
typedef enum rmw_event_type_t | rmw_event_type_t |
Define publisher/subscription events. More... | |
typedef struct RMW_PUBLIC_TYPE rmw_event_t | rmw_event_t |
Encapsulate the RMW event implementation, data, and type. More... | |
Enumerations | |
enum | rmw_event_type_t { RMW_EVENT_LIVELINESS_CHANGED, RMW_EVENT_REQUESTED_DEADLINE_MISSED, RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE, RMW_EVENT_MESSAGE_LOST, RMW_EVENT_LIVELINESS_LOST, RMW_EVENT_OFFERED_DEADLINE_MISSED, RMW_EVENT_OFFERED_QOS_INCOMPATIBLE, RMW_EVENT_INVALID } |
Define publisher/subscription events. More... | |
Functions | |
rmw_event_t | rmw_get_zero_initialized_event (void) |
Return a zero initialized event structure. More... | |
rmw_ret_t | rmw_publisher_event_init (rmw_event_t *rmw_event, const rmw_publisher_t *publisher, rmw_event_type_t event_type) |
Initialize a rmw publisher event. More... | |
rmw_ret_t | rmw_subscription_event_init (rmw_event_t *rmw_event, const rmw_subscription_t *subscription, rmw_event_type_t event_type) |
Initialize a rmw subscription event. More... | |
rmw_ret_t | rmw_take_event (const rmw_event_t *event_handle, void *event_info, bool *taken) |
Take an event from the event handle. More... | |
rmw_ret_t | rmw_event_fini (rmw_event_t *event) |
Finalize an rmw_event_t. More... | |
typedef enum rmw_event_type_t rmw_event_type_t |
Define publisher/subscription events.
typedef struct RMW_PUBLIC_TYPE rmw_event_t rmw_event_t |
Encapsulate the RMW event implementation, data, and type.
enum rmw_event_type_t |
rmw_event_t rmw_get_zero_initialized_event | ( | void | ) |
Return a zero initialized event structure.
rmw_ret_t rmw_publisher_event_init | ( | rmw_event_t * | rmw_event, |
const rmw_publisher_t * | publisher, | ||
rmw_event_type_t | event_type | ||
) |
Initialize a rmw publisher event.
[in|out] | rmw_event to initialize | |
[in] | publisher | to initialize with |
[in|out] | event_type for the event to initialize |
RMW_RET_OK
if successful, or RMW_RET_INVALID_ARGUMENT
if invalid argument, or RMW_RET_UNSUPPORTED
if event_type is not supported, or RMW_RET_ERROR
if an unexpected error occurs. rmw_ret_t rmw_subscription_event_init | ( | rmw_event_t * | rmw_event, |
const rmw_subscription_t * | subscription, | ||
rmw_event_type_t | event_type | ||
) |
Initialize a rmw subscription event.
[in|out] | rmw_event to initialize | |
[in] | subscription | to initialize with |
[in|out] | event_type for the event to handle |
RMW_RET_OK
if successful, or RMW_RET_INVALID_ARGUMENT
if invalid argument, or RMW_RET_UNSUPPORTED
if event_type is not supported, or RMW_RET_ERROR
if an unexpected error occurs. rmw_ret_t rmw_take_event | ( | const rmw_event_t * | event_handle, |
void * | event_info, | ||
bool * | taken | ||
) |
Take an event from the event handle.
[in] | event_handle | event object to take from |
[in|out] | event_info event info object to write taken data into | |
[out] | taken | boolean flag indicating if an event was taken or not |
RMW_RET_OK
if successful, or RMW_RET_BAD_ALLOC
if memory allocation failed, or RMW_RET_ERROR
if an unexpected error occurs. rmw_ret_t rmw_event_fini | ( | rmw_event_t * | event | ) |
Finalize an rmw_event_t.
[in] | event | to finalize |