rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
message_sequence.h
Go to the documentation of this file.
1 // Copyright 2020 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RMW__MESSAGE_SEQUENCE_H_
16 #define RMW__MESSAGE_SEQUENCE_H_
17 
18 #include <stddef.h>
19 
20 #include "rmw/macros.h"
21 #include "rmw/visibility_control.h"
22 #include "rmw/types.h"
23 
24 #if __cplusplus
25 extern "C"
26 {
27 #endif
28 
31 {
33  void ** data;
35  size_t size;
37  size_t capacity;
41 
44 {
48  size_t size;
50  size_t capacity;
54 
59 
61 
69  rmw_message_sequence_t * sequence,
70  size_t size,
71  rcutils_allocator_t * allocator);
72 
74 
87 
92 
94 
100 rmw_ret_t
102  rmw_message_info_sequence_t * sequence,
103  size_t size,
104  rcutils_allocator_t * allocator);
105 
107 
116 rmw_ret_t
118 
119 #if __cplusplus
120 }
121 #endif
122 
123 #endif // RMW__MESSAGE_SEQUENCE_H_
RMW_PUBLIC
#define RMW_PUBLIC
Definition: visibility_control.h:48
rmw_message_info_sequence_t
struct RMW_PUBLIC_TYPE rmw_message_info_sequence_t rmw_message_info_sequence_t
Structure to hold a sequence of message infos.
rmw_message_info_t
Information describing an rmw message.
Definition: types.h:519
types.h
rmw_message_sequence_t::data
void ** data
Array of pointers to ROS messages.
Definition: message_sequence.h:33
RMW_PUBLIC_TYPE
RMW_PUBLIC_TYPE
Type mapping of rcutils log severity types to rmw specific types.
Definition: types.h:540
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_fini
rmw_ret_t rmw_message_sequence_fini(rmw_message_sequence_t *sequence)
Finalize an rmw_message_sequence_t object.
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.
macros.h
rmw_message_info_sequence_t
Structure to hold a sequence of message infos.
Definition: message_sequence.h:43
rmw_message_sequence_t::size
size_t size
The number of valid entries in data.
Definition: message_sequence.h:35
rmw_message_info_sequence_t::data
rmw_message_info_t * data
Array of message info.
Definition: message_sequence.h:46
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.
rmw_message_info_sequence_t::size
size_t size
The number of valid entries in data.
Definition: message_sequence.h:48
rmw_message_sequence_t
struct RMW_PUBLIC_TYPE rmw_message_sequence_t rmw_message_sequence_t
Structure to hold a sequence of ROS messages.
rmw_message_sequence_t::allocator
rcutils_allocator_t * allocator
The allocator used to allocate the data array.
Definition: message_sequence.h:39
rmw_ret_t
int32_t rmw_ret_t
Return code for rmw functions.
Definition: ret_types.h:26
rmw_message_sequence_t
Structure to hold a sequence of ROS messages.
Definition: message_sequence.h:30
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.
visibility_control.h
rmw_message_info_sequence_t::capacity
size_t capacity
The total allocated capacity of the data array.
Definition: message_sequence.h:50
rcutils_allocator_t
rmw_message_info_sequence_t::allocator
rcutils_allocator_t * allocator
The allocator used to allocate the data array.
Definition: message_sequence.h:52
rmw_message_sequence_t::capacity
size_t capacity
The total allocated capacity of the data array.
Definition: message_sequence.h:37
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