53 std::string_view _name;
69 constexpr CANBus(std::string_view canbus =
"") :
94 CANBus(std::string_view canbus,
char const *hootFilepath) :
136 [[deprecated(
"The CANBus static methods are deprecated for removal in 2026."
137 "Construct a new CANBus instance and call IsNetworkFD() instead.")]]
153 [[deprecated(
"The CANBus static methods are deprecated for removal in 2026."
154 "Construct a new CANBus instance and call GetStatus() instead.")]]
Class for getting information about an available CAN bus.
Definition CANBus.hpp:19
CANBus(std::string_view canbus, char const *hootFilepath)
Creates a new CAN bus with the given name, and loads an associated hoot file for replay (equivalent t...
Definition CANBus.hpp:94
CANBusStatus GetStatus() const
Gets the status of the CAN bus, including the bus utilization and the error counters.
static bool IsNetworkFD(std::string const &canbus)
Gets whether the CAN bus is a CAN FD network.
Definition CANBus.hpp:138
static CANBusStatus GetStatus(std::string const &canbus)
Gets the status of the CAN bus, including the bus utilization and the error counters.
Definition CANBus.hpp:155
constexpr CANBus(std::string_view canbus="")
Creates a new CAN bus with the given name.
Definition CANBus.hpp:69
bool IsNetworkFD() const
Gets whether the CAN bus is a CAN FD network.
constexpr std::string_view GetName() const
Get the name used to construct this CAN bus.
Definition CANBus.hpp:105
static ctre::phoenix::StatusCode LoadFile(char const *filepath)
Loads the given file and starts signal log replay.
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition StatusCodes.h:18
Contains status information about a CAN bus.
Definition CANBus.hpp:24
uint32_t TxFullCount
Transmit buffer full count.
Definition CANBus.hpp:41
ctre::phoenix::StatusCode Status
Status code response of getting the data.
Definition CANBus.hpp:28
float BusUtilization
CAN bus utilization, from 0.0 to 1.0.
Definition CANBus.hpp:33
uint32_t BusOffCount
Bus off count.
Definition CANBus.hpp:37
uint32_t REC
Receive Error Counter (REC)
Definition CANBus.hpp:45
uint32_t TEC
Transmit Error Counter (TEC)
Definition CANBus.hpp:49