ROS 2 rclcpp + rcl - humble  humble
ROS 2 C++ Client Library with ROS Client Library
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 
16 
17 #ifndef RCL__TYPES_H_
18 #define RCL__TYPES_H_
19 
20 #include <rmw/types.h>
21 
23 typedef rmw_ret_t rcl_ret_t;
24 
26 #define RCL_RET_OK RMW_RET_OK
28 #define RCL_RET_ERROR RMW_RET_ERROR
30 #define RCL_RET_TIMEOUT RMW_RET_TIMEOUT
32 #define RCL_RET_BAD_ALLOC RMW_RET_BAD_ALLOC
34 #define RCL_RET_INVALID_ARGUMENT RMW_RET_INVALID_ARGUMENT
36 #define RCL_RET_UNSUPPORTED RMW_RET_UNSUPPORTED
37 
38 // rcl specific ret codes start at 100
40 #define RCL_RET_ALREADY_INIT 100
42 #define RCL_RET_NOT_INIT 101
44 #define RCL_RET_MISMATCHED_RMW_ID 102
46 #define RCL_RET_TOPIC_NAME_INVALID 103
48 #define RCL_RET_SERVICE_NAME_INVALID 104
50 #define RCL_RET_UNKNOWN_SUBSTITUTION 105
52 #define RCL_RET_ALREADY_SHUTDOWN 106
53 
54 // rcl node specific ret codes in 2XX
56 #define RCL_RET_NODE_INVALID 200
58 #define RCL_RET_NODE_INVALID_NAME 201
60 #define RCL_RET_NODE_INVALID_NAMESPACE 202
62 #define RCL_RET_NODE_NAME_NON_EXISTENT 203
63 
64 // rcl publisher specific ret codes in 3XX
66 #define RCL_RET_PUBLISHER_INVALID 300
67 
68 // rcl subscription specific ret codes in 4XX
70 #define RCL_RET_SUBSCRIPTION_INVALID 400
72 #define RCL_RET_SUBSCRIPTION_TAKE_FAILED 401
73 
74 // rcl service client specific ret codes in 5XX
76 #define RCL_RET_CLIENT_INVALID 500
78 #define RCL_RET_CLIENT_TAKE_FAILED 501
79 
80 // rcl service server specific ret codes in 6XX
82 #define RCL_RET_SERVICE_INVALID 600
84 #define RCL_RET_SERVICE_TAKE_FAILED 601
85 
86 // rcl guard condition specific ret codes in 7XX
87 
88 // rcl timer specific ret codes in 8XX
90 #define RCL_RET_TIMER_INVALID 800
92 #define RCL_RET_TIMER_CANCELED 801
93 
94 // rcl wait and wait set specific ret codes in 9XX
96 #define RCL_RET_WAIT_SET_INVALID 900
98 #define RCL_RET_WAIT_SET_EMPTY 901
100 #define RCL_RET_WAIT_SET_FULL 902
101 
102 // rcl argument parsing specific ret codes in 1XXX
104 #define RCL_RET_INVALID_REMAP_RULE 1001
106 #define RCL_RET_WRONG_LEXEME 1002
108 #define RCL_RET_INVALID_ROS_ARGS 1003
110 #define RCL_RET_INVALID_PARAM_RULE 1010
112 #define RCL_RET_INVALID_LOG_LEVEL_RULE 1020
113 
114 // rcl event specific ret codes in 20XX
116 #define RCL_RET_EVENT_INVALID 2000
118 #define RCL_RET_EVENT_TAKE_FAILED 2001
119 
122 #define RCL_RET_LIFECYCLE_STATE_REGISTERED 3000
124 #define RCL_RET_LIFECYCLE_STATE_NOT_REGISTERED 3001
125 
127 typedef rmw_serialized_message_t rcl_serialized_message_t;
128 
129 #endif // RCL__TYPES_H_
rmw_serialized_message_t rcl_serialized_message_t
typedef for rmw_serialized_message_t;
Definition: types.h:127
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23