ReduxLib C++ 2024.3.2
|
Namespaces | |
namespace | details |
namespace | utils |
Classes | |
class | CanandAddress |
class | CanandDevice |
struct | CanandFirmwareVersion |
class | CanandMessage |
class | CanandSettings |
class | CanandSettingsManager |
class | CANBus |
class | CooldownWarning |
class | SettingFlags |
class | SettingResult |
class | SettingResultCode |
Functions | |
void | AddCANListener (CanandDevice *device) |
void | RemoveCANListener (CanandDevice *device) |
void | EnsureCANLinkServer () |
void | SetGlobalDevicePresenceWarnings (bool enabled) |
void | SetDevicePresenceWarnings (const CanandDevice &device, bool enabled) |
void | SetDevicePresenceThreshold (const CanandDevice &device, units::second_t threshold) |
Namespace holding base and utility classes for all CAN-based Redux Robotics devices
void redux::canand::AddCANListener | ( | CanandDevice * | device | ) |
Adds a CanandDevice to the Canand packet event loop, allowing it to receive and process CAN packets.
This will start the Redux CANLink server if not started already.
device | pointer to a CanandDevice to listen for packets. |
void redux::canand::EnsureCANLinkServer | ( | ) |
Starts the Redux CANLink server if not started, otherwise does nothing.
Generally does not need to be called manually if robot code instantiates a CanandDevice subclass as it will be started through AddCANListener.
void redux::canand::RemoveCANListener | ( | CanandDevice * | device | ) |
Removes a CanandDevice to the Canand packet event loop. It is the responsibility of CanandDevice subclasses to call this in a deconstructor.
device | pointer to a CanandDevice to remove from the event loop. |
void redux::canand::SetDevicePresenceThreshold | ( | const CanandDevice & | device, |
units::second_t | threshold | ||
) |
Sets the device presence threshold of how many seconds must pass without a message for the device checker to consider them disconnected from bus.
device | the CanandDevice to act on |
threshold | the new threshold, in seconds. |
void redux::canand::SetDevicePresenceWarnings | ( | const CanandDevice & | device, |
bool | enabled | ||
) |
Set whether to enable device presence warnings to the driver station for a single device (defaults to true).
device | the CanandDevice to consider |
enabled | true to enable, false to suppress |
void redux::canand::SetGlobalDevicePresenceWarnings | ( | bool | enabled | ) |
Set whether to enable device presence warnings to the driver station globally (defaults to true).
enabled | true to enable, false to suppress |