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 } rmw_node_t;
50 
52 {
54  void * data;
55  const char * topic_name;
57 
59 {
61  void * data;
62  const char * topic_name;
64 
66 {
68  void * data;
69  const char * service_name;
71 
73 {
75  void * data;
76  const char * service_name;
77 } rmw_client_t;
78 
80 {
82  void * data;
84 
86 
93 {
97  void ** subscribers;
99 
101 
108 {
112  void ** services;
114 
116 
123 {
125  size_t client_count;
127  void ** clients;
128 } rmw_clients_t;
129 
131 
138 {
144 
146 {
149  void * data;
151 
153 {
154  int8_t writer_guid[16];
157 
159 {
160  uint64_t sec;
161  uint64_t nsec;
162 } rmw_time_t;
163 
165 {
168 };
169 
171 {
172  enum rmw_security_enforcement_policy_t enforce_security;
173  const char * security_root_path;
175 
177 {
180  RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT
181 };
182 
184 {
187  RMW_QOS_POLICY_HISTORY_KEEP_ALL
188 };
189 
191 {
194  RMW_QOS_POLICY_DURABILITY_VOLATILE
195 };
196 
198 {
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 #if __cplusplus
232 }
233 #endif
234 
235 #endif // RMW__TYPES_H_
#define RMW_GID_STORAGE_SIZE
Definition: types.h:41
RMW_SECURITY_ENFORCEMENT_PERMISSIVE
Definition: types.h:166
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:147
RMW_QOS_POLICY_RELIABILITY_RELIABLE
Definition: types.h:178
const char * topic_name
Definition: types.h:55
void ** services
Pointer to an array of void * pointers of services.
Definition: types.h:112
uint64_t nsec
Definition: types.h:161
Definition: types.h:222
void * data
Definition: types.h:149
struct RMW_PUBLIC_TYPE rmw_guard_condition_t rmw_guard_condition_t
Array of service handles.
Definition: types.h:107
RMW_SECURITY_ENFORCEMENT_ENFORCE
Definition: types.h:166
const char * implementation_identifier
Definition: types.h:60
void * data
Definition: types.h:75
RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT
Definition: types.h:185
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
Definition: types.h:192
Array of subsciber handles.
Definition: types.h:92
const char * implementation_identifier
Definition: types.h:53
Definition: types.h:152
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:142
size_t subscriber_count
The number of subscribers represented by the array.
Definition: types.h:95
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:140
enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t
Definition: types.h:183
void * data
Definition: types.h:54
#define RMW_PUBLIC_TYPE
Definition: visibility_control.h:51
int rmw_ret_t
Definition: types.h:29
void * data
Definition: types.h:61
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:81
enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t
Definition: types.h:190
Definition: types.h:58
struct RMW_PUBLIC_TYPE rmw_service_t rmw_service_t
RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT
Definition: types.h:192
uint64_t sec
Definition: types.h:160
const char * service_name
Definition: types.h:76
size_t service_count
The number of services represented by the array.
Definition: types.h:110
bool from_intra_process
Definition: types.h:226
void ** subscribers
Pointer to an array of void * pointers of subscriptions.
Definition: types.h:97
RMW_QOS_POLICY_HISTORY_KEEP_LAST
Definition: types.h:185
Definition: types.h:72
enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t
Definition: types.h:176
struct RMW_PUBLIC_TYPE rmw_client_t rmw_client_t
Definition: types.h:216
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:200
const char * namespace_
Definition: types.h:48
const char * service_name
Definition: types.h:69
void ** clients
Pointer to an array of void * pointers of clients.
Definition: types.h:127
int64_t sequence_number
Definition: types.h:155
const char * implementation_identifier
Definition: types.h:74
const char * topic_name
Definition: types.h:62
rmw_gid_t publisher_gid
Definition: types.h:225
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_guard_conditions_t * guard_conditions
Definition: types.h:148
RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT
Definition: types.h:178
Definition: types.h:145
void * data
Definition: types.h:68
struct RMW_PUBLIC_TYPE rmw_gid_t rmw_gid_t
Definition: types.h:158
const char * implementation_identifier
Definition: types.h:45
size_t client_count
The number of clients represented by the array.
Definition: types.h:125
Definition: types.h:79
Definition: types.h:65
Definition: types.h:170
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:137
Definition: types.h:51
Array of client handles.
Definition: types.h:122
enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_t
Definition: types.h:164
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:67
Definition: types.h:197
void * data
Definition: types.h:82
Definition: types.h:43
const char * security_root_path
Definition: types.h:173
struct RMW_PUBLIC_TYPE rmw_time_t rmw_time_t
struct RMW_PUBLIC_TYPE rmw_services_t rmw_services_t
Array of service handles.