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 #if __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include <stdbool.h>
24 #include <stddef.h>
25 #include <stdint.h>
26 
27 #include "rmw/visibility_control.h"
28 
29 typedef int rmw_ret_t;
30 #define RMW_RET_OK 0
31 #define RMW_RET_ERROR 1
32 #define RMW_RET_TIMEOUT 2
33 
35 #define RMW_RET_BAD_ALLOC 10
36 #define RMW_RET_INVALID_ARGUMENT 11
38 
39 // 24 bytes is the most memory needed to represent the GID by any current
40 // implementation. It may need to be increased in the future.
41 #define RMW_GID_STORAGE_SIZE 24
42 
44 {
46  void * data;
47  const char * name;
48  const char * namespace_;
49  const size_t domain_id;
50 } rmw_node_t;
51 
53 {
55  void * data;
56  const char * topic_name;
58 
60 {
62  void * data;
63  const char * topic_name;
65 
67 {
69  void * data;
70  const char * service_name;
72 
74 {
76  void * data;
77  const char * service_name;
78 } rmw_client_t;
79 
81 {
83  void * data;
85 
87 
94 {
98  void ** subscribers;
100 
102 
109 {
113  void ** services;
115 
117 
124 {
126  size_t client_count;
128  void ** clients;
129 } rmw_clients_t;
130 
132 
139 {
145 
147 {
150  void * data;
151 } rmw_waitset_t;
152 
154 {
155  int8_t writer_guid[16];
158 
160 {
161  uint64_t sec;
162  uint64_t nsec;
163 } rmw_time_t;
164 
166 {
169 };
170 
172 {
173  enum rmw_security_enforcement_policy_t enforce_security;
174  const char * security_root_path;
176 
178 {
181  RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT
182 };
183 
185 {
188  RMW_QOS_POLICY_HISTORY_KEEP_ALL
189 };
190 
192 {
195  RMW_QOS_POLICY_DURABILITY_VOLATILE
196 };
197 
199 {
201  size_t depth;
205 
216 
218 {
220  uint8_t data[RMW_GID_STORAGE_SIZE];
221 } rmw_gid_t;
222 
224 {
225  // const rmw_time_t received_timestamp;
229 
231 
232 #if __cplusplus
233 }
234 #endif
235 
236 #endif // RMW__TYPES_H_
#define RMW_GID_STORAGE_SIZE
Definition: types.h:41
RMW_SECURITY_ENFORCEMENT_PERMISSIVE
Definition: types.h:167
bool avoid_ros_namespace_conventions
If true, any ROS specific namespacing conventions will be circumvented.
Definition: types.h:214
RMW_QOS_POLICY_RELIABILITY_RELIABLE
Definition: types.h:179
const char * implementation_identifier
Definition: types.h:148
const char * topic_name
Definition: types.h:56
void ** services
Pointer to an array of void * pointers of services.
Definition: types.h:113
uint64_t nsec
Definition: types.h:162
Definition: types.h:223
struct RMW_PUBLIC_TYPE rmw_guard_condition_t rmw_guard_condition_t
Array of service handles.
Definition: types.h:108
RMW_SECURITY_ENFORCEMENT_ENFORCE
Definition: types.h:167
const char * implementation_identifier
Definition: types.h:61
void * data
Definition: types.h:76
RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT
Definition: types.h:186
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
Definition: types.h:193
Array of subsciber handles.
Definition: types.h:93
const char * implementation_identifier
Definition: types.h:54
Definition: types.h:153
struct RMW_PUBLIC_TYPE rmw_guard_conditions_t rmw_guard_conditions_t
Array of guard condition handles.
const char * implementation_identifier
Definition: types.h:219
void ** guard_conditions
Pointer to an array of void * pointers of guard conditions.
Definition: types.h:143
size_t subscriber_count
The number of subscribers represented by the array.
Definition: types.h:96
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:141
enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t
Definition: types.h:184
void * data
Definition: types.h:55
#define RMW_PUBLIC_TYPE
Definition: visibility_control.h:51
int rmw_ret_t
Definition: types.h:29
void * data
Definition: types.h:62
void * data
Definition: types.h:150
struct RMW_PUBLIC_TYPE rmw_clients_t rmw_clients_t
Array of client handles.
void * data
Definition: types.h:46
const char * implementation_identifier
Definition: types.h:82
enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t
Definition: types.h:191
Definition: types.h:59
struct RMW_PUBLIC_TYPE rmw_service_t rmw_service_t
RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT
Definition: types.h:193
uint64_t sec
Definition: types.h:161
const char * service_name
Definition: types.h:77
size_t service_count
The number of services represented by the array.
Definition: types.h:111
Definition: types.h:146
bool from_intra_process
Definition: types.h:227
void ** subscribers
Pointer to an array of void * pointers of subscriptions.
Definition: types.h:98
RMW_QOS_POLICY_HISTORY_KEEP_LAST
Definition: types.h:186
Definition: types.h:73
enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t
Definition: types.h:177
struct RMW_PUBLIC_TYPE rmw_client_t rmw_client_t
Definition: types.h:217
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
Definition: types.h:201
const char * namespace_
Definition: types.h:48
const char * service_name
Definition: types.h:70
void ** clients
Pointer to an array of void * pointers of clients.
Definition: types.h:128
int64_t sequence_number
Definition: types.h:156
const char * implementation_identifier
Definition: types.h:75
const char * topic_name
Definition: types.h:63
rmw_gid_t publisher_gid
Definition: types.h:226
struct RMW_PUBLIC_TYPE rmw_qos_profile_t rmw_qos_profile_t
struct RMW_PUBLIC_TYPE rmw_subscriptions_t rmw_subscriptions_t
Array of subsciber handles.
const char * name
Definition: types.h:47
RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT
Definition: types.h:179
void * data
Definition: types.h:69
const size_t domain_id
Definition: types.h:49
struct RMW_PUBLIC_TYPE rmw_gid_t rmw_gid_t
Definition: types.h:159
const char * implementation_identifier
Definition: types.h:45
size_t client_count
The number of clients represented by the array.
Definition: types.h:126
Definition: types.h:80
rmw_guard_conditions_t * guard_conditions
Definition: types.h:149
Definition: types.h:66
Definition: types.h:171
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:138
Definition: types.h:52
struct RMW_PUBLIC_TYPE rmw_waitset_t rmw_waitset_t
Array of client handles.
Definition: types.h:123
enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_t
Definition: types.h:165
struct RMW_PUBLIC_TYPE rmw_message_info_t rmw_message_info_t
const char * implementation_identifier
Definition: types.h:68
Definition: types.h:198
void * data
Definition: types.h:83
Definition: types.h:43
const char * security_root_path
Definition: types.h:174
struct RMW_PUBLIC_TYPE rmw_time_t rmw_time_t
struct RMW_PUBLIC_TYPE rmw_services_t rmw_services_t
Array of service handles.