Class CanandcolorDigoutState
java.lang.Object
com.reduxrobotics.sensors.canandcolor.CanandcolorDigoutState
Class representing the state of the Canandcolor digital outputs and the individual condition slots contributing
to the outputs.
-
Constructor Summary
ConstructorsConstructorDescriptionInstatiate with blank (all zeros) digout state.CanandcolorDigoutState
(byte[] field) Constructor -- used by theCanandcolor
class to populate this object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getDigoutConditionSlotValue
(CanandcolorDigitalOutput digout, int slot) Gets the output value of a specific condition slot contributing to a digital output.boolean
Gets the output value of either digital output, which corresponds to what the Canandcolor is outputting on those pads.
-
Constructor Details
-
CanandcolorDigoutState
public CanandcolorDigoutState(byte[] field) Constructor -- used by theCanandcolor
class to populate this object.- Parameters:
field
- Digital output bit set from the CAN message
-
CanandcolorDigoutState
public CanandcolorDigoutState()Instatiate with blank (all zeros) digout state.
-
-
Method Details
-
getDigoutValue
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:
digout
- The digital output whose value is to be returned- Returns:
- the boolean state of that digital output
-
getDigoutConditionSlotValue
Gets the output value of a specific condition slot contributing to a digital output. For more information about condition slots, see TODO- Parameters:
digout
- the digital output associated with the condition slotslot
- the condition slot index- Returns:
- Whether or not that specific condition slot is returning true or not.
-