Click here to Skip to main content
12,755,516 members (40,103 online)
Click here to Skip to main content
Add your own
alternative version


36 bookmarked
Posted 5 Jul 2006

StateProto Beta - State Chart Designer for Qf4Net

, 5 Jul 2006
Rate this:
Please Sign up or sign in to vote.
Drawing state diagrams, and C# code generation for the modified QF4Net.



StateProto is a .NET application that provides a design surface on which you can draw State Diagrams. If the diagram is sufficiently detailed, then it becomes possible to generate C# code to run against the QF4Net State Engine.


Qf4net is a C#/.NET port by Dr. Rainer Hessmer of the Quantum Hierarchichal State Machine Framework by Miro Samek.

Both of these frameworks are mainly the core State Machine execution engines. The advantage of the Quantum based frameworks is that they implement a Method-Per-State State Machine architecture which keeps the required boiler plate code both to a minimum and understandable. Even for this understandability, it still takes effort to write up the code manually, which led me to search for a diagramming tool. While a number of tools do already exist, I found that each required quite a bit of work to do the code generation and to work in a way that made sense to me. And thus, as a typical developer, I decided to write one myself.

There is still much to do with regards to multiple state machine interactions, etcetera, but the application is demo-able for single state machine implementations.

Using the code

Included in the downloads above is a code sample that can be found in If you extract this file, you will find a directory tree rooted at Hsm. In there, you will find the current version of the StateProto.exe. Also, the sample code for a Watch Demo is in Samples/SampleWatch, with the full state machine file in Samples/SampleWatch_b.sm1.

Hsm/bin/debug contains a precompiled release of SampleWatch.exe. Run it, click on "Create Watch", and then click on "SetEvt" a couple of times. When you're bored, click on "ModeEvt" to see what it does differently.

Watch Demo

Points of interest

The diagram displays states with a different colour at each nesting level. Big items still to work on are undo/redo and a graphical tree layout algorithm.


The first beta release with the Watch Sample, white paper and the Watch Sample documentation.



This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
South Africa South Africa
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralTo much limited w/o source code Pin
leeloo9999-Jul-06 22:24
memberleeloo9999-Jul-06 22:24 
GeneralRe: To much limited w/o source code Pin
statedriven10-Jul-06 11:56
memberstatedriven10-Jul-06 11:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170217.1 | Last Updated 5 Jul 2006
Article Copyright 2006 by statedriven
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid