Package com.ctre.phoenixpro.hardware
Class CANcoder
java.lang.Object
com.ctre.phoenix6.jni.CtreJniWrapper
com.ctre.phoenixpro.hardware.ParentDevice
com.ctre.phoenixpro.hardware.core.CoreCANcoder
com.ctre.phoenixpro.hardware.CANcoder
- All Implemented Interfaces:
Sendable
,AutoCloseable
@Deprecated(forRemoval=true) public class CANcoder extends CoreCANcoder implements Sendable, AutoCloseable
Deprecated, for removal: This API element is subject to removal in a future version.
Classes in the phoenixpro package will be removed in 2024.
Users should instead use classes from the phoenix6 package.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ctre.phoenixpro.hardware.ParentDevice
ParentDevice.MapGenerator<T>
-
Field Summary
Fields inherited from class com.ctre.phoenixpro.hardware.ParentDevice
deviceIdentifier, kDefaultControlRatePeriodsSec
-
Constructor Summary
Constructors Constructor Description CANcoder(int deviceId)
Deprecated, for removal: This API element is subject to removal in a future version.Classes in the phoenixpro package will be removed in 2024.CANcoder(int deviceId, String canbus)
Deprecated, for removal: This API element is subject to removal in a future version.Classes in the phoenixpro package will be removed in 2024. -
Method Summary
Modifier and Type Method Description void
close()
Deprecated, for removal: This API element is subject to removal in a future version.void
initSendable(SendableBuilder builder)
Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class com.ctre.phoenixpro.hardware.core.CoreCANcoder
clearStickyFaults, clearStickyFaults, getAbsolutePosition, getConfigurator, getFault_BadMagnet, getFault_BootDuringEnable, getFault_Hardware, getFault_Undervoltage, getFault_UnlicensedFeatureInUse, getFaultField, getMagnetHealth, getPosition, getPositionSinceBoot, getSimState, getStickyFault_BadMagnet, getStickyFault_BootDuringEnable, getStickyFault_Hardware, getStickyFault_Undervoltage, getStickyFault_UnlicensedFeatureInUse, getStickyFaultField, getSupplyVoltage, getUnfilteredVelocity, getVelocity, getVersion, getVersionBugfix, getVersionBuild, getVersionMajor, getVersionMinor, hasResetOccurred, reportIfTooOld, setControl, setPosition, setPosition
Methods inherited from class com.ctre.phoenixpro.hardware.ParentDevice
getAppliedControl, getCANBus, getDeviceID, lookupStatusSignalValue, lookupStatusSignalValue, setControlPrivate
-
Constructor Details
-
CANcoder
Deprecated, for removal: This API element is subject to removal in a future version.Classes in the phoenixpro package will be removed in 2024. Users should instead use classes from the phoenix6 package.Constructs a new CANcoder object.Constructs the device using the default CAN bus for the system:
- "rio" on roboRIO
- "can0" on Linux
- "*" on Windows
- Parameters:
deviceId
- ID of the device, as configured in Phoenix Tuner.
-
CANcoder
Deprecated, for removal: This API element is subject to removal in a future version.Classes in the phoenixpro package will be removed in 2024. Users should instead use classes from the phoenix6 package.Constructs a new CANcoder object.- Parameters:
deviceId
- ID of the device, as configured in Phoenix Tuner.canbus
- Name of the CAN bus this device is on. Possible CAN bus strings are:- "rio" for the native roboRIO CAN bus
- CANivore name or serial number
- SocketCAN interface (non-FRC Linux only)
- "*" for any CANivore seen by the program
- empty string (default) to select the default for the
system:
- "rio" on roboRIO
- "can0" on Linux
- "*" on Windows
-
-
Method Details
-
close
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
close
in interfaceAutoCloseable
-
initSendable
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
initSendable
in interfaceSendable
-