Skip to content

Instantly share code, notes, and snippets.

@zdne
Created June 11, 2015 14:22
Show Gist options
  • Save zdne/752a3b240ec4d687c7ab to your computer and use it in GitHub Desktop.
Save zdne/752a3b240ec4d687c7ab to your computer and use it in GitHub Desktop.
Resource Blueprint sketch for Zetta's LED

Resource LED

A mock LED, often used as an example of a simple state machine, allowing turn-on and turn-off transitions.

Attributes

  • state (enum[string]) - The current state of the device.
    • on - The LED is illuminated.
    • off - The LED is darkened.

Affordances

  • retrieve - Retrieves the current state of the LED.
  • turn-on - Illuminates the LED.
  • turn-off - Darkens the LED.

States

  • illuminated

    • retrieve (self) → illuminated
    • turn-offdarkened
  • darkened

    • retrieve (self) → darkened
    • turn-onilluminated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment