Code Mix Visual Programming StateGo

About template and conversion

About Template and Conversion

SteteGo is a tool to design a "State Transition Diagram".
You write the program code directly to the node called "State" which represents the state.
The written program code is rearranged and converted to source code using a template.


The state has an internal table, where the program code is written for each element of the program.


The program elements are as follows. They are simplified for the sake of explanation.


  1. State name
  2. Initialization process
  3. Update process
  4. Standby condition
  5. Branching process


Templates relocate these elements.


For example, the following templates are provided in C #.



void [[state name]](bool bFirst) // They call this over and over again until they branch out.
  if (bFirst) //Only the first time is true.
    [[initialization process]]


  [[update process]]


   if ([[standby condition]]) return; // If the condition is true, this function is called again.


  [[branch processing]]



StateGo rearranges the program for each item in the state's table by fitting it to a template.


In the above template, a grammatical error occurs when there is no initialization process or waiting conditions.
However, the template provides a workaround.