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 {
86  void * data;
88 
90 {
92  void * data;
94 
96 
103 {
107  void ** subscribers;
109 
111 
118 {
122  void ** services;
124 
126 
133 {
135  size_t client_count;
137  void ** clients;
138 } rmw_clients_t;
139 
141 {
143  size_t event_count;
145  void ** events;
146 } rmw_events_t;
147 
149 
156 {
162 
164 {
167  void * data;
169 
171 {
172  int8_t writer_guid[16];
175 
177 {
178  uint64_t sec;
179  uint64_t nsec;
180 } rmw_time_t;
181 
183 {
186 };
187 
189 {
190  enum rmw_security_enforcement_policy_t enforce_security;
191  const char * security_root_path;
193 
195 {
199  RMW_QOS_POLICY_RELIABILITY_UNKNOWN
200 };
201 
203 {
207  RMW_QOS_POLICY_HISTORY_UNKNOWN
208 };
209 
211 {
215  RMW_QOS_POLICY_DURABILITY_UNKNOWN
216 };
217 
219 {
223  RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC
224 };
225 
226 #define RMW_QOS_DEADLINE_DEFAULT {0, 0}
227 #define RMW_QOS_LIFESPAN_DEFAULT {0, 0}
228 #define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT {0, 0}
229 
232 {
235  size_t depth;
241  struct rmw_time_t deadline;
243  struct rmw_time_t lifespan;
247  struct rmw_time_t liveliness_lease_duration;
248 
250 
261 
263 {
265  uint8_t data[RMW_GID_STORAGE_SIZE];
266 } rmw_gid_t;
267 
269 {
270  // const rmw_time_t received_timestamp;
274 
276 
278 typedef enum RMW_PUBLIC_TYPE
279 {
286 
289 {
298  int32_t alive_count;
313 
316 {
323  int32_t total_count;
327 
330 {
337  int32_t total_count;
341 
344 {
351  int32_t total_count;
355 
356 #ifdef __cplusplus
357 }
358 #endif
359 
360 #endif // RMW__TYPES_H_
#define RMW_GID_STORAGE_SIZE
Definition: types.h:37
RMW_SECURITY_ENFORCEMENT_PERMISSIVE
Definition: types.h:184
RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT
Definition: types.h:220
bool avoid_ros_namespace_conventions
If true, any ROS specific namespacing conventions will be circumvented.
Definition: types.h:259
const char * implementation_identifier
Definition: types.h:165
RMW_QOS_POLICY_RELIABILITY_RELIABLE
Definition: types.h:196
RCUTILS_LOG_SEVERITY_INFO
const char * topic_name
Definition: types.h:52
int32_t total_count_change
The change in total_count since the last time the status was last read.
Definition: types.h:353
struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_t rmw_requested_deadline_missed_status_t
QoS Requested Deadline Missed information provided by a subscription.
RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
Definition: types.h:220
void ** services
Pointer to an array of void * pointers of services.
Definition: types.h:122
uint64_t nsec
Definition: types.h:179
RCUTILS_LOG_SEVERITY_WARN
Definition: types.h:268
void * data
Definition: types.h:167
struct RMW_PUBLIC_TYPE rmw_guard_condition_t rmw_guard_condition_t
Array of service handles.
Definition: types.h:117
rmw_context_t * context
Definition: types.h:45
RMW_SECURITY_ENFORCEMENT_ENFORCE
Definition: types.h:184
const char * implementation_identifier
Definition: types.h:57
void * data
Definition: types.h:72
RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT
Definition: types.h:204
struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_t rmw_liveliness_lost_status_t
QoS Liveliness Lost information provided by a publisher.
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
Definition: types.h:212
Array of subscriber handles.
Definition: types.h:102
const char * implementation_identifier
Definition: types.h:50
Definition: types.h:170
struct RMW_PUBLIC_TYPE rmw_guard_conditions_t rmw_guard_conditions_t
Array of guard condition handles.
size_t event_count
The number of events represented by the array.
Definition: types.h:143
const char * implementation_identifier
Definition: types.h:264
Definition: types.h:283
RMW_QOS_POLICY_HISTORY_KEEP_ALL
Definition: types.h:204
void ** guard_conditions
Pointer to an array of void * pointers of guard conditions.
Definition: types.h:160
Definition: types.h:282
size_t subscriber_count
The number of subscribers represented by the array.
Definition: types.h:105
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:158
enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t
Definition: types.h:202
void * data
Definition: types.h:51
struct RMW_PUBLIC_TYPE rmw_subscription_allocation_t rmw_subscription_allocation_t
enum RMW_PUBLIC_TYPE rmw_log_severity_t
Type mapping of rcutils log severity types to rmw specific types.
QoS Liveliness Lost information provided by a publisher.
Definition: types.h:329
Definition: types.h:89
Definition: types.h:284
Definition: types.h:280
Definition: types.h:281
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE
Definition: types.h:220
void * data
Definition: types.h:58
int32_t total_count_change
The change in total_count since the last time the status was last read.
Definition: types.h:339
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:210
Definition: types.h:55
struct RMW_PUBLIC_TYPE rmw_service_t rmw_service_t
QoS Requested Deadline Missed information provided by a subscription.
Definition: types.h:315
Initialization context structure which is used to store init specific information.
Definition: init.h:37
RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT
Definition: types.h:212
uint64_t sec
Definition: types.h:178
const char * service_name
Definition: types.h:73
RMW_QOS_POLICY_DURABILITY_VOLATILE
Definition: types.h:212
size_t service_count
The number of services represented by the array.
Definition: types.h:120
const char * implementation_identifier
Definition: types.h:85
bool from_intra_process
Definition: types.h:272
void ** subscribers
Pointer to an array of void * pointers of subscriptions.
Definition: types.h:107
void * data
Definition: types.h:86
int32_t alive_count
Definition: types.h:298
RMW_QOS_POLICY_HISTORY_KEEP_LAST
Definition: types.h:204
Definition: types.h:69
int32_t total_count
Definition: types.h:351
enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t
Definition: types.h:194
struct RMW_PUBLIC_TYPE rmw_client_t rmw_client_t
Definition: types.h:262
RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT
Definition: types.h:196
int32_t not_alive_count_change
The change in the not_alive_count since the status was last read.
Definition: types.h:311
rmw_context_t * context
Definition: types.h:80
struct RMW_PUBLIC_TYPE rmw_publisher_allocation_t rmw_publisher_allocation_t
struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_t rmw_offered_deadline_missed_status_t
QoS Deadline Missed information provided by a publisher.
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:235
RMW_PUBLIC_TYPE
Type mapping of rcutils log severity types to rmw specific types.
Definition: types.h:278
struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_t rmw_liveliness_changed_status_t
QoS Liveliness Changed information provided by a subscription.
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:137
int64_t sequence_number
Definition: types.h:173
void * data
Definition: types.h:92
const char * implementation_identifier
Definition: types.h:71
const char * topic_name
Definition: types.h:59
Definition: types.h:140
rmw_gid_t publisher_gid
Definition: types.h:271
struct RMW_PUBLIC_TYPE rmw_qos_profile_t rmw_qos_profile_t
ROS MiddleWare quality of service profile.
int32_t not_alive_count
Definition: types.h:307
struct RMW_PUBLIC_TYPE rmw_subscriptions_t rmw_subscriptions_t
Array of subscriber handles.
const char * name
Definition: types.h:43
Definition: types.h:83
rmw_guard_conditions_t * guard_conditions
Definition: types.h:166
RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT
Definition: types.h:196
Definition: types.h:163
int32_t alive_count_change
The change in the alive_count since the status was last read.
Definition: types.h:309
void * data
Definition: types.h:65
struct RMW_PUBLIC_TYPE rmw_gid_t rmw_gid_t
Definition: types.h:176
int32_t total_count
Definition: types.h:323
const char * implementation_identifier
Definition: types.h:41
void ** events
Pointer to an array of void * pointers of events.
Definition: types.h:145
RCUTILS_LOG_SEVERITY_FATAL
size_t client_count
The number of clients represented by the array.
Definition: types.h:135
Definition: types.h:76
Definition: types.h:62
Definition: types.h:188
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:155
struct RMW_PUBLIC_TYPE rmw_events_t rmw_events_t
Definition: types.h:48
Array of client handles.
Definition: types.h:132
enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t
Definition: types.h:218
enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_t
Definition: types.h:182
struct RMW_PUBLIC_TYPE rmw_message_info_t rmw_message_info_t
QoS Deadline Missed information provided by a publisher.
Definition: types.h:343
const char * implementation_identifier
Definition: types.h:91
struct RMW_PUBLIC_TYPE rmw_wait_set_t rmw_wait_set_t
int32_t total_count_change
The incremental number of deadlines detected since the status was read.
Definition: types.h:325
const char * implementation_identifier
Definition: types.h:64
RCUTILS_LOG_SEVERITY_DEBUG
ROS MiddleWare quality of service profile.
Definition: types.h:231
QoS Liveliness Changed information provided by a subscription.
Definition: types.h:288
void * data
Definition: types.h:79
Definition: types.h:39
const char * security_root_path
Definition: types.h:191
struct RMW_PUBLIC_TYPE rmw_time_t rmw_time_t
RCUTILS_LOG_SEVERITY_ERROR
int32_t total_count
Definition: types.h:337
struct RMW_PUBLIC_TYPE rmw_services_t rmw_services_t
Array of service handles.