Class CANrange

All Implemented Interfaces:
PhoenixAlertable, CommonDevice, AutoCloseable, TelemetryLoggable

public class CANrange extends CoreCANrange implements AutoCloseable, TelemetryLoggable
WPILib-integrated version of CoreCANrange.
  • Constructor Details

    • CANrange

      public CANrange(int deviceId, CANBus canbus)
      Constructs a new CANrange object.
      Parameters:
      deviceId - ID of the device, as configured in Phoenix Tuner
      canbus - The CAN bus this device is on
  • Method Details

    • none

      public static CANrange 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

      public void close()
      Specified by:
      close in interface AutoCloseable
    • logTo

      public void logTo(TelemetryTable table)
      Logs the object to a TelemetryTable.
      Specified by:
      logTo in interface TelemetryLoggable
      Parameters:
      table - telemetry table
    • getTelemetryType

      public String getTelemetryType()
      Gets the telemetry table type.
      Specified by:
      getTelemetryType in interface TelemetryLoggable
      Returns:
      Table type