Quick Start |
Drawing a simple automata
You should see something like this |
Almost everything except load/save operations is done with embedded editors. I hate dialogs :-). Just click and do.
Making source code from automata
Use fsmc for this purpose. This is a program simular to QT uic. Here is an example:
fsmc file.fsm -o file.h fsmc file.fsm -i file.h -o file.cpp
or, if you prefer python,
pyfsmc file.fsm -o file.py
Output of fsmc are C++ header and source code of the automata.
fsmc -h
.
Here's an example generated automata header
#ifndef SampleFSM818378331 #define SampleFSM818378331 #include <queue> // for event queue class SampleFSM { public: enum Event { Event }; protected: virtual bool input() const = 0; virtual void output1() = 0; virtual void output2() = 0; public: enum States { InitialState, WorkState }; // states private: States __Y; bool __recurseLock; std::queue<Event> __events; void __processEvent( Event e ); public: SampleFSM() : __events() { __Y = InitialState; __recurseLock = false; } virtual ~SampleFSM() {} States currentState() { return __Y; } static const char* eventName( Event e ); static const char* stateName( States s ); void A( Event e ); }; #endif
To make something sensible, proceed here.