Sample code for the quickfsm state machine framework.