@@ -201,6 +201,26 @@ pub enum RclReturnCode {
201
201
EventInvalid = 2000 ,
202
202
/// Failed to take an event from the event handle
203
203
EventTakeFailed = 2001 ,
204
+ // ====== 2XXX: action-specific errors ======
205
+ /// Action name does not pass validation
206
+ // TODO(nwn): Consult with upstream about this reused error code.
207
+ // ActionNameInvalid = 2000,
208
+ /// Action goal accepted
209
+ ActionGoalAccepted = 2100 ,
210
+ /// Action goal rejected
211
+ ActionGoalRejected = 2101 ,
212
+ /// Action client is invalid
213
+ ActionClientInvalid = 2102 ,
214
+ /// Action client failed to take response
215
+ ActionClientTakeFailed = 2103 ,
216
+ /// Action server is invalid
217
+ ActionServerInvalid = 2200 ,
218
+ /// Action server failed to take request
219
+ ActionServerTakeFailed = 2201 ,
220
+ /// Action goal handle invalid
221
+ ActionGoalHandleInvalid = 2300 ,
222
+ /// Action invalid event
223
+ ActionGoalEventInvalid = 2301 ,
204
224
// ====== 30XX: lifecycle-specific errors ======
205
225
/// `rcl_lifecycle` state registered
206
226
LifecycleStateRegistered = 3000 ,
@@ -249,6 +269,15 @@ impl TryFrom<i32> for RclReturnCode {
249
269
x if x == Self :: InvalidLogLevelRule as i32 => Self :: InvalidLogLevelRule ,
250
270
x if x == Self :: EventInvalid as i32 => Self :: EventInvalid ,
251
271
x if x == Self :: EventTakeFailed as i32 => Self :: EventTakeFailed ,
272
+ // x if x == Self::ActionNameInvalid as i32 => Self::ActionNameInvalid,
273
+ x if x == Self :: ActionGoalAccepted as i32 => Self :: ActionGoalAccepted ,
274
+ x if x == Self :: ActionGoalRejected as i32 => Self :: ActionGoalRejected ,
275
+ x if x == Self :: ActionClientInvalid as i32 => Self :: ActionClientInvalid ,
276
+ x if x == Self :: ActionClientTakeFailed as i32 => Self :: ActionClientTakeFailed ,
277
+ x if x == Self :: ActionServerInvalid as i32 => Self :: ActionServerInvalid ,
278
+ x if x == Self :: ActionServerTakeFailed as i32 => Self :: ActionServerTakeFailed ,
279
+ x if x == Self :: ActionGoalHandleInvalid as i32 => Self :: ActionGoalHandleInvalid ,
280
+ x if x == Self :: ActionGoalEventInvalid as i32 => Self :: ActionGoalEventInvalid ,
252
281
x if x == Self :: LifecycleStateRegistered as i32 => Self :: LifecycleStateRegistered ,
253
282
x if x == Self :: LifecycleStateNotRegistered as i32 => Self :: LifecycleStateNotRegistered ,
254
283
other => {
@@ -330,6 +359,15 @@ impl Display for RclReturnCode {
330
359
Self :: EventTakeFailed => {
331
360
"Failed to take an event from the event handle (RCL_RET_EVENT_TAKE_FAILED)."
332
361
}
362
+ // Self::ActionNameInvalid => "Action name does not pass validation (RCL_RET_ACTION_NAME_INVALID).",
363
+ Self :: ActionGoalAccepted => "Action goal accepted (RCL_RET_ACTION_GOAL_ACCEPTED)." ,
364
+ Self :: ActionGoalRejected => "Action goal rejected (RCL_RET_ACTION_GOAL_REJECTED)." ,
365
+ Self :: ActionClientInvalid => "Action client is invalid (RCL_RET_ACTION_CLIENT_INVALID)." ,
366
+ Self :: ActionClientTakeFailed => "Action client failed to take response (RCL_RET_ACTION_CLIENT_TAKE_FAILED)." ,
367
+ Self :: ActionServerInvalid => "Action server is invalid (RCL_RET_ACTION_SERVER_INVALID)." ,
368
+ Self :: ActionServerTakeFailed => "Action server failed to take request (RCL_RET_ACTION_SERVER_TAKE_FAILED)." ,
369
+ Self :: ActionGoalHandleInvalid => "Action goal handle invalid (RCL_RET_ACTION_GOAL_HANDLE_INVALID)." ,
370
+ Self :: ActionGoalEventInvalid => "Action invalid event (RCL_RET_ACTION_GOAL_EVENT_INVALID)." ,
333
371
Self :: LifecycleStateRegistered => {
334
372
"`rcl_lifecycle` state registered (RCL_RET_LIFECYCLE_STATE_REGISTERED)."
335
373
}
0 commit comments