This files are part of the ‘symplehfsm’ package.
..TODO:: write test according to article!!
This is an example following an article of the internet showing how to make a state machine testable. The framework supports testing of state machines.
This is an example state machine following this article:
http://accu.org/index.php/journals/1548
+----------------------------------------------------------------------------------+
| |
init -->| |
| +-------+ dark/ +---------------------------------------------------+ |
| *---->| day |--------->| night | |
| +-->| | | | |
| | +-------+ | initial +--------------+ | |
| | | *----------->| off |--+ | |
| | | +---->| | | | |
| | | | +--------------+ | movement/ | |
| +----------------------| | | lamp_on | |
| light/lamp_off | timeout/ | +--------------+ | | |
| | lamp_off | | moving |<-+ | |
| | | +->| | | |
| | | | | |--+ | |
| | | | +--------------+ | | |
| | | | | | |
| | | | movement/ | | |
| | | | | no_movement/ | |
| | | | +--------------+ | start_timer | |
| | | | | timing | | | |
| | | +--| |<-+ | |
| | | | | | |
| | +-----| | | |
| | | | | |
| | | | | |
| | +--------------+ | |
| | | |
| +---------------------------------------------------+ |
| |
+----------------------------------------------------------------------------------+