53 std::string_view _name;
71 constexpr CANBus(std::string_view canbus =
"") :
98 CANBus(std::string_view canbus,
char const *hootFilepath) :
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:98
CANBusStatus GetStatus() const
Gets the status of the CAN bus, including the bus utilization and the error counters.
constexpr CANBus(std::string_view canbus="")
Creates a new CAN bus with the given name.
Definition CANBus.hpp:71
static CANBus RoboRIO(char const *hootFilepath)
Creates a new CAN bus for the native roboRIO bus, and loads an associated hoot file for replay (equiv...
Definition CANBus.hpp:128
friend std::ostream & operator<<(std::ostream &os, CANBus const &canbus)
static constexpr CANBus RoboRIO()
Creates a new CAN bus for the native roboRIO bus.
Definition CANBus.hpp:109
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:139
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:28
Definition motor_constants.h:14
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