rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
types.h
Go to the documentation of this file.
1 // Copyright 2014-2017 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__TYPES_H_
16 #define RMW__TYPES_H_
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include <stdbool.h>
24 #include <stddef.h>
25 #include <stdint.h>
26 
27 // map rcutils specific log levels to rmw speicfic type
28 #include <rcutils/logging.h>
29 
30 #include "rmw/init.h"
31 #include "rmw/ret_types.h"
32 #include "rmw/serialized_message.h"
33 #include "rmw/visibility_control.h"
34 
35 // 24 bytes is the most memory needed to represent the GID by any current
36 // implementation. It may need to be increased in the future.
37 #define RMW_GID_STORAGE_SIZE 24
38 
40 {
42  void * data;
43  const char * name;
44  const char * namespace_;
46 } rmw_node_t;
47 
49 {
51  void * data;
52  const char * topic_name;
54 
56 {
58  void * data;
59  const char * topic_name;
61 
63 {
65  void * data;
66  const char * service_name;
68 
70 {
72  void * data;
73  const char * service_name;
74 } rmw_client_t;
75 
77 {
79  void * data;
82 
84 
91 {
95  void ** subscribers;
97 
99 
106 {
110  void ** services;
112 
114 
121 {
123  size_t client_count;
125  void ** clients;
126 } rmw_clients_t;
127 
129 
136 {
142 
144 {
147  void * data;
149 
151 {
152  int8_t writer_guid[16];
155 
157 {
158  uint64_t sec;
159  uint64_t nsec;
160 } rmw_time_t;
161 
163 {
166 };
167 
169 {
170  enum rmw_security_enforcement_policy_t enforce_security;
171  const char * security_root_path;
173 
175 {
178  RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT
179 };
180 
182 {
185  RMW_QOS_POLICY_HISTORY_KEEP_ALL
186 };
187 
189 {
192  RMW_QOS_POLICY_DURABILITY_VOLATILE
193 };
194 
197 {
200  size_t depth;
204 
215 
217 {
219  uint8_t data[RMW_GID_STORAGE_SIZE];
220 } rmw_gid_t;
221 
223 {
224  // const rmw_time_t received_timestamp;
228 
230 
231 // Type mapping of rcutils log severity types to
232 // rmw specific types.
233 typedef enum RWM_PUBLIC_TYPE
234 {
241 
242 #ifdef __cplusplus
243 }
244 #endif
245 
246 #endif // RMW__TYPES_H_
#define RMW_GID_STORAGE_SIZE
Definition: types.h:37
RMW_SECURITY_ENFORCEMENT_PERMISSIVE
Definition: types.h:164
bool avoid_ros_namespace_conventions
If true, any ROS specific namespacing conventions will be circumvented.
Definition: types.h:213
const char * implementation_identifier
Definition: types.h:145
RMW_QOS_POLICY_RELIABILITY_RELIABLE
Definition: types.h:176
RCUTILS_LOG_SEVERITY_INFO
const char * topic_name
Definition: types.h:52
void ** services
Pointer to an array of void * pointers of services.
Definition: types.h:110
uint64_t nsec
Definition: types.h:159
RCUTILS_LOG_SEVERITY_WARN
Definition: types.h:222
void * data
Definition: types.h:147
struct RMW_PUBLIC_TYPE rmw_guard_condition_t rmw_guard_condition_t
Array of service handles.
Definition: types.h:105
rmw_context_t * context
Definition: types.h:45
RMW_SECURITY_ENFORCEMENT_ENFORCE
Definition: types.h:164
const char * implementation_identifier
Definition: types.h:57
void * data
Definition: types.h:72
RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT
Definition: types.h:183
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
Definition: types.h:190
enum RWM_PUBLIC_TYPE rmw_log_severity_t
Array of subscriber handles.
Definition: types.h:90
const char * implementation_identifier
Definition: types.h:50
Definition: types.h:150
Definition: types.h:236
struct RMW_PUBLIC_TYPE rmw_guard_conditions_t rmw_guard_conditions_t
Array of guard condition handles.
const char * implementation_identifier
Definition: types.h:218
void ** guard_conditions
Pointer to an array of void * pointers of guard conditions.
Definition: types.h:140
size_t subscriber_count
The number of subscribers represented by the array.
Definition: types.h:93
struct RMW_PUBLIC_TYPE rmw_node_t rmw_node_t
size_t guard_condition_count
The number of guard conditions represented by the array.
Definition: types.h:138
enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t
Definition: types.h:181
void * data
Definition: types.h:51
#define RMW_PUBLIC_TYPE
Definition: visibility_control.h:51
void * data
Definition: types.h:58
Definition: types.h:237
struct RMW_PUBLIC_TYPE rmw_clients_t rmw_clients_t
Array of client handles.
void * data
Definition: types.h:42
const char * implementation_identifier
Definition: types.h:78
enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t
Definition: types.h:188
Definition: types.h:55
struct RMW_PUBLIC_TYPE rmw_service_t rmw_service_t
Initialization context structure which is used to store init specific information.
Definition: init.h:37
RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT
Definition: types.h:190
uint64_t sec
Definition: types.h:158
const char * service_name
Definition: types.h:73
size_t service_count
The number of services represented by the array.
Definition: types.h:108
bool from_intra_process
Definition: types.h:226
void ** subscribers
Pointer to an array of void * pointers of subscriptions.
Definition: types.h:95
RMW_QOS_POLICY_HISTORY_KEEP_LAST
Definition: types.h:183
Definition: types.h:69
Definition: types.h:238
enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t
Definition: types.h:174
struct RMW_PUBLIC_TYPE rmw_client_t rmw_client_t
Definition: types.h:216
rmw_context_t * context
Definition: types.h:80
struct RMW_PUBLIC_TYPE rmw_subscription_t rmw_subscription_t
struct RMW_PUBLIC_TYPE rmw_request_id_t rmw_request_id_t
size_t depth
Size of the message queue.
Definition: types.h:200
const char * namespace_
Definition: types.h:44
const char * service_name
Definition: types.h:66
void ** clients
Pointer to an array of void * pointers of clients.
Definition: types.h:125
int64_t sequence_number
Definition: types.h:153
const char * implementation_identifier
Definition: types.h:71
const char * topic_name
Definition: types.h:59
rmw_gid_t publisher_gid
Definition: types.h:225
struct RMW_PUBLIC_TYPE rmw_qos_profile_t rmw_qos_profile_t
ROS MiddleWare quality of service profile.
struct RMW_PUBLIC_TYPE rmw_subscriptions_t rmw_subscriptions_t
Array of subscriber handles.
const char * name
Definition: types.h:43
rmw_guard_conditions_t * guard_conditions
Definition: types.h:146
RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT
Definition: types.h:176
Definition: types.h:143
void * data
Definition: types.h:65
struct RMW_PUBLIC_TYPE rmw_gid_t rmw_gid_t
Definition: types.h:156
const char * implementation_identifier
Definition: types.h:41
RCUTILS_LOG_SEVERITY_FATAL
size_t client_count
The number of clients represented by the array.
Definition: types.h:123
Definition: types.h:76
Definition: types.h:62
Definition: types.h:168
Definition: types.h:239
struct RMW_PUBLIC_TYPE rmw_publisher_t rmw_publisher_t
struct RMW_PUBLIC_TYPE rmw_node_security_options_t rmw_node_security_options_t
Array of guard condition handles.
Definition: types.h:135
Definition: types.h:48
Array of client handles.
Definition: types.h:120
enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_t
Definition: types.h:162
struct RMW_PUBLIC_TYPE rmw_message_info_t rmw_message_info_t
struct RMW_PUBLIC_TYPE rmw_wait_set_t rmw_wait_set_t
const char * implementation_identifier
Definition: types.h:64
RCUTILS_LOG_SEVERITY_DEBUG
ROS MiddleWare quality of service profile.
Definition: types.h:196
void * data
Definition: types.h:79
Definition: types.h:39
Definition: types.h:235
const char * security_root_path
Definition: types.h:171
struct RMW_PUBLIC_TYPE rmw_time_t rmw_time_t
RCUTILS_LOG_SEVERITY_ERROR
struct RMW_PUBLIC_TYPE rmw_services_t rmw_services_t
Array of service handles.
RWM_PUBLIC_TYPE
Definition: types.h:233