You have developed and tested your statechart model, and now you need it as a C, C++, or Java implementation? YAKINDU Statechart Tools can create it for you.
As an example, we will take the light switch statechart and generate Java source code from it. Please proceed as follows:
- In the project explorer, right-click on
01_light_switch.sct and select
New → Code generator model in the context menu.
- In the dialog, replace
light_switch.sgen, then click
- In the next dialog, check the checkbox left from
01_light_switch.sct under the
01_basic folder, then click
- Java classes implementing the statechart model are generated. You can find the generated source code in the folders
src-gen within the
That’s it. If you want to know more, take the time and work through the