Package com.ctre.phoenix6
Class CANBus
java.lang.Object
com.ctre.phoenix6.CANBus
public class CANBus extends Object
Static class for getting information about available CAN buses.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CANBus.CANBusStatus
Contains status information about a CAN bus. -
Constructor Summary
Constructors Constructor Description CANBus()
-
Method Summary
Modifier and Type Method Description static CANBus.CANBusStatus
getStatus(String canbus)
Gets the status of the CAN bus, including the bus utilization and the error counters.static boolean
isNetworkFD(String canbus)
Gets whether the network is CAN FD.
-
Constructor Details
-
Method Details
-
isNetworkFD
Gets whether the network is CAN FD.- Parameters:
canbus
- Name of the CAN bus- Returns:
- True if the network is CAN FD
-
getStatus
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
-