ReduxLib C++ 2024.3.2
Loading...
Searching...
No Matches
redux::canand Namespace Reference

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)
 

Detailed Description

Namespace holding base and utility classes for all CAN-based Redux Robotics devices

Function Documentation

◆ AddCANListener()

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.

Parameters
devicepointer to a CanandDevice to listen for packets.

◆ EnsureCANLinkServer()

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.

◆ RemoveCANListener()

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.

Parameters
devicepointer to a CanandDevice to remove from the event loop.

◆ SetDevicePresenceThreshold()

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.

Parameters
devicethe CanandDevice to act on
thresholdthe new threshold, in seconds.

◆ SetDevicePresenceWarnings()

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).

Parameters
devicethe CanandDevice to consider
enabledtrue to enable, false to suppress

◆ SetGlobalDevicePresenceWarnings()

void redux::canand::SetGlobalDevicePresenceWarnings ( bool  enabled)

Set whether to enable device presence warnings to the driver station globally (defaults to true).

Parameters
enabledtrue to enable, false to suppress