Package com.ctre.phoenix6.hardware
Class CANrange
java.lang.Object
com.ctre.phoenix6.jni.CtreJniWrapper
com.ctre.phoenix6.hardware.ParentDevice
com.ctre.phoenix6.hardware.core.CoreCANrange
com.ctre.phoenix6.hardware.CANrange
- All Implemented Interfaces:
CommonDevice,Sendable,AutoCloseable
WPILib-integrated version of
CoreCANrange.-
Nested Class Summary
Nested classes/interfaces inherited from class com.ctre.phoenix6.hardware.ParentDevice
ParentDevice.MapGenerator -
Field Summary
Fields inherited from class com.ctre.phoenix6.hardware.ParentDevice
_emptyControl, deviceIdentifier -
Constructor Summary
ConstructorsConstructorDescriptionCANrange(int deviceId) Constructs a new CANrange object.Constructs a new CANrange object.Deprecated, for removal: This API element is subject to removal in a future version.Constructing devices with a CAN bus string is deprecated for removal in the 2027 season. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidinitSendable(SendableBuilder builder) static CANrangenone()Constructs a stubbed-out CANrange, where all status signals, controls, configs, etc.Methods inherited from class com.ctre.phoenix6.hardware.core.CoreCANrange
clearStickyFault_BootDuringEnable, clearStickyFault_BootDuringEnable, clearStickyFault_Hardware, clearStickyFault_Hardware, clearStickyFault_Undervoltage, clearStickyFault_Undervoltage, clearStickyFault_UnlicensedFeatureInUse, clearStickyFault_UnlicensedFeatureInUse, clearStickyFaults, clearStickyFaults, getAmbientSignal, getAmbientSignal, getConfigurator, getDistance, getDistance, getDistanceStdDev, getDistanceStdDev, getFault_BootDuringEnable, getFault_BootDuringEnable, getFault_Hardware, getFault_Hardware, getFault_Undervoltage, getFault_Undervoltage, getFault_UnlicensedFeatureInUse, getFault_UnlicensedFeatureInUse, getFaultField, getFaultField, getIsDetected, getIsDetected, getIsProLicensed, getIsProLicensed, getMeasurementHealth, getMeasurementHealth, getMeasurementTime, getMeasurementTime, getRealFOVCenterX, getRealFOVCenterX, getRealFOVCenterY, getRealFOVCenterY, getRealFOVRangeX, getRealFOVRangeX, getRealFOVRangeY, getRealFOVRangeY, getSignalStrength, getSignalStrength, getSimState, getStickyFault_BootDuringEnable, getStickyFault_BootDuringEnable, getStickyFault_Hardware, getStickyFault_Hardware, getStickyFault_Undervoltage, getStickyFault_Undervoltage, getStickyFault_UnlicensedFeatureInUse, getStickyFault_UnlicensedFeatureInUse, getStickyFaultField, getStickyFaultField, getSupplyVoltage, getSupplyVoltage, getVersion, getVersion, getVersionBugfix, getVersionBugfix, getVersionBuild, getVersionBuild, getVersionMajor, getVersionMajor, getVersionMinor, getVersionMinorMethods inherited from class com.ctre.phoenix6.hardware.ParentDevice
getAppliedControl, getDeviceHash, getDeviceID, getNetwork, getResetOccurredChecker, hasResetOccurred, isConnected, isConnected, lookupStatusSignal, lookupStatusSignal, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, resetSignalFrequencies, resetSignalFrequencies, resetSignalFrequenciesForAll, setControlPrivate
-
Constructor Details
-
CANrange
Constructs a new CANrange object.Constructs the device using the default CAN bus for the system (see
CANBus()).- Parameters:
deviceId- ID of the device, as configured in Phoenix Tuner
-
CANrange
Deprecated, for removal: This API element is subject to removal in a future version.Constructing devices with a CAN bus string is deprecated for removal in the 2027 season. Construct devices using aCANBusinstance instead.Constructs a new CANrange object.- Parameters:
deviceId- ID of the device, as configured in Phoenix Tunercanbus- 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
-
CANrange
Constructs a new CANrange 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 CANrange, 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 CANrange
-
close
- Specified by:
closein interfaceAutoCloseable
-
initSendable
- Specified by:
initSendablein interfaceSendable
-