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.
- State name
- Initialization process
- Update process
- Standby condition
- 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.
if ([[standby condition]]) return; // If the condition is true, this function is called again.
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.