rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
init.h
Go to the documentation of this file.
1 // Copyright 2014-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__INIT_H_
16 #define RMW__INIT_H_
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include <stdint.h>
24 
25 #include "rmw/init_options.h"
26 #include "rmw/macros.h"
27 #include "rmw/ret_types.h"
28 #include "rmw/visibility_control.h"
29 
31 
35 
38 {
40  uint64_t instance_id;
48 
51 
57 
59 
100 rmw_ret_t
101 rmw_init(const rmw_init_options_t * options, rmw_context_t * context);
102 
104 
130 rmw_ret_t
131 rmw_shutdown(rmw_context_t * context);
132 
134 
166 rmw_ret_t
168 
169 #ifdef __cplusplus
170 }
171 #endif
172 
173 #endif // RMW__INIT_H_
RMW_PUBLIC
#define RMW_PUBLIC
Definition: visibility_control.h:48
rmw_context_t::implementation_identifier
const char * implementation_identifier
Implementation identifier, used to ensure two different implementations are not being mixed.
Definition: init.h:42
rmw_get_zero_initialized_context
rmw_context_t rmw_get_zero_initialized_context(void)
Return a zero initialized context structure.
rmw_init_options_t
Options structure used during rmw_init().
Definition: init_options.h:40
RMW_PUBLIC_TYPE
RMW_PUBLIC_TYPE
Type mapping of rcutils log severity types to rmw specific types.
Definition: types.h:540
rmw_shutdown
rmw_ret_t rmw_shutdown(rmw_context_t *context)
Shutdown the middleware for a given context.
rmw_context_t::options
rmw_init_options_t options
Options used to initialize the context.
Definition: init.h:44
ret_types.h
macros.h
rmw_context_t::actual_domain_id
size_t actual_domain_id
Domain id that is being used.
Definition: init.h:46
rmw_context_t::impl
rmw_context_impl_t * impl
Implementation defined context information.
Definition: init.h:49
RMW_WARN_UNUSED
#define RMW_WARN_UNUSED
Indicate that a variable is not used, and prevent compiler from issuing warnings.
Definition: macros.h:24
rmw_context_t
Initialization context structure which is used to store init specific information.
Definition: init.h:37
init_options.h
rmw_context_impl_t
struct rmw_context_impl_t rmw_context_impl_t
Implementation defined context structure returned by rmw_init().
Definition: init.h:34
rmw_context_t::instance_id
uint64_t instance_id
Locally (process local) unique ID that represents this init/shutdown cycle.
Definition: init.h:40
rmw_ret_t
int32_t rmw_ret_t
Return code for rmw functions.
Definition: ret_types.h:26
visibility_control.h
rmw_init
rmw_ret_t rmw_init(const rmw_init_options_t *options, rmw_context_t *context)
Initialize the middleware with the given options, and yielding an context.
rmw_context_fini
rmw_ret_t rmw_context_fini(rmw_context_t *context)
Finalize a context.
rmw_context_t
struct RMW_PUBLIC_TYPE rmw_context_t rmw_context_t
Initialization context structure which is used to store init specific information.