...
Code Block |
---|
language | sct |
---|
title | SCT Code Style |
---|
linenumbers | true |
---|
|
scchart Test {
input bool trigger;
input int array[10];
output bool action0, action1;
int fun;
region first_region "Have fun":
// State example
initial state example_state
--> example_state immediate "Having fun"
with trigger
/ action0 = true
; action1 = false
; fun++
--> example_state immediate "Having fun"
with trigger
/ action0 = true
; action1 = false
; fun--
;
// Region
region second_region "Do nothing concurrently":
initial state init;
} |
Code Block |
---|
language | sct |
---|
title | SCTx CodeStyle |
---|
linenumbers | true |
---|
|
#import blub
scchart Test {
input bool trigger
input int array[10]
output bool action0, action1
int fun
region first_region "Have fun":
// State example
initial state example_state
go to example_state immediate
if trigger
&& (trigger1
|| trigger2)
do action0 = true
; action1 = false
; fun++
label "Having fun"
go to example_state immediate
if trigger
do action0 = true
; action1 = false
; fun--
label "Having fun"
// Region
region second_region "Do nothing concurrently":
initial state init;
} |
Build Settings
To have the simulation and SCT build correctly via Prom, one has to modify the Prom environment that builds the project:
...