Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJuergen Haug2019-02-21 10:51:01 -0500
committerJuergen Haug2019-02-21 11:44:41 -0500
commitdb3ba4a7253b098cd252045cc6285cb4b509fc7e (patch)
treee07c720925de9c4a6ab995341d99ca0fa375e636 /tests
parent6f5cdb957fcf53bb0865fc514b5a967f09ea2dbf (diff)
downloadorg.eclipse.etrice-db3ba4a7253b098cd252045cc6285cb4b509fc7e.tar.gz
org.eclipse.etrice-db3ba4a7253b098cd252045cc6285cb4b509fc7e.tar.xz
org.eclipse.etrice-db3ba4a7253b098cd252045cc6285cb4b509fc7e.zip
[ui] fixed detailcode in actor operations
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room84
1 files changed, 79 insertions, 5 deletions
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room
index 674799c82..3f9d1066d 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room
@@ -56,7 +56,43 @@ RoomModel DetailExpressionTestModel {
dtor '''
numberArray[0] = 5;
'''
- Operation actorOp(param: int32): boolean '''
+ Operation actorOp(param: int32): boolean '''
+ /*
+ * below copied from StateMachine state
+ */
+
+ rPortEvent.out1(true);
+ rPortData.in1;
+ rReplEvent[0].out1(true);
+ rReplEvent.out1(true); // broadcast
+ cPortEvent.in1();
+ cPortData.in1(32);
+ cReplEvent[1].in1();
+ cReplEvent.in1(); // broadcast
+ sppEvent[4].out1(true);
+ sppEvent.out1(true); // broadcast
+ rPortEvent.regularOp(32);
+ cPortEvent.conjOp(32);
+ actorOp(32);
+ int number = numberArray[0];
+ DData nestedData = infoData.nested;
+ int port = infoData.nested.tcpPort;
+
+ // -- not supported yet by code translation --
+ // getReplication():
+ // int replSize1 = rReplEvent.getReplication();
+ // int replSize2 = cReplEvent.getReplication();
+ // int replSize2 = sppEvent.getReplication();
+
+ // DataClass operations:
+ // infoData.dataOp(32);
+ // infoData.nested.dataOp("127.0.0.1", 8080);
+
+ // enum
+ enumEvent.enumMsg(ProtocolEnum.ACK);
+ enumEvent.enumMsg2(ColorEnum.WHITE);
+ // numberArray[0] = LocalEnum.FIRST;
+
return param == 0;
'''
StateMachine {
@@ -69,7 +105,12 @@ RoomModel DetailExpressionTestModel {
'''>
}
action '''
- // TODO syntax highlighting
+ // transition event data
+ int data = (transitionData)? 1 : 0;
+
+ /*
+ * below copied from StateMachine state
+ */
rPortEvent.out1(true);
rPortData.in1;
rReplEvent[0].out1(true);
@@ -87,9 +128,6 @@ RoomModel DetailExpressionTestModel {
DData nestedData = infoData.nested;
int port = infoData.nested.tcpPort;
- // transition event data
- int data = (transitionData)? 1 : 0;
-
// -- not supported yet by code translation --
// getReplication():
// int replSize1 = rReplEvent.getReplication();
@@ -115,6 +153,42 @@ RoomModel DetailExpressionTestModel {
State idle
State state1
State state2
+ State state {
+ entry '''
+ // TODO syntax highlighting
+ rPortEvent.out1(true);
+ rPortData.in1;
+ rReplEvent[0].out1(true);
+ rReplEvent.out1(true); // broadcast
+ cPortEvent.in1();
+ cPortData.in1(32);
+ cReplEvent[1].in1();
+ cReplEvent.in1(); // broadcast
+ sppEvent[4].out1(true);
+ sppEvent.out1(true); // broadcast
+ rPortEvent.regularOp(32);
+ cPortEvent.conjOp(32);
+ actorOp(32);
+ int number = numberArray[0];
+ DData nestedData = infoData.nested;
+ int port = infoData.nested.tcpPort;
+
+ // -- not supported yet by code translation --
+ // getReplication():
+ // int replSize1 = rReplEvent.getReplication();
+ // int replSize2 = cReplEvent.getReplication();
+ // int replSize2 = sppEvent.getReplication();
+
+ // DataClass operations:
+ // infoData.dataOp(32);
+ // infoData.nested.dataOp("127.0.0.1", 8080);
+
+ // enum
+ enumEvent.enumMsg(ProtocolEnum.ACK);
+ enumEvent.enumMsg2(ColorEnum.WHITE);
+ // numberArray[0] = LocalEnum.FIRST;
+ '''
+ }
}
}
}

Back to the top