rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
Classes | Typedefs | Enumerations | Functions
event.h File Reference
#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"
Include dependency graph for event.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 QoS policy 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_LIVELINESS_LOST, RMW_EVENT_OFFERED_DEADLINE_MISSED,
  RMW_EVENT_INVALID
}
 Define QoS policy 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 Documentation

◆ rmw_event_type_t

Define QoS policy events.

◆ rmw_event_t

Encapsulate the RMW event implementation, data, and type.

Enumeration Type Documentation

◆ rmw_event_type_t

Define QoS policy events.

Enumerator
RMW_EVENT_LIVELINESS_CHANGED 
RMW_EVENT_REQUESTED_DEADLINE_MISSED 
RMW_EVENT_LIVELINESS_LOST 
RMW_EVENT_OFFERED_DEADLINE_MISSED 
RMW_EVENT_INVALID 

Function Documentation

◆ rmw_get_zero_initialized_event()

rmw_event_t rmw_get_zero_initialized_event ( void  )

Return a zero initialized event structure.

◆ rmw_publisher_event_init()

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.

Parameters

◆ rmw_subscription_event_init()

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.

Parameters

◆ rmw_take_event()

rmw_ret_t rmw_take_event ( const rmw_event_t event_handle,
void *  event_info,
bool *  taken 
)

Take an event from the event handle.

Parameters
event_handleevent object to take from
event_infoevent info object to write taken data into
takenboolean flag indicating if an event was taken or not
Returns
RMW_RET_OK if successful, or
RMW_RET_BAD_ALLOC if memory allocation failed, or
RMW_RET_ERROR if an unexpected error occurs.

◆ rmw_event_fini()

rmw_ret_t rmw_event_fini ( rmw_event_t event)

Finalize an rmw_event_t.

Parameters
eventto finalize