Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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.room104
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

Back to the top