Home Cavernosa
PyGLUT GAME BOY
ADVANCE
Nintendo DS Java
Misc Code Links
My Site
Intro
Cavernosa
PyGLUT
Game Boy Advance
Nintendo DS
Java
Misc Code
Links
 
Java
Intro
 
Email me
mailto
 
Printer
Friendly

 
  

Java

Hierarchical State Machines
A Java implementation of the kind of hierarchical state machine described in the book Practical Statecharts in C/C++, Quantum Programming for Embedded Systems, by Miro Samek, Ph.D.

That book has box-outs detailing the tiny overhead of it's mechanisms in terms of assembly instruction counts. My version replaces those mechanisms with multiple hash table lookups and use of the Reflection API so does not offer the same level of performance. It also allocates from the garbage-collected heap as it runs, with the limit of the allocation load hard to determine, and spits out a little garbage for every transition.

I've also re-implemented the Calculator main motivating example statechart used in that book as a web applet:

Calc
<image src="CalcApplet.png" border=0>
If you can't see it or don't want to install the sun Java plugin try this page which uses the applet tag.

Copyright Andrew H. Cox. All rights reserved.
[email protected]


Hoogli Gallery: Turn any Web Page Into an Image Gallery With One Click

I now still Java, but on Android. I also do a lot of web stuff as well as 3D Graphics. Come and see my Node.js and libevent based web app, and if you like it, you can even hire me for web projects that need a bit of backend technology to be built.