wiki:news:18may2014
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:news:18may2014 [2014/05/18 18:34] – created pmueller | wiki:news:18may2014 [2014/05/18 18:41] (current) – pmueller | ||
---|---|---|---|
Line 4: | Line 4: | ||
In the manual a simplified microwave oven is used to explain the generation of source code from state machine diagrams. This example was updated here to show how to generate code also from activity diagrams. | In the manual a simplified microwave oven is used to explain the generation of source code from state machine diagrams. This example was updated here to show how to generate code also from activity diagrams. | ||
- | The state machine of the oven is shown below. | + | The extended |
+ | The hardware selftest routine was modelled as activity diagram. | ||
{{ : | {{ : | ||
- | The following code snipped shows the call of the hardware selftest | + | The following code snipped shows the call of the hardware selftest. The selftest function itself |
<code c> | <code c> | ||
Line 36: | Line 37: | ||
</ | </ | ||
- | The hardware selftest function was modelled in an own activity diagram. A class can have one or more activity diagrams. The code generator generates an own c-file/ | + | The hardware selftest function was modelled in an own activity diagram. A class can have one or more activity diagrams. The code generator generates an own c-file/ |
{{: | {{: | ||
- | To generate code from the diagram call the code generator as follows. The -A enables the generation of code from activity diagrams. Without this flag state machine code is generated. To generate both call the generator twice. | + | To generate code from the diagram call the code generator as follows. The '' |
< | < | ||
java -jar codegen.jar -p EA -A -t " | java -jar codegen.jar -p EA -A -t " |
wiki/news/18may2014.1400430866.txt.gz · Last modified: 2014/05/18 18:34 by pmueller