rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
serialized_message.h
Go to the documentation of this file.
1 // Copyright 2018 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__SERIALIZED_MESSAGE_H_
16 #define RMW__SERIALIZED_MESSAGE_H_
17 
18 #if __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include "rcutils/allocator.h"
24 
25 #include "rmw/macros.h"
26 #include "rmw/types.h"
27 #include "rmw/visibility_control.h"
28 
30 
37 
39 
56  size_t buffer_capacity,
57  const rcutils_allocator_t * allocator);
58 
60 
75 
77 
96 
97 #if __cplusplus
98 }
99 #endif
100 
101 #endif // RMW__SERIALIZED_MESSAGE_H_
#define RMW_PUBLIC
Definition: visibility_control.h:48
Definition: types.h:225
#define RMW_WARN_UNUSED
Definition: macros.h:22
rmw_ret_t rmw_serialized_message_fini(rmw_serialized_message_t *msg)
Finalize a serialized message struct.
int rmw_ret_t
Definition: types.h:32
rmw_ret_t rmw_serialized_message_resize(rmw_serialized_message_t *msg, size_t new_size)
Resize the internal buffer for the message byte stream.
rmw_ret_t rmw_serialized_message_init(rmw_serialized_message_t *msg, size_t buffer_capacity, const rcutils_allocator_t *allocator)
Initialize a zero initialized serialized message struct.
rmw_serialized_message_t rmw_get_zero_initialized_serialized_message(void)
Return a zero initialized serialized message struct.