Class CANBus

java.lang.Object
com.ctre.phoenix6.CANBus

public class CANBus
extends Object
Static class for getting information about available CAN buses.
  • Constructor Details

  • Method Details

    • isNetworkFD

      public static boolean isNetworkFD​(String canbus)
      Gets whether the network is CAN FD.
      Parameters:
      canbus - Name of the CAN bus
      Returns:
      True if the network is CAN FD
    • getStatus

      public static CANBus.CANBusStatus getStatus​(String canbus)
      Gets the status of the CAN bus, including the bus utilization and the error counters.

      This function returns a new object every call. As a result, we recommend that this is not called inside a tight loop.

      Parameters:
      canbus - Name of the CAN bus
      Returns:
      Status of the CAN bus