CTRE Phoenix Pro C++ 23.0.12
StatusCodes.h File Reference

Go to the source code of this file.

Typedefs

typedef enum _StatusCode_t StatusCode_t
 Typedef enum of the StatusCode for use in C projects. More...
 

Enumerations

enum  _StatusCode_t {
  OK = 0 , InvalidDeviceSpec = -101 , EcuIsNotPresent = -102 , CouldNotEnterBl = -103 ,
  CouldNotConfirmBl = -104 , CouldNotErase = -105 , CouldNotSendFlash = -106 , CouldNotValidate = -107 ,
  CouldNotRunApp = -108 , CouldNotReqSetId = -109 , CouldNotConfirmId = -110 , FlashWasGood = -111 ,
  AppTooOld = -112 , CouldNotReqSetDesc = -113 , CompileSzIsWrong = -114 , GadgeteerDeviceNoSetId = -115 ,
  InvalidTask = -116 , NotImplemented = -117 , NoDevicesOnBus = -118 , MoreThanOneFile = -119 ,
  NodeIsInvalid = -120 , InvalidDeviceDescriptor = -121 , CouldNotSendCanFrame = -123 , NormalModeMsgNotPresent = -124 ,
  FeatureNotSupported = -125 , NotUpdating = -126 , CorruptedPOST = -127 , NoConfigs = -128 ,
  ConfigFailed = -129 , CouldNotReqFactoryDefault = -130 , CustomNameNotSupported = -131 , ConfigReadWriteMismatch = -132 ,
  CouldNotReqSetConfigs = -133 , InsufficientSz = -134 , InvalidModel = -135 , CouldNotReqDevInfo = -140 ,
  NoControls = -141 , DeviceIsNull = -142 , DeviceDidNotRespondToDiagReq = -143 , OnlySupportedInTunerX = -144 ,
  CanivCliError = -145 , InvalidCrfBadHeader = -200 , InvalidCrfFileSzInvald = -201 , InvalidCrfWrongProduct = -202 ,
  InvalidCrfNoSects = -203 , InvalidCrfBadSectHeader = -204 , InvalidCrfBadSectSize = -205 , NoCrfFile = -206 ,
  CouldNotFindDynamicId = -300 , DidNotGetDhcp = -301 , DidNotGetFullDhcp = -302 , InvalidLicenseResp = -350 ,
  InvalidCanivCache = -351 , CannotOpenSerialPort = -500 , CannotWriteSerialPort = -501 , CannotReadSerialPort = -502 ,
  CannotSerialToDevice = -503 , NoSerialControlFrameResp = -504 , CannotOpenUdpPort = -600 , CannotWriteUdpPort = -601 ,
  CannotReadUdpPort = -602 , CannotUdpToDevice = -603 , NoUdpControlFrameResp = -604 , TimeoutIso15Response = -605 ,
  InvalidJson = -700 , AppIsTerminating = -800 , CanMessageStale = 1000 , BufferFull = 1006 ,
  PulseWidthSensorNotPresent = 1010 , GeneralWarning = 1100 , FirmVersionCouldNotBeRetrieved = 1103 , FeaturesNotAvailableYet = 1104 ,
  ControlModeNotValid = 1105 , ControlModeNotSupportedYet = 1106 , MotProfFirmThreshold = 1109 , MotProfFirmThreshold2 = 1110 ,
  SimDeviceNotFound = 1200 , SimPhysicsTypeNotSupported = 1201 , SimDeviceAlreadyExists = 1202 , TxFailed = -1001 ,
  InvalidParamValue = -1002 , RxTimeout = -1003 , TxTimeout = -1004 , UnexpectedArbId = -1005 ,
  CanOverflowed = -1006 , SensorNotPresent = -1007 , FirmwareTooOld = -1008 , CouldNotChangePeriod = -1009 ,
  BufferFailure = -1010 , FirmwareNonFRC = -1011 , GeneralError = -1100 , SigNotUpdated = -1200 ,
  NotAllPIDValuesUpdated = -1201 , GEN_PORT_ERROR = -1300 , PORT_MODULE_TYPE_MISMATCH = -1301 , GEN_MODULE_ERROR = -1400 ,
  MODULE_NOT_INIT_SET_ERROR = -1401 , MODULE_NOT_INIT_GET_ERROR = -1402 , WheelRadiusTooSmall = -1500 , TicksPerRevZero = -1501 ,
  DistanceBetweenWheelsTooSmall = -1502 , GainsAreNotSet = -1503 , WrongRemoteLimitSwitchSource = -1504 , DoubleVoltageCompensatingWPI = -1505 ,
  CANdleAnimSlotOutOfBounds = -1506 , IncompatibleMode = -1600 , InvalidHandle = -1601 , FeatureRequiresHigherFirm = -1700 ,
  ConfigFactoryDefaultRequiresHigherFirm = -1702 , ConfigMotionSCurveRequiresHigherFirm = -1703 , TalonFXFirmwarePreVBatDetect = -1704 , CANdleAnimationsRequireHigherFirm = -1705 ,
  LibraryCouldNotBeLoaded = -1800 , MissingRoutineInLibrary = -1801 , ResourceNotAvailable = -1802 , MusicFileNotFound = -1900 ,
  MusicFileWrongSize = -1901 , MusicFileTooNew = -1902 , MusicFileInvalid = -1903 , InvalidOrchestraAction = -1904 ,
  MusicFileTooOld = -1905 , MusicInterrupted = -1906 , MusicNotSupported = -1907 , kInvalidInterface = -2000 ,
  kInvalidGuid = -2001 , kInvalidClass = -2002 , kInvalidProtocol = -2003 , kInvalidPath = -2004 ,
  kGeneralWinUsbError = -2005 , kFailedSetup = -2006 , kListenFailed = -2007 , kSendFailed = -2008 ,
  kReceiveFailed = -2009 , kInvalidRespFormat = -2010 , kWinUsbInitFailed = -2011 , kWinUsbQueryFailed = -2012 ,
  kWinUsbGeneralError = -2013 , kAccessDenied = -2014 , kFirmwareInvalidResponse = -2015 , StatusCodeNotInitialized = -10000 ,
  WarningNotInitialized = 10000 , HwTimestampOutOfSync = 10001 , InvalidNetwork = -10001 , MultiSignalNotSupported = -10002 ,
  CouldNotCast = -10003 , NotFound = -10004 , NotSupported = -10005 , MissingContext = -10006 ,
  ModelMismatch = -10007 , SerialMismatch = -10008 , NoFile = -10009 , LicenseDownloadFailed = -10010 ,
  SelfTestIsEmpty = -10011 , SignalLookupFailed = -10012 , InvalidModeToGetSignal = -10013 , UnlicensedDevice = -10014 ,
  InvalidSize = -10015 , InvalidLicenseResponse = -10016 , InvalidContext = -10017 , InternalError = -10018 ,
  TaskIsBusy = -10019 , kDeviceResponseIncorrect = -10020 , kErrorPollingForDevices = -10021 , CouldNotRetrieveProFirmware = -10022 ,
  CouldNotDecodeDeviceFirmware = -10023 , InvalidIDToFollow = -10024
}
 Typedef enum of the StatusCode for use in C projects. More...
 

Functions

const char * GetStatusCodeName (StatusCode_t value)
 Get the name of the StatusCode passed. More...
 
const char * GetStatusCodeDescription (StatusCode_t value)
 Get the description of the StatusCode passed. More...
 

Typedef Documentation

◆ StatusCode_t

Typedef enum of the StatusCode for use in C projects.

Enumeration Type Documentation

◆ _StatusCode_t

Typedef enum of the StatusCode for use in C projects.

Enumerator
OK 

No Error.

InvalidDeviceSpec 

InvalidDeviceSpec.

EcuIsNotPresent 

EcuIsNotPresent.

CouldNotEnterBl 

CouldNotEnterBl.

CouldNotConfirmBl 

CouldNotConfirmBl.

CouldNotErase 

CouldNotErase.

CouldNotSendFlash 

CouldNotSendFlash.

CouldNotValidate 

CouldNotValidate.

CouldNotRunApp 

CouldNotRunApp.

CouldNotReqSetId 

CouldNotReqSetId.

CouldNotConfirmId 

CouldNotConfirmId.

FlashWasGood 

FlashWasGood.

AppTooOld 

AppTooOld.

CouldNotReqSetDesc 

CouldNotReqSetDesc.

CompileSzIsWrong 

CompileSzIsWrong.

GadgeteerDeviceNoSetId 

GadgeteerDeviceNoSetId.

InvalidTask 

InvalidTask.

NotImplemented 

Not Implemented, check latest installer.

NoDevicesOnBus 

NoDevicesOnBus.

MoreThanOneFile 

MoreThanOneFile.

NodeIsInvalid 

NodeIsInvalid.

InvalidDeviceDescriptor 

InvalidDeviceDescriptor.

CouldNotSendCanFrame 

CouldNotSendCanFrame.

NormalModeMsgNotPresent 

NormalModeMsgNotPresent.

FeatureNotSupported 

This feature is not supported.

NotUpdating 

NotUpdating.

CorruptedPOST 

CorruptedPOST.

NoConfigs 

NoConfigs.

ConfigFailed 

ConfigFailed.

CouldNotReqFactoryDefault 

CouldNotReqFactoryDefault.

CustomNameNotSupported 

CustomNameNotSupported.

ConfigReadWriteMismatch 

ConfigReadWriteMismatch.

CouldNotReqSetConfigs 

CouldNotReqSetConfigs.

InsufficientSz 

InsufficientSz.

InvalidModel 

InvalidModel.

CouldNotReqDevInfo 

CouldNotReqDevInfo.

NoControls 

NoControls.

DeviceIsNull 

DeviceIsNull.

DeviceDidNotRespondToDiagReq 

DeviceDidNotRespondToDiagReq.

OnlySupportedInTunerX 

OnlySupportedInTunerX.

CanivCliError 

CanivCliError.

InvalidCrfBadHeader 

InvalidCrfBadHeader.

InvalidCrfFileSzInvald 

InvalidCrfFileSzInvald.

InvalidCrfWrongProduct 

InvalidCrfWrongProduct.

InvalidCrfNoSects 

InvalidCrfNoSects.

InvalidCrfBadSectHeader 

InvalidCrfBadSectHeader.

InvalidCrfBadSectSize 

InvalidCrfBadSectSize.

NoCrfFile 

NoCrfFile.

CouldNotFindDynamicId 

CouldNotFindDynamicId.

DidNotGetDhcp 

DidNotGetDhcp.

DidNotGetFullDhcp 

DidNotGetFullDhcp.

InvalidLicenseResp 

InvalidLicenseResp.

InvalidCanivCache 

InvalidCanivCache.

CannotOpenSerialPort 

CannotOpenSerialPort.

CannotWriteSerialPort 

CannotWriteSerialPort.

CannotReadSerialPort 

CannotReadSerialPort.

CannotSerialToDevice 

CannotSerialToDevice.

NoSerialControlFrameResp 

NoSerialControlFrameResp.

CannotOpenUdpPort 

CannotOpenUdpPort.

CannotWriteUdpPort 

CannotWriteUdpPort.

CannotReadUdpPort 

CannotReadUdpPort.

CannotUdpToDevice 

CannotUdpToDevice.

NoUdpControlFrameResp 

NoUdpControlFrameResp.

TimeoutIso15Response 

TimeoutIso15Response.

InvalidJson 

InvalidJson.

AppIsTerminating 

AppIsTerminating.

CanMessageStale 

CAN Message is stale.

BufferFull 

Buffer is full, cannot insert more data.

PulseWidthSensorNotPresent 

PulseWidthSensorNotPresent.

GeneralWarning 

General Warning Occurred.

FirmVersionCouldNotBeRetrieved 

Firm Vers could not be retrieved.

Use Phoenix Tuner to check ID and firmware(CRF) version.

FeaturesNotAvailableYet 

This feature will be supported in a future update.

ControlModeNotValid 

The control mode is not valid for this function.

ControlModeNotSupportedYet 

This control mode is not supported yet.

A future release will supported this soon.

MotProfFirmThreshold 

Motor Controller must have >= 3.2 firmware for motion profile control mode.

MotProfFirmThreshold2 

Motor Controller must have >= 3.4 firmware for advanced PID0/PID1 features.

SimDeviceNotFound 

SimDeviceNotFound.

SimPhysicsTypeNotSupported 

SimPhysicsTypeNotSupported.

SimDeviceAlreadyExists 

SimDeviceAlreadyExists.

TxFailed 

Could not transmit CAN Frame.

InvalidParamValue 

Incorrect argument passed into function/VI.

RxTimeout 

CAN frame not received/too-stale.

TxTimeout 

CAN Transmit timed out.

UnexpectedArbId 

ArbID is incorrect.

CanOverflowed 

CanOverflowed.

SensorNotPresent 

Sensor Not Present.

FirmwareTooOld 

Firmware Too Old.

Use Phoenix Tuner to field upgrade your CTRE CAN device firmware(CRF). Then restart your robot application to clear this error.

CouldNotChangePeriod 

Control Frame Period could not be changed.

Most likely it is not being transmitted.

BufferFailure 

BufferFailure.

FirmwareNonFRC 

Firmware is legacy non-FRC version.

Use Phoenix Tuner to field upgrade your CTRE CAN device firmware(CRF). Firmware greater than 20.0 required.

GeneralError 

General Error Occurred.

SigNotUpdated 

No new response to update signal.

NotAllPIDValuesUpdated 

NotAllPIDValuesUpdated.

GEN_PORT_ERROR 

GEN_PORT_ERROR.

PORT_MODULE_TYPE_MISMATCH 

PORT_MODULE_TYPE_MISMATCH.

GEN_MODULE_ERROR 

GEN_MODULE_ERROR.

MODULE_NOT_INIT_SET_ERROR 

MODULE_NOT_INIT_SET_ERROR.

MODULE_NOT_INIT_GET_ERROR 

MODULE_NOT_INIT_GET_ERROR.

WheelRadiusTooSmall 

Wheel Radius is too small, cannot get distance traveled.

TicksPerRevZero 

Ticks per revolution is 0, cannot get heading.

DistanceBetweenWheelsTooSmall 

Distance between wheels is too small, cannot get heading.

GainsAreNotSet 

GainsAreNotSet.

WrongRemoteLimitSwitchSource 

Use RemoteLimitSwitchSource instead of LimitSwitchSource.

DoubleVoltageCompensatingWPI 

Motor Controller Voltage Compensation should not be used with setVoltage().

This causes compensation to happen twice. Disable Voltage Compensation by calling enableVoltageCompensation(false) in order to use setVoltage().

CANdleAnimSlotOutOfBounds 

CANdleAnimSlotOutOfBounds.

IncompatibleMode 

IncompatibleMode.

InvalidHandle 

Handle passed into function is incorrect.

FeatureRequiresHigherFirm 

Features requires newer firmware version.

ConfigFactoryDefaultRequiresHigherFirm 

Config factory default features require firmware >=3.10.

ConfigMotionSCurveRequiresHigherFirm 

Config Motion S Curve Strength features require firmware >=4.16.

TalonFXFirmwarePreVBatDetect 

Talon FX(Falcon 500) Firmware Too Old.

Use Phoenix Tuner to field upgrade your CTRE CAN device firmware(CRF) to >=20.3. Then restart your robot application to clear this error.

CANdleAnimationsRequireHigherFirm 

CANdleAnimationsRequireHigherFirm.

LibraryCouldNotBeLoaded 

LibraryCouldNotBeLoaded.

MissingRoutineInLibrary 

MissingRoutineInLibrary.

ResourceNotAvailable 

ResourceNotAvailable.

MusicFileNotFound 

Could not find music file specified, try specifying an absolute path.

MusicFileWrongSize 

Music file size is incorrect, could not parse correctly.

Ensure you're using Tuner to generate file.

MusicFileTooNew 

Music file version is too new, update Phoenix to utilize this file.

MusicFileInvalid 

Music file is invalid.

Ensure you're using Tuner to generate file.

InvalidOrchestraAction 

An invalid orchestra action occurred.

Ensure a music file is loaded.

MusicFileTooOld 

This music file version is too old.

Regenerate file using Tuner.

MusicInterrupted 

Music interrupted due to one of the instruments being commanded a different control mode.

Press Play to resume music.

MusicNotSupported 

This device doesn't support MusicTone control mode.

kInvalidInterface 

kInvalidInterface

kInvalidGuid 

kInvalidGuid

kInvalidClass 

kInvalidClass

kInvalidProtocol 

kInvalidProtocol

kInvalidPath 

kInvalidPath

kGeneralWinUsbError 

kGeneralWinUsbError

kFailedSetup 

kFailedSetup

kListenFailed 

kListenFailed

kSendFailed 

kSendFailed

kReceiveFailed 

kReceiveFailed

kInvalidRespFormat 

kInvalidRespFormat

kWinUsbInitFailed 

kWinUsbInitFailed

kWinUsbQueryFailed 

kWinUsbQueryFailed

kWinUsbGeneralError 

kWinUsbGeneralError

kAccessDenied 

kAccessDenied

kFirmwareInvalidResponse 

kFirmwareInvalidResponse

StatusCodeNotInitialized 

This StatusCode has not been initialized.

Make sure the StatusCode is getting assigned to the return of a method.

WarningNotInitialized 

WarningNotInitialized.

HwTimestampOutOfSync 

The timestamp reported by CANivore is at least 10ms older than the timestamp reported by the system, indicating it's fallen out of sync.

This does not impact the data of this message, only the timing.

InvalidNetwork 

InvalidNetwork.

MultiSignalNotSupported 

MultiSignalNotSupported.

CouldNotCast 

Could not cast from base value to this particular signal's type.

NotFound 

Could not find this value when searching for it.

NotSupported 

This is not supported.

MissingContext 

Could not determine context from this device hash.

ModelMismatch 

Model name in license file does not match model name of selected device.

SerialMismatch 

Serial Number in license file does not match model name of selected device.

NoFile 

Could not find specified file.

LicenseDownloadFailed 

License did not successfully download to Device.

SelfTestIsEmpty 

Self Test report does not have any values, is the firmware up to date?

SignalLookupFailed 

Failed to lookup signal properties.

This can happen if the fimware is too new and supports signals that older APIs do not support.

InvalidModeToGetSignal 

The current mode of the device is invalid for getting this signal.

UnlicensedDevice 

Device is not licensed.

Cannot get any data from it.

InvalidSize 

Size is invalid.

InvalidLicenseResponse 

InvalidLicenseResponse.

InvalidContext 

InvalidContext.

InternalError 

InternalError.

TaskIsBusy 

TaskIsBusy.

kDeviceResponseIncorrect 

kDeviceResponseIncorrect

kErrorPollingForDevices 

kErrorPollingForDevices

CouldNotRetrieveProFirmware 

Device firmware could not be retrieved.

Check that the device is running Pro firmware, that the device ID is correct, that the specified CAN bus is correct, and that the device is powered.

CouldNotDecodeDeviceFirmware 

Device firmware could not be decoded.

Check that the device is running Pro firmware, that the device ID is correct, that the specified CAN bus is correct, and that the device is powered.

InvalidIDToFollow 

The values specified for master are in valid.

Make sure the Device ID of master are correct.

Function Documentation

◆ GetStatusCodeDescription()

const char * GetStatusCodeDescription ( StatusCode_t  value)

Get the description of the StatusCode passed.

Parameters
valueStatusCode to get description of
Returns
const char* Description of StatusCode

◆ GetStatusCodeName()

const char * GetStatusCodeName ( StatusCode_t  value)

Get the name of the StatusCode passed.

Parameters
valueStatusCode to get name of
Returns
const char* Name of StatusCode