rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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;
44 
47 
53 
55 
82 rmw_init(const rmw_init_options_t * options, rmw_context_t * context);
83 
85 
108 rmw_ret_t
109 rmw_shutdown(rmw_context_t * context);
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif // RMW__INIT_H_
struct RMW_PUBLIC_TYPE rmw_context_t rmw_context_t
Initialization context structure which is used to store init specific information.
#define RMW_PUBLIC
Definition: visibility_control.h:48
uint64_t instance_id
Locally (process local) unique ID that represents this init/shutdown cycle.
Definition: init.h:40
#define RMW_WARN_UNUSED
Definition: macros.h:22
#define RMW_PUBLIC_TYPE
Definition: visibility_control.h:51
struct rmw_context_impl_t rmw_context_impl_t
Implementation defined context structure returned by rmw_init().
Definition: init.h:34
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.
Options structure used during rmw_init().
Definition: init_options.h:37
Initialization context structure which is used to store init specific information.
Definition: init.h:37
rmw_ret_t rmw_shutdown(rmw_context_t *context)
Shutdown the middleware for a given context.
const char * implementation_identifier
Implementation identifier, used to ensure two different implementations are not being mixed...
Definition: init.h:42
rmw_context_impl_t * impl
Implementation defined context information.
Definition: init.h:45
rmw_context_t rmw_get_zero_initialized_context(void)
Return a zero initialized context structure.
int32_t rmw_ret_t
Definition: ret_types.h:25