diff options
author | Henrik Rentz-Reichert | 2017-07-31 10:06:35 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2017-08-01 08:20:39 +0000 |
commit | 6f110ef9a655989c9839aded0807a854b4f7a79e (patch) | |
tree | 841c7a6fc111f2991dee6372cc01894aa6b396c9 /tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room | |
parent | a22cc46d84a76e5d025205edce05ac7137704659 (diff) | |
download | org.eclipse.etrice-6f110ef9a655989c9839aded0807a854b4f7a79e.tar.gz org.eclipse.etrice-6f110ef9a655989c9839aded0807a854b4f7a79e.tar.xz org.eclipse.etrice-6f110ef9a655989c9839aded0807a854b4f7a79e.zip |
Bug 511330 - [core.genmodel.fsm] introduce simplified generator model for state machines
* org.eclipse.etrice.generator.java.tests passing locally
* org.eclipse.etrice.generator.c.tests passing locally
* org.eclipse.etrice.generator.cpp.tests passing locally
* org.eclipse.etrice.abstractexec.behavior.tests passing locally
Change-Id: Ice31b6004076eb32d91d91289c2f5adca0d60693
Diffstat (limited to 'tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room')
-rw-r--r-- | tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room new file mode 100644 index 000000000..e117cc638 --- /dev/null +++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room @@ -0,0 +1,104 @@ +RoomModel TemplateModel { + + ActorClass TestActor extends Base { + Structure { } + Behavior { + StateMachine { + RefinedState BaseEntryExit { + entry { + "// derived entry" + } + } + RefinedState Base { + exit { + "// derived exit" + } + subgraph { + Transition init: initial -> state0 { } + State state0 + } + } + RefinedState BaseSub { + entry { + "// derived entry" + } + } + } + } + } + + ActorClass Base { + Interface { + Port p0: PC + } + Structure { + external Port p0 + } + Behavior { + StateMachine { + Transition init: initial -> BaseEntryExit { + action { + "// base init" + } + } + Transition tr0: BaseEntryExit -> Base { + triggers { + <m1: p0> + } + action { + "// base" + } + } + Transition tr1: Base -> BaseSub { + triggers { + <m1: p0> + } + action { + "// base" + } + } + Transition tr2: BaseSub -> BaseEntryExitSub { + triggers { + <m1: p0> + } + action { + "// base" + } + } + State BaseEntryExit { + entry { + "// base entry" + } + exit { + "// base exit" + } + } + State Base + State BaseSub { + subgraph { + Transition init: initial -> state0 { } + State state0 + } + } + State BaseEntryExitSub { + entry { + "// base entry" + } + exit { + "// base exit" + } + subgraph { + Transition init: initial -> state0 { } + State state0 + } + } + } + } + } + + ProtocolClass PC { + incoming { + Message m1() + } + } +}
\ No newline at end of file |