\section1 Connecting to States | |
In the SCXML file, we specify states for each light: red, yellow, and green. | |
In the \c <onentry> element, we specify the event to send when entering | |
the state and the delay in seconds before sending the event. In the | |
\c <transition> element, we specify the event that triggers the transition | |
to the state specified by the \c target attribute: | |
\quotefromfile trafficlight-common/statemachine.scxml | |
\skipto <state id="red"> | |
\printuntil <state id="green"> | |
\printuntil </state> |