ReduxLib C++ 2024.1.1-beta0
Loading...
Searching...
No Matches
redux::sensors::canandcolor::digout::DigoutSlotState Class Reference

#include <CanandcolorDigoutSlot.h>

Public Member Functions

constexpr DigoutSlotState (uint64_t field=0)
 
constexpr bool GetDigoutValue (CanandcolorDigout digout)
 
constexpr bool GetDigoutConditionSlotValue (CanandcolorDigout digout, uint8_t slot)
 

Detailed Description

Class representing the state of the Canandcolor digital outputs and the individual condition slots contributing to the outputs.

Constructor & Destructor Documentation

◆ DigoutSlotState()

constexpr redux::sensors::canandcolor::digout::DigoutSlotState::DigoutSlotState ( uint64_t  field = 0)
inlineconstexpr

Constructor – used by the Canandcolor class to populate this object.

Parameters
fieldDigital output bit set from the CAN message

Member Function Documentation

◆ GetDigoutConditionSlotValue()

constexpr bool redux::sensors::canandcolor::digout::DigoutSlotState::GetDigoutConditionSlotValue ( CanandcolorDigout  digout,
uint8_t  slot 
)
inlineconstexpr

Gets the output value of a specific condition slot contributing to a digital output.

For more information about condition slots, see the Canandcolor CAN spec.

Parameters
digoutthe digital output associated with the condition slot
slotthe condition slot index
Returns
Whether or not that specific condition slot is returning true or not.

◆ GetDigoutValue()

constexpr bool redux::sensors::canandcolor::digout::DigoutSlotState::GetDigoutValue ( CanandcolorDigout  digout)
inlineconstexpr

Gets the output value of either digital output, which corresponds to what the Canandcolor is outputting on those pads. Note that this ignores things like normally open/normally connected, so even if the board output is high electrically, the digital output state may be false.

Parameters
digoutThe digital output whose value is to be returned
Returns
the boolean state of that digital output

The documentation for this class was generated from the following file: