Generate production quality code from state diagrams created with Enterprise Architect
企业社交平台如WeChat Enterprise #生活技巧# #职场生存技巧# #职场沟通软件#
wiki:landing_pages:ea
Generate production quality code from state diagrams created with Enterprise Architect
SinelaboreRT generates readable and maintainable code from hierarchical UML state machines. With its unique features and the C code generator the tool covers well the requirements of embedded real-time and low power application developers. With its C++, Python and Java backend it is also a perfect tool for developers of server or desktop applications.
Key Features:
Automated robustness checks before code generation
No run-time environment needed
Can be used with any CPU and with or without OS/RTOS
Code generation especially for embedded real-time and high availability systems.
Fits well in different system designs (foreground/background, RTOS-based …)
No gap between design and code
Support for automatic test-case generation
Simulation in interactive or batch mode.
Optionally generating trace code
Generated code creates no trouble when using static code checkers
Watch the code generator in action
The following example shows how the code generator works by means of a simple microwave oven.
Requirements:
Cooking time can be adjusted from 0s and 60s.
Cooking starts if the cooking time is > 0s and the door is closed.
If the door is opened during cooking the microwave generator is switched off. The cooking time stops.
Cooking continuous if the cooking time is not over and the door is closed again
Cooking stops if the cooking time is over or the time is adjusted to zero.
Cooking time and power can be changed at any time.
The sate machine below shows a possible solution.
To generate for example C code just export your model to XMI and call the code generator as follows:
java -jar codegen.jar -p EA -t "Model:Class Model:first_example_step3" -o oven first_example_step3.xml
After checking the model against a set of well-formedness rules (e.g. no double state names) the complete state machine code is generated.
Done!
Look into the generated files: oven.c oven.h oven_ext.h
In the examples folder you will find the complete code ready to be tested and expanded by you.
Supported State Machine Elements
The code-generator supports a subset of the design elements provided by Enterprise Architect. The supported elements are:
Hierarchical states
(Signal-)Events with event name, guard and action – Initial and final pseudo-states
History states (deep, flat)
Choices
Junctions
Constraints
Sub-machine states on various levels
Entry and exit pseudo-states
Regions on various levels
Find out more about the code generator
Read section “Drawing State-Charts with Enterprise Architect” in the manual
How easy it is to add attributes and operations to the stateful class like shown below. Operations are mapped to C-functions. Attributes to members of the instance data of the state machine. This allows to add entry/exit code functions or other helper functions. Even the body code can be easily added with EA if you want. Presently attributes and operations are only generated in the C-backend.
Download the demo version and try it right now. It includes many other examples.
Read the EA Howto for tips and tricks
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
wiki/landing_pages/ea.txt· Last modified: 2024/08/04 13:16 by
webmin网址:Generate production quality code from state diagrams created with Enterprise Architect https://klqsh.com/news/view/108736
相关内容
State Machine FundamentalsQM Model
How to Create a Coloring Book From Scratch Using Free Tools
Microsoft account recovery code
Bluewater Lake State Park, New Mexico
rustdesk/rustdesk: 目前最友好的开源远程桌面软件,开箱即用,无需任何配置,完美替代 TeamViewer 和 AnyDesk
New Mexico
Eating Well with Psoriasis
RANDOM.ORG
JOY将8.18日发行迷你一辑《From JOY, with Love》solo回归