Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.SendingDataByValueTest.room47
1 files changed, 21 insertions, 26 deletions
diff --git a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.SendingDataByValueTest.room b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.SendingDataByValueTest.room
index ccd65d311..0f57335e8 100644
--- a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.SendingDataByValueTest.room
+++ b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.SendingDataByValueTest.room
@@ -27,7 +27,7 @@ RoomModel org.eclipse.etrice.integration.SendingDataByValueTest {
external Port PingPongPort
}
Behavior {
- Operation printData(d: PingPongData): void {
+ Operation printData(d: PingPongData) {
"System.out.printf(\"\\n\");"
"System.out.printf(\"i8Val: %d \\n\",d.getI8Val());"
"System.out.printf(\"i16Val: %d \\n\",d.getI16Val());"
@@ -82,7 +82,7 @@ RoomModel org.eclipse.etrice.integration.SendingDataByValueTest {
Attribute data : PingPongData
}
Behavior {
- Operation printData(d: PingPongData): void {
+ Operation printData(d: PingPongData) {
"System.out.printf(\"MrPing:\\n\");"
"System.out.printf(\"i8Val: %d \\n\",d.getI8Val());"
"System.out.printf(\"i16Val: %d \\n\",d.getI16Val());"
@@ -191,30 +191,25 @@ RoomModel org.eclipse.etrice.integration.SendingDataByValueTest {
cond {
"(p.i32Val==2) && (p.i8Val==46)"
}
- action {
- "// send default values"
- "PingPongPort.ping(data);"
- ""
- "data.setI8Val((byte) 45);"
- "data.setI16Val((short) 34);"
- "data.setI32Val(80);"
- "data.setF32Val((float)3.14);"
- "data.setF64Val(7.12345);"
- "data.setStringVal(\"Hase !\");"
- ""
- "data.getOwnType().setI8Val((byte)10);"
- "data.getOwnType().setI16Val((short)17);"
- "data.getOwnType().setI32Val(4711);"
- "data.getOwnType().setF32Val((float)3.0815);"
- "data.getOwnType().setF64Val(123.45678);"
- "data.getOwnType().setStringVal(\"Deep Hase !\");"
- "int[] intArray = data.getOwnType().getArrayFromInt32();"
- "for (int i=0;i<intArray.length;i++) {intArray[i] = 10+i;}"
- "data.getOwnType().setArrayFromInt32(intArray);"
- ""
- "PingPongPort.ping(data);"
- "crcGen.update(13);"
- }
+ action {
+ "// send default values"
+ "PingPongPort.ping(data);"
+ ""
+ "data.getOwnType().setI8Val((byte)10);"
+ "data.getOwnType().setI16Val((short)17);"
+ "data.getOwnType().setI32Val(4711);"
+ "data.getOwnType().setF32Val((float)3.0815);"
+ "data.getOwnType().setF64Val(123.45678);"
+ "data.getOwnType().setStringVal(\"Deep Hase !\");"
+ "int[] intArray = data.getOwnType().getArrayFromInt32();"
+ "for (int i=0;i<intArray.length;i++) {intArray[i] = 10+i;}"
+ "data.getOwnType().setArrayFromInt32(intArray);"
+ ""
+ "// use convenient function"
+ "PingPongPort.ping((byte)45,(short)34,80,\\\'c\\\',(float)3.14,7.12345,\\\"Hase !\\\",intArray,data.getOwnType());\""
+ ""
+ "crcGen.update(13);"
+ }
}
Transition tr5: state0 -> state1 {
triggers {

Back to the top