rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
Classes | Typedefs | Functions
message_sequence.h File Reference
#include <stddef.h>
#include "rmw/macros.h"
#include "rmw/visibility_control.h"
#include "rmw/types.h"
Include dependency graph for message_sequence.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rmw_message_sequence_t
 Structure to hold a sequence of ROS messages. More...
 
struct  rmw_message_info_sequence_t
 Structure to hold a sequence of message infos. More...
 

Typedefs

typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_t rmw_message_sequence_t
 Structure to hold a sequence of ROS messages. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_message_info_sequence_t rmw_message_info_sequence_t
 Structure to hold a sequence of message infos. More...
 

Functions

rmw_message_sequence_t rmw_get_zero_initialized_message_sequence (void)
 Return an rmw_message_sequence_t struct with members initialized to NULL More...
 
rmw_ret_t rmw_message_sequence_init (rmw_message_sequence_t *sequence, size_t size, rcutils_allocator_t *allocator)
 Initialize an rmw_message_sequence_t object. More...
 
rmw_ret_t rmw_message_sequence_fini (rmw_message_sequence_t *sequence)
 Finalize an rmw_message_sequence_t object. More...
 
rmw_message_info_sequence_t rmw_get_zero_initialized_message_info_sequence (void)
 Return an rmw_message_info_sequence_t struct with members initialized to NULL More...
 
rmw_ret_t rmw_message_info_sequence_init (rmw_message_info_sequence_t *sequence, size_t size, rcutils_allocator_t *allocator)
 Initialize an rmw_message_info_sequence_t object. More...
 
rmw_ret_t rmw_message_info_sequence_fini (rmw_message_info_sequence_t *sequence)
 Finalize an rmw_message_sequence_t object. More...
 

Typedef Documentation

◆ rmw_message_sequence_t

Structure to hold a sequence of ROS messages.

◆ rmw_message_info_sequence_t

Structure to hold a sequence of message infos.

Function Documentation

◆ rmw_get_zero_initialized_message_sequence()

rmw_message_sequence_t rmw_get_zero_initialized_message_sequence ( void  )

Return an rmw_message_sequence_t struct with members initialized to NULL

◆ rmw_message_sequence_init()

rmw_ret_t rmw_message_sequence_init ( rmw_message_sequence_t sequence,
size_t  size,
rcutils_allocator_t allocator 
)

Initialize an rmw_message_sequence_t object.

Parameters
[in,out]sequencesequence object to be initialized.
[in]sizecapacity of the sequence to be allocated.
[in]allocatorthe allcator used to allocate memory.

◆ rmw_message_sequence_fini()

rmw_ret_t rmw_message_sequence_fini ( rmw_message_sequence_t sequence)

Finalize an rmw_message_sequence_t object.

The rmw_message_sequence_t struct has members which require memory to be allocated to them before setting values. This function reclaims any allocated resources within the object and zeroes out all other members.

Note: This will not call fini or deallocate the underlying message structures.

Parameters
[in,out]sequencesequence object to be finalized.

◆ rmw_get_zero_initialized_message_info_sequence()

rmw_message_info_sequence_t rmw_get_zero_initialized_message_info_sequence ( void  )

Return an rmw_message_info_sequence_t struct with members initialized to NULL

◆ rmw_message_info_sequence_init()

rmw_ret_t rmw_message_info_sequence_init ( rmw_message_info_sequence_t sequence,
size_t  size,
rcutils_allocator_t allocator 
)

Initialize an rmw_message_info_sequence_t object.

Parameters
[in,out]sequencesequence object to be initialized.
[in]sizecapacity of the sequence to be allocated.
[in]allocatorthe allcator used to allocate memory.

◆ rmw_message_info_sequence_fini()

rmw_ret_t rmw_message_info_sequence_fini ( rmw_message_info_sequence_t sequence)

Finalize an rmw_message_sequence_t object.

The rmw_message_sequence_t struct has members which require memory to be allocated to them before setting values. This function reclaims any allocated resources within the object and zeroes out all other members.

Parameters
[in,out]sequencesequence object to be finalized.