A mock LED, often used as an example of a simple state machine, allowing turn-on and turn-off transitions.
state
(enum[string]) - The current state of the device.on
- The LED is illuminated.off
- The LED is darkened.
retrieve
- Retrieves the current state of the LED.turn-on
- Illuminates the LED.turn-off
- Darkens the LED.
-
illuminated
retrieve
(self) →illuminated
turn-off
→darkened
-
darkened
retrieve
(self) →darkened
turn-on
→illuminated