| ... |
... |
@@ -36,72 +36,10 @@ |
| 36 |
36 |
|
| 37 |
37 |
[[image:attach:kieler03.png]] |
| 38 |
38 |
|
| 39 |
|
-In order to prepare modeling, we must create a project. Right-click in the Project Explorer to do so. |
| 40 |
|
- |
| 41 |
|
-[[image:attach:kieler04.png]] |
| 42 |
|
- |
| 43 |
|
-Select a General Project and click on next, then enter a project name, e.g. pldi14 and click on finish: |
| 44 |
|
- |
| 45 |
|
-[[image:attach:kieler05.png]][[image:attach:kieler06.png]] |
| 46 |
|
- |
| 47 |
|
-Now KIELER should look like this: |
| 48 |
|
- |
| 49 |
|
-[[image:attach:kieler07.png]] |
| 50 |
|
- |
| 51 |
|
-Now you can proceed in modeling an SCChart as explained below. |
| 52 |
|
- |
| 53 |
53 |
= Model an SCChart = |
| 54 |
54 |
|
| 55 |
|
-Right-click on a project and create a (text) File: |
|
41 |
+xxx |
| 56 |
56 |
|
| 57 |
|
-[[image:attach:kieler08.png]] |
| 58 |
|
- |
| 59 |
|
-Name it abo.sct: |
| 60 |
|
- |
| 61 |
|
-[[image:attach:kieler09.png]] |
| 62 |
|
- |
| 63 |
|
-The textual SCCharts Xtext based editor (for *.sct files) will automatically be opened: |
| 64 |
|
- |
| 65 |
|
-[[image:attach:kieler10.png]] |
| 66 |
|
- |
| 67 |
|
-Now start modeling an SCChart. For example copy & paste the following sct code of abo, the hello world of SCCharts: |
| 68 |
|
- |
| 69 |
|
-{{code title="abo.sct"}} |
| 70 |
|
-@VHLayout |
| 71 |
|
-scchart ABO { |
| 72 |
|
- input output bool A; |
| 73 |
|
- input output bool B; |
| 74 |
|
- output bool O1; |
| 75 |
|
- output bool O2; |
| 76 |
|
- region: |
| 77 |
|
- |
| 78 |
|
- initial state Init |
| 79 |
|
- --> WaitAB immediate with / O1 = false; O2 = false; |
| 80 |
|
- state WaitAB { |
| 81 |
|
- region HandleA: |
| 82 |
|
- initial state WaitA |
| 83 |
|
- --> DoneA immediate with A / B = true; O1 = true; |
| 84 |
|
- final state DoneA; |
| 85 |
|
- region HandleB: |
| 86 |
|
- initial state WaitB |
| 87 |
|
- --> DoneB with B / O1 = true; |
| 88 |
|
- final state DoneB; |
| 89 |
|
- } |
| 90 |
|
- >-> GotAB with / O1 = false; O2 = true; |
| 91 |
|
- state GotAB; |
| 92 |
|
-} |
| 93 |
|
-{{/code}} |
| 94 |
|
- |
| 95 |
|
-As you save (Ctrl+S), KIELER will automatically draw the graphical SCChart diagram in a new KLigD view: |
| 96 |
|
- |
| 97 |
|
-[[image:attach:kieler11.png]] |
| 98 |
|
- |
| 99 |
|
-You may want to re-arrange views. Just drag the KLighD view to the right side: |
| 100 |
|
- |
| 101 |
|
-[[image:attach:kieler12.png]] |
| 102 |
|
- |
| 103 |
|
- |
| 104 |
|
- |
| 105 |
105 |
= Generate C Code = |
| 106 |
106 |
|
| 107 |
107 |
xxx |