Enum ctre_sys::ErrorCode [−][src]
#[repr(i32)]pub enum ErrorCode { OK, CAN_MSG_STALE, TxFailed, InvalidParamValue, RxTimeout, TxTimeout, UnexpectedArbId, BufferFull, CAN_OVERFLOW, SensorNotPresent, FirmwareTooOld, CouldNotChangePeriod, GeneralError, SigNotUpdated, NotAllPIDValuesUpdated, GEN_PORT_ERROR, PORT_MODULE_TYPE_MISMATCH, GEN_MODULE_ERROR, MODULE_NOT_INIT_SET_ERROR, MODULE_NOT_INIT_GET_ERROR, WheelRadiusTooSmall, TicksPerRevZero, DistanceBetweenWheelsTooSmall, GainsAreNotSet, IncompatibleMode, InvalidHandle, FeatureRequiresHigherFirm, TalonFeatureRequiresHigherFirm, PulseWidthSensorNotPresent, GeneralWarning, FeatureNotSupported, NotImplemented, FirmVersionCouldNotBeRetrieved, FeaturesNotAvailableYet, ControlModeNotValid, ControlModeNotSupportedYet, AuxiliaryPIDNotSupportedYet, RemoteSensorsNotSupportedYet, MotProfFirmThreshold, MotProfFirmThreshold2, }
Variants
OK
No Error - Function executed as expected
CAN_MSG_STALE
TxFailed
Could not transmit the CAN frame.
InvalidParamValue
Caller passed an invalid param
RxTimeout
CAN frame has not been received within specified period of time.
TxTimeout
Not used.
UnexpectedArbId
Specified CAN Id is invalid.
BufferFull
Caller attempted to insert data into a buffer that is full.
CAN_OVERFLOW
SensorNotPresent
Sensor is not present
FirmwareTooOld
CouldNotChangePeriod
GeneralError
User Specified General Error
SigNotUpdated
Have not received an value response for signal.
NotAllPIDValuesUpdated
GEN_PORT_ERROR
PORT_MODULE_TYPE_MISMATCH
GEN_MODULE_ERROR
MODULE_NOT_INIT_SET_ERROR
MODULE_NOT_INIT_GET_ERROR
WheelRadiusTooSmall
TicksPerRevZero
DistanceBetweenWheelsTooSmall
GainsAreNotSet
IncompatibleMode
InvalidHandle
Handle does not match stored map of handles
FeatureRequiresHigherFirm
TalonFeatureRequiresHigherFirm
PulseWidthSensorNotPresent
Special Code for "isSensorPresent"
GeneralWarning
FeatureNotSupported
feature not implement in the API or firmware
NotImplemented
feature not implement in the API
FirmVersionCouldNotBeRetrieved
FeaturesNotAvailableYet
feature will be release in an upcoming release
ControlModeNotValid
Current control mode of motor controller not valid for this call
ControlModeNotSupportedYet
AuxiliaryPIDNotSupportedYet
RemoteSensorsNotSupportedYet
MotProfFirmThreshold
MotProfFirmThreshold2
Methods
impl ErrorCode
[src]
impl ErrorCode
pub fn is_ok(self) -> bool
[src]
pub fn is_ok(self) -> bool
Returns true
if the error code is OK
.
pub fn is_err(self) -> bool
[src]
pub fn is_err(self) -> bool
Returns true
if the error code is not OK
.
pub fn or(self, err: Self) -> Self
[src]
pub fn or(self, err: Self) -> Self
Returns err
if self
is OK
, otherwise returns self
.
Intended for use by the ctre
crate only.
pub fn into_res(self) -> Result<(), Self>
[src]
pub fn into_res(self) -> Result<(), Self>
Returns an Ok
if the error code is OK
, or an Err
otherwise.
Trait Implementations
impl Debug for ErrorCode
[src]
impl Debug for ErrorCode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for ErrorCode
[src]
impl Copy for ErrorCode
impl Clone for ErrorCode
[src]
impl Clone for ErrorCode
fn clone(&self) -> ErrorCode
[src]
fn clone(&self) -> ErrorCode
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for ErrorCode
[src]
impl PartialEq for ErrorCode
fn eq(&self, other: &ErrorCode) -> bool
[src]
fn eq(&self, other: &ErrorCode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for ErrorCode
[src]
impl Eq for ErrorCode
impl Hash for ErrorCode
[src]
impl Hash for ErrorCode
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Error for ErrorCode
[src]
impl Error for ErrorCode
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl Display for ErrorCode
[src]
impl Display for ErrorCode