rmw  beta1
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 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 
34 // 24 bytes is the most memory needed to represent the GID by any current
35 // implementation. It may need to be increased in the future.
36 #define RMW_GID_STORAGE_SIZE 24
37 
39 {
41  void * data;
42  const char * name;
43  const size_t domain_id;
44 } rmw_node_t;
45 
47 {
49  void * data;
50  const char * topic_name;
52 
54 {
56  void * data;
57  const char * topic_name;
59 
61 {
63  void * data;
64  const char * service_name;
66 
68 {
70  void * data;
71  const char * service_name;
72 } rmw_client_t;
73 
75 {
77  void * data;
79 
81 
88 {
92  void ** subscribers;
94 
96 
103 {
107  void ** services;
109 
111 
118 {
120  size_t client_count;
122  void ** clients;
123 } rmw_clients_t;
124 
126 
133 {
139 
141 {
144  void * data;
145 } rmw_waitset_t;
146 
148 {
149  int8_t writer_guid[16];
152 
154 {
155  uint64_t sec;
156  uint64_t nsec;
157 } rmw_time_t;
158 
160 {
163  RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT
164 };
165 
167 {
170  RMW_QOS_POLICY_HISTORY_KEEP_ALL
171 };
172 
174 {
177  RMW_QOS_POLICY_DURABILITY_VOLATILE
178 };
179 
181 {
183  size_t depth;
187 
189 {
190  size_t topic_count;
191  char ** topic_names;
192  char ** type_names;
194 
196 {
198  uint8_t data[RMW_GID_STORAGE_SIZE];
199 } rmw_gid_t;
200 
202 {
203  // const rmw_time_t received_timestamp;
207 
209 
210 #if __cplusplus
211 }
212 #endif
213 
214 #endif // RMW__TYPES_H_
#define RMW_GID_STORAGE_SIZE
Definition: types.h:36
RMW_QOS_POLICY_RELIABILITY_RELIABLE
Definition: types.h:161
const char * implementation_identifier
Definition: types.h:142
const char * topic_name
Definition: types.h:50
void ** services
Pointer to an array of void * pointers of services.
Definition: types.h:107
uint64_t nsec
Definition: types.h:156
Definition: types.h:201
struct RMW_PUBLIC_TYPE rmw_guard_condition_t rmw_guard_condition_t
Array of service handles.
Definition: types.h:102
const char * implementation_identifier
Definition: types.h:55
void * data
Definition: types.h:70
RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT
Definition: types.h:168
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
Definition: types.h:175
Array of subsciber handles.
Definition: types.h:87
const char * implementation_identifier
Definition: types.h:48
Definition: types.h:147
struct RMW_PUBLIC_TYPE rmw_guard_conditions_t rmw_guard_conditions_t
Array of guard condition handles.
const char * implementation_identifier
Definition: types.h:197
char ** topic_names
Definition: types.h:191
void ** guard_conditions
Pointer to an array of void * pointers of guard conditions.
Definition: types.h:137
size_t subscriber_count
The number of subscribers represented by the array.
Definition: types.h:90
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:135
enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t
Definition: types.h:166
void * data
Definition: types.h:49
Definition: types.h:188
#define RMW_PUBLIC_TYPE
Definition: visibility_control.h:51
int rmw_ret_t
Definition: types.h:29
void * data
Definition: types.h:56
struct RMW_PUBLIC_TYPE rmw_topic_names_and_types_t rmw_topic_names_and_types_t
void * data
Definition: types.h:144
struct RMW_PUBLIC_TYPE rmw_clients_t rmw_clients_t
Array of client handles.
void * data
Definition: types.h:41
const char * implementation_identifier
Definition: types.h:76
enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t
Definition: types.h:173
Definition: types.h:53
struct RMW_PUBLIC_TYPE rmw_service_t rmw_service_t
RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT
Definition: types.h:175
uint64_t sec
Definition: types.h:155
const char * service_name
Definition: types.h:71
size_t service_count
The number of services represented by the array.
Definition: types.h:105
Definition: types.h:140
bool from_intra_process
Definition: types.h:205
void ** subscribers
Pointer to an array of void * pointers of subscriptions.
Definition: types.h:92
RMW_QOS_POLICY_HISTORY_KEEP_LAST
Definition: types.h:168
Definition: types.h:67
char ** type_names
Definition: types.h:192
enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t
Definition: types.h:159
struct RMW_PUBLIC_TYPE rmw_client_t rmw_client_t
Definition: types.h:195
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:183
const char * service_name
Definition: types.h:64
void ** clients
Pointer to an array of void * pointers of clients.
Definition: types.h:122
size_t topic_count
Definition: types.h:190
int64_t sequence_number
Definition: types.h:150
const char * implementation_identifier
Definition: types.h:69
const char * topic_name
Definition: types.h:57
rmw_gid_t publisher_gid
Definition: types.h:204
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:42
RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT
Definition: types.h:161
void * data
Definition: types.h:63
const size_t domain_id
Definition: types.h:43
struct RMW_PUBLIC_TYPE rmw_gid_t rmw_gid_t
Definition: types.h:153
const char * implementation_identifier
Definition: types.h:40
size_t client_count
The number of clients represented by the array.
Definition: types.h:120
Definition: types.h:74
rmw_guard_conditions_t * guard_conditions
Definition: types.h:143
Definition: types.h:60
struct RMW_PUBLIC_TYPE rmw_publisher_t rmw_publisher_t
Array of guard condition handles.
Definition: types.h:132
Definition: types.h:46
struct RMW_PUBLIC_TYPE rmw_waitset_t rmw_waitset_t
Array of client handles.
Definition: types.h:117
struct RMW_PUBLIC_TYPE rmw_message_info_t rmw_message_info_t
const char * implementation_identifier
Definition: types.h:62
Definition: types.h:180
void * data
Definition: types.h:77
Definition: types.h:38
struct RMW_PUBLIC_TYPE rmw_time_t rmw_time_t
struct RMW_PUBLIC_TYPE rmw_services_t rmw_services_t
Array of service handles.