??? 12/02/06 22:18 Read: times |
#128868 - State Machine Generator Responding to: ???'s previous message |
Hello Dennis,
this thing is very cool, i just miss 2 things 1. a central function for state changes like #define goState goStateFL( __FILE__,__LINE__,newState int goStateFL ( char* file, int line, EState newState ) { // Log all state changes so that we know whate changes the state LOG ( __FILE__,__LINE__, state <-> newState ) if ( newState != state ) { switch (state) case ST_1 .... // do all exits here switch (newState ) .... // do all inits here } state = newState } 2. a central function for state tasks when we do not use timer events but a simple mainloop() to trigger processing like: int statesRun (void) { switch ( state ) case ST_1: ST_1_Run() ...... } Thank you for your tool i'll use it. By the way may you publish the source of the tool? :-) Regards Urs |