Finite State Machine Wizard
Here's my free to use, no attribute required FSM Wizard. This one generates C++ code. I'm not a fan of C++ but it happens to be the language I'm using at the moment. However, it can easily be ported to other languages if desired.
The FSM Wizard works like this
1. Write a CSV file with format initialState,Event,NewState,ActionFn,OptionalComment. The code includes an example called MyFsm.csv
RedGateLow,TrainPassed,RedGateLow,CheckLine, RedGateLow,LineClear,RedGateLow,RaiseGate, RedGateLow,GateRaised,Green,SetGreen, Green,TrainDetected,Yellow,StartTimerYellowRed Yellow,TimerExpired,RedGateHigh,StartTimerRedGate RedGateHigh,TimerExpired,RedGateHigh,LowerGate RedGateHigh,GateLowered,RedGateLow,
2. Run the wizard: ./fsmGen.py MyFsm.csv
3. View the output PNG file and optionally edit the autogenerated C++ files
Comments
Post a Comment