Class CANcoder
java.lang.Object
com.ctre.phoenix6.hardware.ParentDevice
com.ctre.phoenix6.hardware.core.CoreCANcoder
com.ctre.phoenix6.hardware.CANcoder
- All Implemented Interfaces:
PhoenixAlertable, CommonDevice, AutoCloseable, TelemetryLoggable
WPILib-integrated version of
CoreCANcoder.-
Nested Class Summary
Nested classes/interfaces inherited from class ParentDevice
ParentDevice.MapGenerator -
Field Summary
Fields inherited from class ParentDevice
_emptyControl, deviceIdentifier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Gets the telemetry table type.voidlogTo(TelemetryTable table) Logs the object to aTelemetryTable.static CANcodernone()Constructs a stubbed-out CANcoder, where all status signals, controls, configs, etc.Methods inherited from class CoreCANcoder
clearStickyFault_BadMagnet, clearStickyFault_BadMagnet, clearStickyFault_BootDuringEnable, clearStickyFault_BootDuringEnable, clearStickyFault_Hardware, clearStickyFault_Hardware, clearStickyFault_Undervoltage, clearStickyFault_Undervoltage, clearStickyFault_UnlicensedFeatureInUse, clearStickyFault_UnlicensedFeatureInUse, clearStickyFaults, clearStickyFaults, getAbsolutePosition, getAbsolutePosition, getConfigurator, getFault_BadMagnet, getFault_BadMagnet, getFault_BootDuringEnable, getFault_BootDuringEnable, getFault_Hardware, getFault_Hardware, getFault_Undervoltage, getFault_Undervoltage, getFault_UnlicensedFeatureInUse, getFault_UnlicensedFeatureInUse, getFaultField, getFaultField, getIsProLicensed, getIsProLicensed, getMagnetHealth, getMagnetHealth, getPosition, getPosition, getPositionSinceBoot, getPositionSinceBoot, getSimState, getStickyFault_BadMagnet, getStickyFault_BadMagnet, getStickyFault_BootDuringEnable, getStickyFault_BootDuringEnable, getStickyFault_Hardware, getStickyFault_Hardware, getStickyFault_Undervoltage, getStickyFault_Undervoltage, getStickyFault_UnlicensedFeatureInUse, getStickyFault_UnlicensedFeatureInUse, getStickyFaultField, getStickyFaultField, getSupplyVoltage, getSupplyVoltage, getUnfilteredVelocity, getUnfilteredVelocity, getVelocity, getVelocity, getVersion, getVersion, getVersionBugfix, getVersionBugfix, getVersionBuild, getVersionBuild, getVersionMajor, getVersionMajor, getVersionMinor, getVersionMinor, registerAlerts, setPosition, setPosition, setPosition, setPositionMethods inherited from class ParentDevice
getAppliedControl, getDeviceHash, getDeviceID, getIsConnectedChecker, getIsConnectedChecker, getNetwork, getResetOccurredChecker, hasResetOccurred, isConnected, isConnected, lookupStatusSignal, lookupStatusSignal, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, resetSignalFrequencies, resetSignalFrequencies, resetSignalFrequenciesForAll, setControlPrivate, toString
-
Constructor Details
-
CANcoder
Constructs a new CANcoder object.- Parameters:
deviceId- ID of the device, as configured in Phoenix Tunercanbus- The CAN bus this device is on
-
-
Method Details
-
none
Constructs a stubbed-out CANcoder, where all status signals, controls, configs, etc. perform no action and immediately return OK. This can be used to silence error messages for devices that have been completely removed from the robot.- Returns:
- Stubbed-out CANcoder
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
logTo
Logs the object to aTelemetryTable.- Specified by:
logToin interfaceTelemetryLoggable- Parameters:
table- telemetry table
-
getTelemetryType
Gets the telemetry table type.- Specified by:
getTelemetryTypein interfaceTelemetryLoggable- Returns:
- Table type
-