Package com.team2813.lib2813.vendor.ctre
Class DeviceInformation
java.lang.Object
com.team2813.lib2813.vendor.ctre.DeviceInformation
-
Constructor Summary
ConstructorsConstructorDescriptionDeviceInformation(int deviceId) Creates a DeviceInformation for a device on the default CAN bus.DeviceInformation(int deviceId, CANBus canbus) Creates a DeviceInformation with a canbus.DeviceInformation(int id, String canbus) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
-
Constructor Details
-
DeviceInformation
public DeviceInformation(int deviceId) Creates a DeviceInformation for a device on the default CAN bus.- Parameters:
deviceId- the configured ID of the device
-
DeviceInformation
Creates a DeviceInformation with a canbus.- Parameters:
deviceId- the configured ID of the devicecanbus- the CAN bus the device is on
-
DeviceInformation
Deprecated, for removal: This API element is subject to removal in a future version.ConstructingDeviceInformationwith a CAN bus string is deprecated for removal in the 2027 season. Construct instances using aCANBusinstance instead.Creates a DeviceInformation with a canbus string. Ifcanbusisnull, method acts likeDeviceInformation(int)was called- Parameters:
id- the CAN idcanbus- the name of the CAN bus the device is on
-
-
Method Details
-
id
public int id()Gets the can id of this device- Returns:
- the can id of the device
-
canbus
Deprecated, for removal: This API element is subject to removal in a future version.usecanBus()}Returns the canbus that this device is on, orOptional.empty()if it is on the RoboRIO can loop- Returns:
- the canbus that the device is on
-
canBus
Returns the canbus that this device is on.- Returns:
- the canbus that the device is on
-
equals
-
hashCode
public int hashCode()
-
DeviceInformationwith a CAN bus string is deprecated for removal in the 2027 season.