Interface DigoutMode
- All Known Implementing Classes:
DigoutMode.DigoutSlot
,DigoutMode.Disabled
,DigoutMode.DutyCycle
public sealed interface DigoutMode
permits DigoutMode.Disabled, DigoutMode.DigoutSlot, DigoutMode.DutyCycle
Interface that holds the output configuration for a digital output pad (digout)
Digout pins can be set into one of three modes:
- disabled (via
DigoutMode.Disabled
) - outputting high or low depending on the values of digout slots that combine to form a boolean expression
(via
DigoutMode.DigoutSlot
-- for more information, seeDigoutMode.DigoutSlot
) - a duty cycle (PWM) output of values from either the color or proximity sensor. (via
DigoutMode.DutyCycle
)
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final record
A config that sets the digital output to use digout slot logic.static final record
A config that disables any output on the digital output.static final record
A config that sets the digital output to output a duty cycle or PWM signal. -
Method Summary
Modifier and TypeMethodDescriptionstatic DigoutMode
fromSettingData
(long value) Unserializes the digout config from setting data to an object.long
Serializes the digout config into a value writeable to device settings.
-
Method Details
-
toSettingData
long toSettingData()Serializes the digout config into a value writeable to device settings.- Returns:
- 48-bit long
-
fromSettingData
Unserializes the digout config from setting data to an object.- Parameters:
value
- setting data- Returns:
- config object
-