cmvr-es/cmvr-es/manager/safety_manager/include/safety_reason.h

49 lines
1000 B
C++

#pragma once
#include <string>
namespace cmvr::safety {
enum class SafetyReason {
None,
InvalidArgument,
Unauthenticated,
PermissionDenied,
RecoveryRpcDisabled,
DeviceNotFound,
DeviceUnavailable,
UnsupportedCommand,
SystemStarting,
SystemStopping,
SafetyLatched,
SafetyStateMissing,
SafetyStateStale,
HardwareUnsafe,
EmergencyStopActive,
ProtectiveStopActive,
DeviceDisconnected,
DeviceFault,
DeviceNotReady,
DeviceStillMoving,
ControlBusy,
GenerationMismatch,
CommandIdRequired,
CommandIdConflict,
ResultEvicted,
LedgerExhausted,
Backpressure,
DeadlineExceededBeforeDispatch,
OutcomeUnknown,
ParticipantTimeout,
StopUnconfirmed,
RecoveryEpochMismatch,
RecoveryReasonRequired,
RecoveryAuditFailed,
InternalError,
};
const char* toString(SafetyReason reason) noexcept;
bool retryWithSameCommandId(SafetyReason reason) noexcept;
} // namespace cmvr::safety