CTRE_Phoenix  5.19.4
ctre::phoenix Namespace Reference

Namespaces

 motorcontrol
 
 platform
 
 sensors
 
 signals
 
 tasking
 
 unmanaged
 

Classes

class  CANBusAddressable
 
class  CANifier
 
struct  CANifierConfiguration
 
struct  CANifierConfigUtils
 
struct  CANifierFaults
 
struct  CANifierStickyFaults
 
class  CANifierVelocityMeasPeriodRoutines
 
class  CTRLogger
 
struct  CustomParamConfiguration
 
struct  CustomParamConfigUtil
 
class  ErrorCollection
 
class  HsvToRgb
 
class  LinearInterpolation
 
class  RCRadio3Ch
 
class  Stopwatch
 
class  Utilities
 

Enumerations

enum  ErrorCode : int32_t {
  OK = 0, OKAY = 0, CAN_MSG_STALE = 1, CAN_TX_FULL = -1,
  TxFailed = -1, InvalidParamValue = -2, CAN_INVALID_PARAM = -2, RxTimeout = -3,
  CAN_MSG_NOT_FOUND = -3, TxTimeout = -4, CAN_NO_MORE_TX_JOBS = -4, UnexpectedArbId = -5,
  CAN_NO_SESSIONS_AVAIL = -5, BufferFull = +6, CAN_OVERFLOW = -6, SensorNotPresent = -7,
  FirmwareTooOld = -8, CouldNotChangePeriod = -9, BufferFailure = -10, FirwmwareNonFRC = -11,
  GeneralError = -100, GENERAL_ERROR = -100, SIG_NOT_UPDATED = -200, SigNotUpdated = -200,
  NotAllPIDValuesUpdated = -201, GEN_PORT_ERROR = -300, PORT_MODULE_TYPE_MISMATCH = -301, GEN_MODULE_ERROR = -400,
  MODULE_NOT_INIT_SET_ERROR = -401, MODULE_NOT_INIT_GET_ERROR = -402, WheelRadiusTooSmall = -500, TicksPerRevZero = -501,
  DistanceBetweenWheelsTooSmall = -502, GainsAreNotSet = -503, WrongRemoteLimitSwitchSource = -504, DoubleVoltageCompensatingWPI = -505,
  IncompatibleMode = -600, InvalidHandle = -601, FeatureRequiresHigherFirm = -700, MotorControllerFeatureRequiresHigherFirm = -701,
  TalonFeatureRequiresHigherFirm = MotorControllerFeatureRequiresHigherFirm, ConfigFactoryDefaultRequiresHigherFirm = -702, ConfigMotionSCurveRequiresHigherFirm = -703, TalonFXFirmwarePreVBatDetect = -704,
  LibraryCouldNotBeLoaded = -800, MissingRoutineInLibrary = -801, ResourceNotAvailable = -802, MusicFileNotFound = -900,
  MusicFileWrongSize = -901, MusicFileTooNew = -902, MusicFileInvalid = -903, InvalidOrchestraAction = -904,
  MusicFileTooOld = -905, MusicInterrupted = -906, MusicNotSupported = -907, PulseWidthSensorNotPresent = +10,
  GeneralWarning = 100, FeatureNotSupported = 101, NotImplemented = 102, FirmVersionCouldNotBeRetrieved = 103,
  FeaturesNotAvailableYet = 104, ControlModeNotValid = 105, ControlModeNotSupportedYet = 106, CascadedPIDNotSupporteYet = 107,
  AuxiliaryPIDNotSupportedYet = 107, RemoteSensorsNotSupportedYet = 108, MotProfFirmThreshold = 109, MotProfFirmThreshold2 = 110,
  SimDeviceNotFound = 200, SimPhysicsTypeNotSupported = 201, SimDeviceAlreadyExists = 202
}
 
enum  AutocacheState { DISABLED = 0, ENABLED = 1 }
 
enum  CANifierControlFrame { CANifier_Control_1_General = 0x03040000, CANifier_Control_2_PwmOutput = 0x03040040 }
 
enum  CANifierStatusFrame {
  CANifierStatusFrame_Status_1_General = 0x041400, CANifierStatusFrame_Status_2_General = 0x041440, CANifierStatusFrame_Status_3_PwmInputs0 = 0x041480, CANifierStatusFrame_Status_4_PwmInputs1 = 0x0414C0,
  CANifierStatusFrame_Status_5_PwmInputs2 = 0x041500, CANifierStatusFrame_Status_6_PwmInputs3 = 0x041540, CANifierStatusFrame_Status_8_Misc = 0x0415C0
}
 
enum  CANifierVelocityMeasPeriod {
  Period_1Ms = 1, Period_2Ms = 2, Period_5Ms = 5, Period_10Ms = 10,
  Period_20Ms = 20, Period_25Ms = 25, Period_50Ms = 50, Period_100Ms = 100
}
 
enum  ParamEnum : uint32_t {
  eOnBoot_BrakeMode = 31, eQuadFilterEn = 91, eQuadIdxPolarity = 108, eMotionProfileHasUnderrunErr = 119,
  eMotionProfileTrajectoryPointDurationMs = 120, eMotionProfileTrajectoryInterpolDis = 121, eStatusFramePeriod = 300, eOpenloopRamp = 301,
  eClosedloopRamp = 302, eNeutralDeadband = 303, ePeakPosOutput = 305, eNominalPosOutput = 306,
  ePeakNegOutput = 307, eNominalNegOutput = 308, eProfileParamSlot_P = 310, eProfileParamSlot_I = 311,
  eProfileParamSlot_D = 312, eProfileParamSlot_F = 313, eProfileParamSlot_IZone = 314, eProfileParamSlot_AllowableErr = 315,
  eProfileParamSlot_MaxIAccum = 316, eProfileParamSlot_PeakOutput = 317, eClearPositionOnLimitF = 320, eClearPositionOnLimitR = 321,
  eClearPositionOnQuadIdx = 322, eSampleVelocityPeriod = 325, eSampleVelocityWindow = 326, eFeedbackSensorType = 330,
  eSelectedSensorPosition = 331, eFeedbackNotContinuous = 332, eRemoteSensorSource = 333, eRemoteSensorDeviceID = 334,
  eSensorTerm = 335, eRemoteSensorClosedLoopDisableNeutralOnLOS = 336, ePIDLoopPolarity = 337, ePIDLoopPeriod = 338,
  eSelectedSensorCoefficient = 339, eForwardSoftLimitThreshold = 340, eReverseSoftLimitThreshold = 341, eForwardSoftLimitEnable = 342,
  eReverseSoftLimitEnable = 343, eNominalBatteryVoltage = 350, eBatteryVoltageFilterSize = 351, eContinuousCurrentLimitAmps = 360,
  ePeakCurrentLimitMs = 361, ePeakCurrentLimitAmps = 362, eCurrLimit_Amps = eContinuousCurrentLimitAmps, eCurrThres_Amps = ePeakCurrentLimitAmps,
  eCurrEnable = 363, eCurrThres_Ms = 364, eClosedLoopIAccum = 370, eCustomParam = 380,
  eStickyFaults = 390, eAnalogPosition = 400, eQuadraturePosition = 401, ePulseWidthPosition = 402,
  eIntegratedSensor = 403, eMotMag_Accel = 410, eMotMag_VelCruise = 411, eMotMag_SCurveLevel = 412,
  eLimitSwitchSource = 421, eLimitSwitchNormClosedAndDis = 422, eLimitSwitchDisableNeutralOnLOS = 423, eLimitSwitchRemoteDevID = 424,
  eSoftLimitDisableNeutralOnLOS = 425, ePulseWidthPeriod_EdgesPerRot = 430, ePulseWidthPeriod_FilterWindowSz = 431, eYawOffset = 160,
  eCompassOffset = 161, eBetaGain = 162, eEnableCompassFusion = 163, eGyroNoMotionCal = 164,
  eEnterCalibration = 165, eFusedHeadingOffset = 166, eStatusFrameRate = 169, eAccumZ = 170,
  eTempCompDisable = 171, eMotionMeas_tap_threshX = 172, eMotionMeas_tap_threshY = 173, eMotionMeas_tap_threshZ = 174,
  eMotionMeas_tap_count = 175, eMotionMeas_tap_time = 176, eMotionMeas_tap_time_multi = 177, eMotionMeas_shake_reject_thresh = 178,
  eMotionMeas_shake_reject_time = 179, eMotionMeas_shake_reject_timeout = 180, eUnitString = 442, eFeedbackTimeBase = 443,
  eDefaultConfig = 500, eFastWriteCount = 501, eWriteCount = 502, eReserved1 = 555,
  eMotorCommutation = 650, eSensorInitStrategy = 700, eSensorDirection, eMagnetOffset,
  eSensorSync, eAbsSensorRange
}
 

Detailed Description

namespace phoenix

Enumeration Type Documentation

◆ AutocacheState

Keeps track of cache state

Enumerator
DISABLED 

Disabled cache

ENABLED 

Enabled cache

◆ CANifierControlFrame

Enumerated type for status frame types.

◆ CANifierStatusFrame

Enumerated type for status frame types.

◆ CANifierVelocityMeasPeriod

Enum for velocity periods used for CANifier

Enumerator
Period_1Ms 

1ms velocity measurement period

Period_2Ms 

2ms velocity measurement period

Period_5Ms 

5ms velocity measurement period

Period_10Ms 

10ms velocity measurement period

Period_20Ms 

20ms velocity measurement period

Period_25Ms 

25ms velocity measurement period

Period_50Ms 

50ms velocity measurement period

Period_100Ms 

100ms velocity measurement period

◆ ErrorCode

enum ctre::phoenix::ErrorCode : int32_t
Enumerator
OKAY 

No Error - Function executed as expected.

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.

SensorNotPresent 

Sensor is not present.

GeneralError 

User Specified General Error.

SigNotUpdated 

Have not received an value response for signal.

InvalidHandle 

Handle does not match stored map of handles.

PulseWidthSensorNotPresent 

Special Code for "isSensorPresent".

◆ ParamEnum

enum ctre::phoenix::ParamEnum : uint32_t

Signal enumeration for generic signal access.