phoenix6.status_code#

Module Contents#

class phoenix6.status_code.StatusCode(*args, **kwds)#

Bases: enum.Enum

Status codes reported by APIs, including OK, warnings, and errors.

property name: str#

Gets the name of this StatusCode.

Returns:

Name of this StatusCode

Return type:

str

property description: str#

Gets the description of this StatusCode.

Returns:

Description of this StatusCode

Return type:

str

OK = 0#

No Error

TASK_IS_BUSY#

Diagnostic Server is busy with another command.

INVALID_DEVICE_SPEC#

InvalidDeviceSpec

ECU_IS_NOT_PRESENT#

Device is not present. Verify the device is connected and powered, and that the CAN bus is terminated.

COULD_NOT_ENTER_BL#

Could not put the device into bootloader mode.

COULD_NOT_CONFIRM_BL#

Could not confirm the device has entered the bootloader.

COULD_NOT_ERASE#

Could not erase flash.

COULD_NOT_SEND_FLASH#

Could not field upgrade the device.

COULD_NOT_VALIDATE#

Bootloader could not verify integrity of the flashed application.

COULD_NOT_RUN_APP#

Could not run the device firmware application.

COULD_NOT_REQ_SET_ID#

Unable to set ID to this device.

COULD_NOT_CONFIRM_ID#

Could not verify that the changed ID took effect.

FLASH_WAS_GOOD#

Device field upgrade was successful.

APP_TOO_OLD#

Device firmware application is too old.

COULD_NOT_REQ_SET_DESC#

Unable to set name to this device.

COMPILE_SZ_IS_WRONG#

CompileSzIsWrong

GADGETEER_DEVICE_NO_SET_ID#

Cannot set the ID of a gadgeteer device.

INVALID_TASK#

This diagnostic action is not supported.

NOT_IMPLEMENTED#

Not Implemented, check latest installer.

NO_DEVICES_ON_BUS#

NoDevicesOnBus

MORE_THAN_ONE_FILE#

MoreThanOneFile

NODE_IS_INVALID#

Specified device was not found. Verify the device is connected and powered, and that the CAN bus is terminated.

INVALID_DEVICE_DESCRIPTOR#

InvalidDeviceDescriptor

COULD_NOT_SEND_CAN_FRAME#

CouldNotSendCanFrame

NORMAL_MODE_MSG_NOT_PRESENT#

NormalModeMsgNotPresent

FEATURE_NOT_SUPPORTED#

This feature is not supported.

NOT_UPDATING#

The diagnostic server is not field upgrading any devices.

CORRUPTED_POST#

CorruptedPOST

NO_CONFIGS#

This device did not report any available configs. Verify firmware and diagnostics are up-to-date.

CONFIG_FAILED#

ConfigFailed

COULD_NOT_REQ_FACTORY_DEFAULT#

Unable to factory default this device.

CUSTOM_NAME_NOT_SUPPORTED#

CustomNameNotSupported

CONFIG_READ_WRITE_MISMATCH#

The configs read from the device do not match the configs that were written.

COULD_NOT_REQ_SET_CONFIGS#

Could not apply the device configs.

INSUFFICIENT_SZ#

InsufficientSz

INVALID_MODEL#

This feature is not supported for this device model.

COULD_NOT_REQ_DEV_INFO#

CouldNotReqDevInfo

NO_CONTROLS#

This device does not support new controls.

DEVICE_IS_NULL#

DeviceIsNull

DEVICE_DID_NOT_RESPOND_TO_DIAG_REQ#

DeviceDidNotRespondToDiagReq

ONLY_SUPPORTED_IN_TUNERX#

This feature requires Tuner X.

CANIV_CLI_ERROR#

Command-line issue with caniv.

INVALID_CRF_BAD_HEADER#

InvalidCrfBadHeader

INVALID_CRF_FILE_SZ_INVALD#

InvalidCrfFileSzInvald

INVALID_CRF_WRONG_PRODUCT#

Specified CRF is for the wrong product.

INVALID_CRF_NO_SECTS#

InvalidCrfNoSects

INVALID_CRF_BAD_SECT_HEADER#

InvalidCrfBadSectHeader

INVALID_CRF_BAD_SECT_SIZE#

InvalidCrfBadSectSize

NO_CRF_FILE#

Specified CRF file could not be found.

COULD_NOT_FIND_DYNAMIC_ID#

CouldNotFindDynamicId

DID_NOT_GET_DHCP#

DidNotGetDhcp

DID_NOT_GET_FULL_DHCP#

DidNotGetFullDhcp

INVALID_LICENSE_RESP#

InvalidLicenseResp

INVALID_CANIV_CACHE#

InvalidCanivCache

CANNOT_OPEN_SERIAL_PORT#

CannotOpenSerialPort

CANNOT_WRITE_SERIAL_PORT#

CannotWriteSerialPort

CANNOT_READ_SERIAL_PORT#

CannotReadSerialPort

CANNOT_SERIAL_TO_DEVICE#

CannotSerialToDevice

NO_SERIAL_CONTROL_FRAME_RESP#

NoSerialControlFrameResp

CANNOT_OPEN_UDP_PORT#

CannotOpenUdpPort

CANNOT_WRITE_UDP_PORT#

CannotWriteUdpPort

CANNOT_READ_UDP_PORT#

CannotReadUdpPort

CANNOT_UDP_TO_DEVICE#

CannotUdpToDevice

NO_UDP_CONTROL_FRAME_RESP#

NoUdpControlFrameResp

TIMEOUT_ISO15_RESPONSE#

TimeoutIso15Response

INVALID_JSON#

InvalidJson

APP_IS_TERMINATING#

The user application is shutting down.

CAN_MESSAGE_STALE = 1000#

CAN Message is stale.

BUFFER_FULL = 1006#

Buffer is full, cannot insert more data.

PULSE_WIDTH_SENSOR_NOT_PRESENT = 1010#

PulseWidthSensorNotPresent

GENERAL_WARNING = 1100#

General Warning Occurred.

FIRM_VERSION_COULD_NOT_BE_RETRIEVED = 1103#

Firm Vers could not be retrieved. Use Phoenix Tuner X to check ID and firmware(CRF) version.

FEATURES_NOT_AVAILABLE_YET = 1104#

This feature will be supported in a future update.

CONTROL_MODE_NOT_VALID = 1105#

The control mode is not valid for this function.

CONTROL_MODE_NOT_SUPPORTED_YET = 1106#

This control mode is not supported yet. A future release will supported this soon.

MOT_PROF_FIRM_THRESHOLD = 1109#

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

MOT_PROF_FIRM_THRESHOLD2 = 1110#

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

SIM_DEVICE_NOT_FOUND = 1200#

SimDeviceNotFound

SIM_PHYSICS_TYPE_NOT_SUPPORTED = 1201#

SimPhysicsTypeNotSupported

SIM_DEVICE_ALREADY_EXISTS = 1202#

SimDeviceAlreadyExists

TX_FAILED#

Could not transmit CAN Frame.

INVALID_PARAM_VALUE#

An invalid argument was passed into the function/VI, such as a null pointer.

RX_TIMEOUT#

CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device.

TX_TIMEOUT#

CAN Transmit timed out.

UNEXPECTED_ARB_ID#

ArbID is incorrect.

CAN_OVERFLOWED#

CanOverflowed

SENSOR_NOT_PRESENT#

Sensor Not Present.

FIRMWARE_TOO_OLD#

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

COULD_NOT_CHANGE_PERIOD#

Control Frame Period could not be changed. Most likely it is not being transmitted.

BUFFER_FAILURE#

BufferFailure

FIRMWARE_NON_FRC#

Firmware is legacy non-FRC version. Use Phoenix Tuner X to field upgrade your CTRE CAN device firmware(CRF). Firmware greater than 20.0 required.

GENERAL_ERROR#

General Error Occurred.

SIG_NOT_UPDATED#

No new response to update signal.

NOT_ALL_PIDVALUES_UPDATED#

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

WHEEL_RADIUS_TOO_SMALL#

Wheel Radius is too small, cannot get distance traveled.

TICKS_PER_REV_ZERO#

Ticks per revolution is 0, cannot get heading.

DISTANCE_BETWEEN_WHEELS_TOO_SMALL#

Distance between wheels is too small, cannot get heading.

GAINS_ARE_NOT_SET#

GainsAreNotSet

WRONG_REMOTE_LIMIT_SWITCH_SOURCE#

Use RemoteLimitSwitchSource instead of LimitSwitchSource.

DOUBLE_VOLTAGE_COMPENSATING_WPI#

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().

CANDLE_ANIM_SLOT_OUT_OF_BOUNDS#

CANdleAnimSlotOutOfBounds

INCOMPATIBLE_MODE#

IncompatibleMode

INVALID_HANDLE#

Handle passed into function is incorrect.

FEATURE_REQUIRES_HIGHER_FIRM#

Features requires newer firmware version.

CONFIG_FACTORY_DEFAULT_REQUIRES_HIGHER_FIRM#

Config factory default features require firmware >=3.10.

CONFIG_MOTION_SCURVE_REQUIRES_HIGHER_FIRM#

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

TALON_FXFIRMWARE_PRE_VBAT_DETECT#

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.

CANDLE_ANIMATIONS_REQUIRE_HIGHER_FIRM#

CANdleAnimationsRequireHigherFirm

LIBRARY_COULD_NOT_BE_LOADED#

LibraryCouldNotBeLoaded

MISSING_ROUTINE_IN_LIBRARY#

MissingRoutineInLibrary

RESOURCE_NOT_AVAILABLE#

ResourceNotAvailable

MUSIC_FILE_NOT_FOUND#

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

MUSIC_FILE_WRONG_SIZE#

Music file size is incorrect, could not parse correctly. Ensure you’re using Tuner to generate file.

MUSIC_FILE_TOO_NEW#

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

MUSIC_FILE_INVALID#

Music file is invalid. Ensure you’re using Tuner to generate file.

INVALID_ORCHESTRA_ACTION#

An invalid orchestra action occurred. Ensure a music file is loaded.

MUSIC_FILE_TOO_OLD#

This music file version is too old. Regenerate file using Tuner.

MUSIC_INTERRUPTED#

Music interrupted due to one of the instruments being commanded a different control mode. Press Play to resume music.

MUSIC_NOT_SUPPORTED#

This device doesn’t support MusicTone control mode.

INVALID_INTERFACE#

kInvalidInterface

INVALID_GUID#

kInvalidGuid

INVALID_CLASS#

kInvalidClass

INVALID_PROTOCOL#

kInvalidProtocol

INVALID_PATH#

kInvalidPath

GENERAL_WIN_USB_ERROR#

kGeneralWinUsbError

FAILED_SETUP#

kFailedSetup

LISTEN_FAILED#

kListenFailed

SEND_FAILED#

kSendFailed

RECEIVE_FAILED#

kReceiveFailed

INVALID_RESP_FORMAT#

kInvalidRespFormat

WIN_USB_INIT_FAILED#

kWinUsbInitFailed

WIN_USB_QUERY_FAILED#

kWinUsbQueryFailed

WIN_USB_GENERAL_ERROR#

kWinUsbGeneralError

ACCESS_DENIED#

kAccessDenied

FIRMWARE_INVALID_RESPONSE#

kFirmwareInvalidResponse

STATUS_CODE_NOT_INITIALIZED#

This StatusCode has not been initialized. Make sure the StatusCode is getting assigned to the return of a method.

WARNING_NOT_INITIALIZED = 10000#

WarningNotInitialized

HW_TIMESTAMP_OUT_OF_SYNC = 10001#

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.

INVALID_NETWORK#

InvalidNetwork

MULTI_SIGNAL_NOT_SUPPORTED#

The CAN bus does not support multi-signal synchronization.

COULD_NOT_CAST#

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

NOT_FOUND#

Could not find this value when searching for it

NOT_SUPPORTED#

This is not supported

MISSING_CONTEXT#

Could not determine context from this device hash

MODEL_MISMATCH#

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

SERIAL_MISMATCH#

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

NO_FILE#

Could not find specified file.

LICENSE_DOWNLOAD_FAILED#

License did not successfully download to Device.

SELF_TEST_IS_EMPTY#

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

SIGNAL_LOOKUP_FAILED#

Failed to lookup signal properties. This can happen if the fimware is too new and supports signals that older APIs do not support.

INVALID_MODE_TO_GET_SIGNAL#

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

UNLICENSED_DEVICE#

Device is not licensed. Cannot get any data from it.

INVALID_SIZE#

Size is invalid.

INVALID_LICENSE_RESPONSE#

InvalidLicenseResponse

INVALID_CONTEXT#

InvalidContext

INTERNAL_ERROR#

InternalError

DEVICE_RESPONSE_INCORRECT#

kDeviceResponseIncorrect

ERROR_POLLING_FOR_DEVICES#

kErrorPollingForDevices

COULD_NOT_RETRIEVEV6_FIRMWARE#

Device firmware could not be retrieved. Check that the device is running v6 firmware, the device ID is correct, the specified CAN bus is correct, and the device is powered.

COULD_NOT_DECODE_DEVICE_FIRMWARE#

Device firmware could not be decoded. Check that the device is running v6 firmware, the device ID is correct, the specified CAN bus is correct, and the device is powered.

INVALID_IDTO_FOLLOW#

The values specified for master are in valid. Make sure the Device ID of master are correct.

USING_PRO_FEATURE_ON_UNLICENSED_DEVICE#

Using a Pro only feature on an unlicensed device. The device may not behave as expected if it continues to operate while unlicensed.

FIRMWARE_TOO_NEW#

Firmware Too New. Use Phoenix Tuner X to field upgrade your CTRE CAN device firmware(CRF) to a compatible version. Then restart your robot application to clear this error.

COULD_NOT_SERIALIZE#

The data frame could not be serialized for transmit.

MECHANISM_FAULTED#

The mechanism is disabled due to a fault in one of the devices.

FIRMWARE_VERS_NOT_COMPATIBLE#

Firmware version is not compatible with this version of Phoenix. Make sure your firmware and API major versions match.

DIRECTORY_MISSING#

Could not find specified directory.

API_TOO_OLD#

This API version is too old for the firmware on the device. Either upgrade the API to a newer version or downgrade the device firmware to an older version for correct behavior.

LOGGER_NOT_RUNNING#

The signal logger is not running. Start the signal logger before writing any signals.

TIMEOUT_CANNOT_BE_ZERO#

Blocking operations, such as configs, cannot have a timeout of 0. Pass in a non-zero timeout (typically 0.050+ seconds) for normal operation.

CANNOT_LICENSE_WHILE_ENABLED#

Device cannot be licensed while it is control enabled. Disable and neutral the device to apply the licenses.

is_error() bool#

Gets whether this code is an error.

Returns:

True if this code is an error

Return type:

bool

is_warning() bool#

Gets whether this code is a warning.

Returns:

True if this code is a warning

Return type:

bool

is_ok() bool#

Gets whether this code is OK.

Returns:

True if this code is OK

Return type:

bool