Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/.cproject27
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/.settings/org.eclipse.cdt.ui.prefs3
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room69
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior458
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/RunAllTestcases.c36
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/SSRunner.c60
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/runtime/RUnit.c115
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/runtime/RUnit.h72
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/generator/RunCGeneratorTestcases.c14
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/generator/RunCGeneratorTestcases.h13
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c45
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.h13
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/RunCRuntimeTestcases.c21
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/RunCRuntimeTestcases.h13
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.c (renamed from examples/org.eclipse.etrice.generator.c.reference/src/test/TestMessage.c)25
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.h (renamed from examples/org.eclipse.etrice.generator.c.reference/src/test/TestMessage.h)8
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageQueue.c (renamed from examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageQueue.c)52
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageQueue.h (renamed from examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageQueue.h)8
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageService.c (renamed from examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageService.c)62
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageService.h (renamed from examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageService.h)8
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml17
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java6
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/.cproject4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.abin17748 -> 61110 bytes
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/Release/liborg.eclipse.etrice.runtime.c.abin0 -> 11248 bytes
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RMessage.c (renamed from examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessage.c)0
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RMessage.h (renamed from examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessage.h)0
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.c (renamed from examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageQueue.c)0
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h (renamed from examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageQueue.h)0
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RMessageService.c (renamed from examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageService.c)0
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RMessageService.h (renamed from examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageService.h)0
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RUnit.c277
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RUnit.h53
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/datatypes.h (renamed from examples/org.eclipse.etrice.generator.c.reference/src/runtime/datatypes.h)25
-rw-r--r--tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.ChoicePointTest.room522
-rw-r--r--tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.HandlerTest.room1
-rw-r--r--tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTest.room1
-rw-r--r--tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTestReplPort.room1
-rw-r--r--tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.SendingDataByValueTest.room614
-rw-r--r--tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.tests.room1
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/CPUser.java3
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/TestProtocol.java20
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/HandlerUser.java3
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/TestProtocol.java16
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/MrPingActor.java6
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/PingPongProtocol.java8
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/MrPingActor.java6
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/PingPongProtocol.java8
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPing.java9
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPong.java2
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongData.java47
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongDataDeep.java54
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongProtocol.java8
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/tests/p_HFSM.java140
54 files changed, 1895 insertions, 1079 deletions
diff --git a/examples/org.eclipse.etrice.generator.c.reference/.cproject b/examples/org.eclipse.etrice.generator.c.reference/.cproject
index 8e525ab41..cb221d1b0 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/.cproject
+++ b/examples/org.eclipse.etrice.generator.c.reference/.cproject
@@ -32,13 +32,18 @@
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.836528711" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1206340557" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.937550345" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/runtime}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
</option>
+ <option id="gnu.c.compiler.option.misc.other.674019116" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -Wconversion" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.215126527" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.2141539090" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
- <option id="gnu.c.link.option.libs.1886054812" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
- <option id="gnu.c.link.option.paths.1410926104" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
+ <option id="gnu.c.link.option.libs.1886054812" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
+ </option>
+ <option id="gnu.c.link.option.paths.1410926104" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Debug}&quot;"/>
+ </option>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1941302758" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
@@ -48,7 +53,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src|src-gen" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
</sourceEntries>
@@ -88,12 +93,18 @@
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.554911279" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.331396171" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.1226733508" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths"/>
+ <option id="gnu.c.compiler.option.include.paths.1226733508" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
+ </option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.156681579" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.1192709765" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
- <option id="gnu.c.link.option.libs.2121552378" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
- <option id="gnu.c.link.option.paths.1610581119" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
+ <option id="gnu.c.link.option.libs.2121552378" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
+ </option>
+ <option id="gnu.c.link.option.paths.1610581119" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Release}&quot;"/>
+ </option>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1107454825" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
@@ -104,8 +115,8 @@
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
- <entry excluding="src|src-gen" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="runtime/RMessageQueue.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/.settings/org.eclipse.cdt.ui.prefs b/examples/org.eclipse.etrice.generator.c.reference/.settings/org.eclipse.cdt.ui.prefs
new file mode 100644
index 000000000..ea816250e
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/.settings/org.eclipse.cdt.ui.prefs
@@ -0,0 +1,3 @@
+#Wed Jan 11 10:35:04 CET 2012
+eclipse.preferences.version=1
+formatter_settings_version=1
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
index 6ecd60223..9abeb2133 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
@@ -1,40 +1,5 @@
RoomModel cGenRef {
- ProtocolClass CommunicationProtocol {
- incoming {
- Message sendData(data: int32)
- Message sendData2(data: DataClass1)
-
- }
- outgoing {
- Message receivedData()
- }
- }
-
-
- DataClass DataClass1 {
- usercode1 {"// usercode1"}
- usercode2 {"// usercode2"}
- usercode3 {"// usercode3"}
- Attribute Attr1: int32
- Attribute ComplexAttr: DataClass2
- Attribute Attr3: float32
-
- Operation MultiplyWithAttr1(value: int32): int32 {
- "return self->Attr1*value;"
- }
- Operation MultiplyWithAttr3(value: float32): float32 {
- "return self->Attr3*value;"
- }
- }
-
- DataClass DataClass2 {
- Attribute Attr1: int32
- Attribute Attr2: float32
- Attribute Attr3: int32
- Operation Operation1(): void {"/*nothing to do*/"}
- }
-
SubSystemClass SS {
ActorRef Receiver: Receiver
ActorRef Sender: Sender
@@ -174,5 +139,39 @@ RoomModel cGenRef {
}
}
+ ProtocolClass CommunicationProtocol {
+ incoming {
+ Message sendData(data: int32)
+ Message sendData2(data: DataClass1)
+
+ }
+ outgoing {
+ Message receivedData()
+ }
+ }
+
+
+ DataClass DataClass1 {
+ usercode1 {"// usercode1"}
+ usercode2 {"// usercode2"}
+ usercode3 {"// usercode3"}
+ Attribute Attr1: int32
+ Attribute ComplexAttr: DataClass2
+ Attribute Attr3: float32
+
+ Operation MultiplyWithAttr1(value: int32): int32 {
+ "return self->Attr1*value;"
+ }
+ Operation MultiplyWithAttr3(value: float32): float32 {
+ "return self->Attr3*value;"
+ }
+ }
+
+ DataClass DataClass2 {
+ Attribute Attr1: int32
+ Attribute Attr2: float32
+ Attribute Attr3: int32
+ Operation Operation1(): void {"/*nothing to do*/"}
+ }
} \ No newline at end of file
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior
new file mode 100644
index 000000000..5fb0a165b
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Broadcast.behavior
@@ -0,0 +1,458 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" diagramTypeId="room.behavior" name="Behavior of Broadcast" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@children.1/@link //@children.1/@children.1/@link //@children.0/@children.3/@children.1/@link //@children.1/@children.2/@link //@children.0/@children.3/@children.2/@link //@children.1/@children.3/@link //@children.1/@children.4/@link //@children.1/@children.5/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link //@connections.4/@link //@connections.5/@link //@connections.6/@link //@connections.7/@link" verticalGridUnit="0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../cGenRef.room#ActorClass:Broadcast"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="sg"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#StateMachine:Broadcast$sg"/>
+ </link>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="trp"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#StateMachine:Broadcast$sg"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.5" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="170" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#BaseState:Broadcast$Idle"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.6" incomingConnections="//@connections.5"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Idle"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="370" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#BaseState:Broadcast$Sending"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Sending"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="trp"/>
+ <properties key="item-kind" value="entp"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="19">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="11" height="11" x="25" y="25"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0">
+ <points x="27" y="33"/>
+ <points x="33" y="27"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0">
+ <points x="27" y="27"/>
+ <points x="33" y="33"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#EntryPoint:Broadcast$Sending$tp0"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.6" referencedGraphicsAlgorithm="//@children.0/@children.3/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="22" font="//@fonts.0" verticalAlignment="ALIGNMENT_BOTTOM" value="tp0"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="trp"/>
+ <properties key="item-kind" value="extp"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="39">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="11" height="11" x="25" y="25"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="25" y="25">
+ <points x="5"/>
+ <points x="11" y="5"/>
+ <points x="5" y="11"/>
+ <points y="5"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#ExitPoint:Broadcast$Sending$tp1"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.7" referencedGraphicsAlgorithm="//@children.0/@children.3/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="22" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_BOTTOM" value="tp1"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="149" height="90" x="556" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="89" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="64" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="44" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="44" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="44" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#BaseState:Broadcast$ReceivedBoth"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.7" referencedGraphicsAlgorithm="//@children.0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="89" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ReceivedBoth"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" active="true">
+ <properties key="obj-type" value="sg"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#PlainStateGraph:Broadcast$Sending$sg"/>
+ </link>
+ <children>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/Sending"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" active="true">
+ <properties key="obj-type" value="trp"/>
+ <properties key="item-kind" value="entp"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="256">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0">
+ <points x="33" y="47"/>
+ <points x="47" y="33"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0">
+ <points x="33" y="33"/>
+ <points x="47" y="47"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#EntryPoint:Broadcast$Sending$tp0"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="80" height="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_BOTTOM" value="tp0"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" active="true">
+ <properties key="obj-type" value="trp"/>
+ <properties key="item-kind" value="extp"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="522">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" x="30" y="30">
+ <points x="10"/>
+ <points x="20" y="10"/>
+ <points x="10" y="20"/>
+ <points y="10"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#ExitPoint:Broadcast$Sending$tp1"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.3 //@connections.4" referencedGraphicsAlgorithm="//@children.1/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="80" height="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_BOTTOM" value="tp1"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="185" height="90" x="138" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="125" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="100" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="62" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="62" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="62" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#BaseState:Broadcast$Sending$WaitingForReceived"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1 //@connections.2" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.1/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="125" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="WaitingForReceived"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="146" height="90" x="357" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="86" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="61" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="43" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="43" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="43" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#BaseState:Broadcast$Sending$ReceivedOne"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.1/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="86" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ReceivedOne"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="175" height="90" x="543" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="115" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="90" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="57" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="57" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="57" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#BaseState:Broadcast$Sending$ReceivedTheOther"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.4" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.1/@children.5/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="115" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ReceivedTheOther"/>
+ </children>
+ </children>
+ </children>
+ <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.1/@anchors.0" end="//@children.1/@children.3/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#ContinuationTransition:Broadcast$Sending$tr0"/>
+ </link>
+ <connectionDecorators locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr0: "/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.3/@anchors.0" end="//@children.1/@children.4/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$Sending$tr1"/>
+ </link>
+ <connectionDecorators locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr1: &lt;receivedData:d..."/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.3/@anchors.0" end="//@children.1/@children.5/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$Sending$tr2"/>
+ </link>
+ <connectionDecorators locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr2: &lt;receivedData:d..."/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.4/@anchors.0" end="//@children.1/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$Sending$tr3"/>
+ </link>
+ <connectionDecorators locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr3: &lt;receivedData:d..."/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.5/@anchors.0" end="//@children.1/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$Sending$tr4"/>
+ </link>
+ <connectionDecorators locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr4: &lt;receivedData:d..."/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#InitialTransition:Broadcast$initial"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.3/@children.1/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#TriggeredTransition:Broadcast$tr0"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr0: &lt;sendData:dataI..."/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.3/@children.2/@anchors.0" end="//@children.0/@children.4/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#ContinuationTransition:Broadcast$tr1"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" x="10" font="//@fonts.0" value="tr1: "/>
+ </connectionDecorators>
+ </connections>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <colors red="200" green="200" blue="200"/>
+ <fonts name="Arial" size="8"/>
+ <fonts name="Arial" size="9" bold="true"/>
+</pi:Diagram>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/RunAllTestcases.c b/examples/org.eclipse.etrice.generator.c.reference/src/RunAllTestcases.c
new file mode 100644
index 000000000..6caff4b38
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/RunAllTestcases.c
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include <stdio.h>
+
+#include "RUnit.h"
+
+#include "test/generator/RunCGeneratorTestcases.h"
+#include "test/runtime/RunCRuntimeTestcases.h"
+
+void runTestCases(void);
+
+int main(void){
+ runTestCases();
+ return 0;
+}
+
+
+void runTestCases(void){
+ RUnit_open("tmp/testlog","TestMessageService");
+
+ RunCGeneratorTestcases();
+ RunCRuntimeTestcases();
+
+ RUnit_close();
+}
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/SSRunner.c b/examples/org.eclipse.etrice.generator.c.reference/src/SSRunner.c
deleted file mode 100644
index 8f99b462a..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src/SSRunner.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include <stdio.h>
-#include "../src-gen/cGenRef/DataClass1.h"
-#include "RUnit.h"
-#include "RMessage.h"
-#include "test/TestMessage.h"
-#include "test/TestRMessageQueue.h"
-#include "test/TestRMessageService.h"
-
-
-
-void runTestCases(void);
-
-int main(void){
- runTestCases();
- return 0;
-}
-
-void testDataClassDeepCopy(void){
- RUnit_open("testGeneratedDataClass");
-
- DataClass1 d, e;
- d.Attr1 = 123;
- d.ComplexAttr.Attr1 = 456;
- d.ComplexAttr.Attr2 = 789.123;
- d.ComplexAttr.Attr3 = 789;
- d.Attr3 = 321.123;
-
- DataClass1_deepCopy(&d,&e);
-
- EXPECT_EQUAL_INT("Attr1", 123, e.Attr1);
- EXPECT_EQUAL_INT("ComplexAttr.Attr1", 456, e.ComplexAttr.Attr1);
- EXPECT_EQUAL_FLOAT("ComplexAttr.Attr2", 789.123, e.ComplexAttr.Attr2);
- EXPECT_EQUAL_INT("ComplexAttr.Attr3", 789, e.ComplexAttr.Attr3);
- EXPECT_EQUAL_FLOAT("Attr3", 321.123, e.Attr3);
-
- EXPECT_EQUAL_INT("Operation DataClass1_MultiplyWithAttr1", 246, DataClass1_MultiplyWithAttr1(&d, 2));
- EXPECT_EQUAL_FLOAT("Operation DataClass1_MultiplyWithAttr3", 642.246, DataClass1_MultiplyWithAttr3(&d, 2));
-
- RUnit_close();
-}
-
-void runTestCases(void){
- testDataClassDeepCopy();
- TestMessage_runSuite();
- TestMessageQueue_runSuite();
- TestRMessageService_runSuite();
-}
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RUnit.c b/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RUnit.c
deleted file mode 100644
index 0ab3e7dce..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RUnit.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "RUnit.h"
-
-
-void RUnit_open(const char *testSuiteName) {
- RUnit_passCount = 0;
- RUnit_failCount = 0;
- printf("************* TEST START (%s) **************\n", testSuiteName);
-
- char filename[256];
- sprintf(filename, "%s.xml", testSuiteName);
-
- if (RUnit_reportfile == NULL) {
- RUnit_reportfile = fopen(filename, "w+");
- if (RUnit_reportfile != NULL) {
- fprintf(
- RUnit_reportfile,
- "<testsuite name=\"%s\" tests=\"0\" failures=\"0\" errors=\"0\" time=\"0\">\n",
- testSuiteName);
- } else {
- printf("Unable to open file!");
- }
- }
- // prepare time measurement
- RUnit_startTime = clock();
- RUnit_currentTime = clock();
- printf("Start Time: %ld\n", RUnit_startTime);
-
-}
- void RUnit_close(void) {
-
- printf("\n");
- if (RUnit_failCount > 0) {
- printf("************* TEST FAILED *************\n");
- } else {
- printf("************* TEST PASSED *************\n");
- }
- printf("Number of Tests: %ld\n", RUnit_failCount + RUnit_passCount);
- printf("Failed: %ld\n", RUnit_failCount);
- printf("Passed: %ld\n", RUnit_passCount);
- printf("Total Time: %ld\n", clock() - RUnit_startTime);
- printf("End Time: %ld, CLOCKS_PER_SEC: %ld\n", clock(), CLOCKS_PER_SEC);
- printf("***************************************\n");
-
-
-
- if (RUnit_reportfile != NULL) {
- fprintf(RUnit_reportfile, "</testsuite>\n");
- fclose(RUnit_reportfile);
- RUnit_reportfile = NULL;
- }
-
-}
-
-void EXPECT_TRUE(const char* testcase, boool condition) {
- if (condition == FALSE) {
- RUnit_writeTestLog(testcase, FALSE, "*** FAIL: EXPECT_TRUE == FALSE");
- } else {
- RUnit_writeTestLog(testcase, TRUE, "");
- }
-}
-
-void EXPECT_FALSE(const char* testcase, boool condition) {
- if (condition == TRUE) {
- RUnit_writeTestLog(testcase, FALSE, "*** FAIL: EXPECT_FALSE == TRUE");
- } else {
- RUnit_writeTestLog(testcase, FALSE, "");
- }
-}
-
-//_________
-
-void RUnit_buildTestLogXML(char* xml, const char *testcase, boool result, const char *resulttext, clock_t time) {
- if (result == TRUE) {
- sprintf(xml, "\t<testcase name=\"%s\" classname=\"none\" time=\"0.0000\"/>\n", testcase);
- } else {
- sprintf(xml, "\t<testcase name=\"%s\" classname=\"none\" time=\"0.0000\">\n\t\t<failure message=\"%s\" type=\"\"/>\n\t</testcase>\n", testcase, resulttext);
- }
-}
-
-void RUnit_writeTestLog(const char *testcase, boool result, const char *resulttext) {
- char writeBuffer[256]; // TODO TS: write secure buffers for string handling ...
-
-
- // counting
- if (result == TRUE) {
- RUnit_passCount++;
- printf("PASS: %s: %s\n", testcase, resulttext);
- }
- else {
- RUnit_failCount++;
- printf("FAIL: %s: %s\n", testcase, resulttext);
- }
-
- clock_t time = clock()-RUnit_currentTime;
- RUnit_currentTime = clock();
-
- // writing to file
- if (RUnit_reportfile != NULL) {
- RUnit_buildTestLogXML(writeBuffer, testcase, result, resulttext, time);
- fprintf(RUnit_reportfile, writeBuffer);
- }
-}
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RUnit.h b/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RUnit.h
deleted file mode 100644
index f0f865f2e..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RUnit.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef _RUNIT_H_
-#define _RUNIT_H_
-
-#include "datatypes.h"
-#include <stdio.h>
-#include <time.h>
-
-//*** global variables
-// file handling
-static FILE* RUnit_reportfile = NULL;
-
-// counters
-static int32 RUnit_passCount = 0;
-static int32 RUnit_failCount = 0;
-
-// time measuring
-static clock_t RUnit_startTime = 0;
-static clock_t RUnit_currentTime = 0;
-
-
-// forward declarations
-void RUnit_open(const char *testSuiteName);
-void RUnit_close(void);
-void RUnit_writeTestLog(const char *testcase, boool result, const char *resulttext);
-
-
-void EXPECT_TRUE(const char* testcase, boool condition);
-void EXPECT_FALSE(const char* testcase, boool condition);
-
-//void EXPECT_EQUAL(const char* testcase, int8 expected, int8 actual);
-//void EXPECT_EQUAL(const char* testcase, int16 expected, int16 actual);
-//void EXPECT_EQUAL(const char* testcase, int32 expected, int32 actual);
-//void EXPECT_EQUAL(const char* testcase, uint8 expected, uint8 actual);
-//void EXPECT_EQUAL(const char* testcase, uint16 expected, uint16 actual);
-//void EXPECT_EQUAL(const char* testcase, uint32 expected, uint32 actual);
-
-
-#define EXPECT_EQUAL_INT(testcase, expected, actual) \
- if (expected != actual) { \
- char testresult[256]; \
- sprintf(testresult, "expected=%ld, actual=%ld", expected, actual); \
- RUnit_writeTestLog(testcase, FALSE, testresult); \
- } \
- else { \
- RUnit_writeTestLog(testcase, TRUE, ""); \
- }
-
-#define FLOAT_PRECISION 0.0001
-
-#define EXPECT_EQUAL_FLOAT(testcase, expected, actual) \
- if (expected-actual < -FLOAT_PRECISION || expected-actual > FLOAT_PRECISION) { \
- char testresult[256]; \
- sprintf(testresult, "expected=%f, actual=%f", expected, actual); \
- RUnit_writeTestLog(testcase, FALSE, testresult); \
- } \
- else { \
- RUnit_writeTestLog(testcase, TRUE, ""); \
- }
-
-#endif /* _RUNIT_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/RunCGeneratorTestcases.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/RunCGeneratorTestcases.c
new file mode 100644
index 000000000..db8176609
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/RunCGeneratorTestcases.c
@@ -0,0 +1,14 @@
+/*
+ * RunCGeneratorTestcases.c
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+#include "RunCGeneratorTestcases.h"
+
+#include "TestDataClass.h"
+
+void RunCGeneratorTestcases(void){
+ TestDataClass_runSuite();
+}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/RunCGeneratorTestcases.h b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/RunCGeneratorTestcases.h
new file mode 100644
index 000000000..01472caa9
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/RunCGeneratorTestcases.h
@@ -0,0 +1,13 @@
+/*
+ * RunCGeneratorTestcases.h
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+#ifndef _RUNCGENERATORTESTCASES_H_
+#define _RUNCGENERATORTESTCASES_H_
+
+void RunCGeneratorTestcases(void);
+
+#endif /* _RUNCGENERATORTESTCASES_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c
new file mode 100644
index 000000000..066eb97e6
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c
@@ -0,0 +1,45 @@
+/*
+ * TestDataClass.c
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+
+#include "TestDataClass.h"
+
+#include "RUnit.h"
+
+#include "../../../src-gen/cGenRef/DataClass1.h"
+
+void TestDataClass_testDataClassDeepCopy(void){
+ RUnit_openTestCase("testDataClassDeepCopy");
+
+
+ DataClass1 d, e;
+ d.Attr1 = 123;
+ d.ComplexAttr.Attr1 = 456;
+ d.ComplexAttr.Attr2 = (float32)789.123;
+ d.ComplexAttr.Attr3 = 789;
+ d.Attr3 = (float32)321.123;
+
+ DataClass1_deepCopy(&d,&e);
+
+ EXPECT_EQUAL_INT32("Attr1", 123, e.Attr1);
+ EXPECT_EQUAL_INT32("ComplexAttr.Attr1", 456, e.ComplexAttr.Attr1);
+ EXPECT_EQUAL_FLOAT32("ComplexAttr.Attr2", (float32)789.123, e.ComplexAttr.Attr2, 0.001f);
+ EXPECT_EQUAL_INT32("ComplexAttr.Attr3", 789, e.ComplexAttr.Attr3);
+ EXPECT_EQUAL_FLOAT32("Attr3", (float32)321.123, e.Attr3, (float32)0.0001);
+
+ EXPECT_EQUAL_INT32("Operation DataClass1_MultiplyWithAttr1", 246, DataClass1_MultiplyWithAttr1(&d, 2));
+ EXPECT_EQUAL_FLOAT32("Operation DataClass1_MultiplyWithAttr3", (float32)642.246, DataClass1_MultiplyWithAttr3(&d, 2), (float32)0.0001);
+
+ RUnit_closeTestCase();
+}
+
+void TestDataClass_runSuite(void){
+ RUnit_openTestSuite("TestDataClass");
+ TestDataClass_testDataClassDeepCopy();
+ RUnit_closeTestSuite();
+
+}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.h b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.h
new file mode 100644
index 000000000..a3c9b4078
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.h
@@ -0,0 +1,13 @@
+/*
+ * TestEmDataClass.h
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+#ifndef _TESTDATACLASS_H_
+#define _TESTDATACLASS_H_
+
+void TestDataClass_runSuite(void);
+
+#endif /* _TESTDATACLASS_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/RunCRuntimeTestcases.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/RunCRuntimeTestcases.c
new file mode 100644
index 000000000..7180c67b9
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/RunCRuntimeTestcases.c
@@ -0,0 +1,21 @@
+/*
+ * RunRuntimeTestcases.c
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+
+
+#include "RunCRuntimeTestcases.h"
+
+#include "TestEtMessage.h"
+#include "TestEtMessageQueue.h"
+#include "TestEtMessageService.h"
+
+void RunCRuntimeTestcases(void){
+ TestEtMessage_runSuite();
+ TestEtMessageQueue_runSuite();
+ TestEtMessageService_runSuite();
+}
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/RunCRuntimeTestcases.h b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/RunCRuntimeTestcases.h
new file mode 100644
index 000000000..604dc0a3e
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/RunCRuntimeTestcases.h
@@ -0,0 +1,13 @@
+/*
+ * RunRuntimeTestcases.h
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+#ifndef _RUNCRUNTIMETESTCASES_H_
+#define _RUNCRUNTIMETESTCASES_H_
+
+void RunCRuntimeTestcases(void);
+
+#endif /* _RUNCRUNTIMETESTCASES_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestMessage.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.c
index 848bbe94c..a9d7b6aee 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestMessage.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.c
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-#include "TestMessage.h"
+#include "TestEtMessage.h"
#include <stddef.h>
#include "RUnit.h"
@@ -18,30 +18,31 @@
-void TestMessage_testBasicMessage(void){
+void TestEtMessage_testBasicMessage(void){
+ RUnit_openTestCase("TestMessage_testBasicMessage");
RMessage msg1 = {(RMessage*)1234567, 123,456,};
RMessage msg2 = {NULL, 222,333};
// basic checks -> detects structure changes that would cause problems for generated code
- EXPECT_EQUAL_INT("Message.next", 1234567,msg1.next);
- EXPECT_EQUAL_INT("Message.address", 123,msg1.address);
- EXPECT_EQUAL_INT("Message.evtID", 456,msg1.evtID);
+ EXPECT_EQUAL_PTR("Message.next", 1234567, msg1.next);
+ EXPECT_EQUAL_INT16("Message.address", 123, msg1.address);
+ EXPECT_EQUAL_INT16("Message.evtID", 456, msg1.evtID);
// build pointer ring
msg1.next = &msg2;
msg2.next = &msg1;
- EXPECT_EQUAL_INT("msg1.NextMsg", msg2.evtID, msg1.next->evtID);
- EXPECT_EQUAL_INT("msg2.NextMsg", msg1.evtID, msg2.next->evtID);
-
+ EXPECT_EQUAL_INT16("msg1.NextMsg", msg2.evtID, msg1.next->evtID);
+ EXPECT_EQUAL_INT16("msg2.NextMsg", msg1.evtID, msg2.next->evtID);
+ RUnit_closeTestCase();
}
-void TestMessage_runSuite(void){
- RUnit_open("testMessage");
- TestMessage_testBasicMessage();
- RUnit_close();
+void TestEtMessage_runSuite(void){
+ RUnit_openTestSuite("TestMessage");
+ TestEtMessage_testBasicMessage();
+ RUnit_closeTestSuite();
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestMessage.h b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.h
index 8a898e137..67b45e4e1 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestMessage.h
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.h
@@ -10,11 +10,11 @@
*
*******************************************************************************/
-#ifndef TESTMESSAGE_H_
-#define TESTMESSAGE_H_
+#ifndef _TESTMESSAGE_H_
+#define _TESTMESSAGE_H_
-void TestMessage_runSuite(void);
+void TestEtMessage_runSuite(void);
-#endif /* TESTMESSAGE_H_ */
+#endif /* _TESTMESSAGE_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageQueue.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageQueue.c
index 1bc7b2772..6b03602df 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageQueue.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageQueue.c
@@ -10,11 +10,13 @@
*
*******************************************************************************/
-#include "TestRMessageQueue.h"
+#include "TestEtMessageQueue.h"
#include "RUnit.h"
#include "RMessageQueue.h"
-void testPushPop(void){
+void TestEtMessageQueue_testPushPop(void){
+ RUnit_openTestCase("testPushPop");
+
RMessage msg1 = {NULL, 123, 456};
RMessage msg2 = {NULL, 222, 333};
@@ -24,34 +26,37 @@ void testPushPop(void){
RMessageQueue_push(&queue1, &msg1);
RMessageQueue_push(&queue1, &msg2);
- EXPECT_EQUAL_INT("RMessageQueue.size before", 2,queue1.size);
- EXPECT_EQUAL_INT("RMessageQueue.highWaterMark before", 2,queue1.highWaterMark);
+ EXPECT_EQUAL_INT16("RMessageQueue.size before", 2,queue1.size);
+ EXPECT_EQUAL_INT16("RMessageQueue.highWaterMark before", 2,queue1.highWaterMark);
RMessage* rcvMsg1 = RMessageQueue_pop(&queue1);
RMessage* rcvMsg2 = RMessageQueue_pop(&queue1);
- EXPECT_EQUAL_INT("RMessageQueue.size after", 0,queue1.size);
- EXPECT_EQUAL_INT("RMessageQueue.highWaterMark after", 2,queue1.highWaterMark);
+ EXPECT_EQUAL_INT16("RMessageQueue.size after", 0,queue1.size);
+ EXPECT_EQUAL_INT16("RMessageQueue.highWaterMark after", 2,queue1.highWaterMark);
- EXPECT_EQUAL_INT("rcvMsg1->address", 123, rcvMsg1->address);
- EXPECT_EQUAL_INT("rcvMsg1->evtID", 456, rcvMsg1->evtID);
- EXPECT_EQUAL_INT("rcvMsg1->next", NULL, rcvMsg1->next);
+ EXPECT_EQUAL_INT16("rcvMsg1->address", 123, rcvMsg1->address);
+ EXPECT_EQUAL_INT16("rcvMsg1->evtID", 456, rcvMsg1->evtID);
+ EXPECT_EQUAL_PTR("rcvMsg1->next", NULL, rcvMsg1->next);
- EXPECT_EQUAL_INT("rcvMsg2->address", 222, rcvMsg2->address);
- EXPECT_EQUAL_INT("rcvMsg2->evtID", 333, rcvMsg2->evtID);
- EXPECT_EQUAL_INT("rcvMsg2->next", NULL, rcvMsg2->next);
+ EXPECT_EQUAL_INT16("rcvMsg2->address", 222, rcvMsg2->address);
+ EXPECT_EQUAL_INT16("rcvMsg2->evtID", 333, rcvMsg2->evtID);
+ EXPECT_EQUAL_PTR("rcvMsg2->next", NULL, rcvMsg2->next);
- EXPECT_EQUAL_INT("RMessageQueue->first", NULL, queue1.first);
- EXPECT_EQUAL_INT("RMessageQueue->last", NULL, queue1.last);
+ EXPECT_EQUAL_PTR("RMessageQueue->first", NULL, queue1.first);
+ EXPECT_EQUAL_PTR("RMessageQueue->last", NULL, queue1.last);
RMessage* rcvMsg3 = RMessageQueue_pop(&queue1);
- EXPECT_EQUAL_INT("RMessageQueue_pop if empty", NULL, rcvMsg3);
+ EXPECT_EQUAL_PTR("RMessageQueue_pop if empty", NULL, rcvMsg3);
+ RUnit_closeTestCase();
}
#define MAX 1000
-void testMassiveMessaging(void){
+void TestEtMessageQueue_testMassiveMessaging(void){
+ RUnit_openTestCase("MassiveMessaging");
+
RMessage msgArray[MAX];
printf("sizeof(RMessage):%d\n", sizeof(RMessage));
printf("size(msgArray):%d\n", sizeof(msgArray));
@@ -59,7 +64,7 @@ void testMassiveMessaging(void){
RMessageQueue queue1;
RMessageQueue_init(&queue1);
- int i;
+ int32 i;
for(i=0; i<MAX; i++){
//RMessage_init(&msgArray[i]);
msgArray[i].address = i;
@@ -87,13 +92,14 @@ void testMassiveMessaging(void){
break;
}
}
- EXPECT_EQUAL_INT("i==MAX", MAX, i);
+ EXPECT_EQUAL_INT32("i==MAX", MAX, i);
}
+ RUnit_closeTestCase();
}
-void TestMessageQueue_runSuite(void){
- RUnit_open("TestRMessageQueue");
- testPushPop();
- testMassiveMessaging();
- RUnit_close();
+void TestEtMessageQueue_runSuite(void){
+ RUnit_openTestSuite("TestRMessageQueue");
+ TestEtMessageQueue_testPushPop();
+ TestEtMessageQueue_testMassiveMessaging();
+ RUnit_closeTestSuite();
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageQueue.h b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageQueue.h
index 5c3b51eaa..afceea8f8 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageQueue.h
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageQueue.h
@@ -10,9 +10,9 @@
*
*******************************************************************************/
-#ifndef TESTRMESSAGEQUEUE_H_
-#define TESTRMESSAGEQUEUE_H_
+#ifndef _TESTRMESSAGEQUEUE_H_
+#define _TESTRMESSAGEQUEUE_H_
-void TestMessageQueue_runSuite(void);
+void TestEtMessageQueue_runSuite(void);
-#endif /* TESTRMESSAGEQUEUE_H_ */
+#endif /* _TESTRMESSAGEQUEUE_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageService.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageService.c
index e11e3c556..ed14defb1 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageService.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageService.c
@@ -10,12 +10,14 @@
*
*******************************************************************************/
-#include "TestRMessageService.h"
+#include "TestEtMessageService.h"
#include "RUnit.h"
#include "RMessageService.h"
-void testRMessageService_init(void){
+void TestEtMessageService_init(void){
+ RUnit_openTestCase("testRMessageService_init");
+
RMessageService msgService;
int16 max = 6;
int16 blockSize = 32;
@@ -24,16 +26,18 @@ void testRMessageService_init(void){
RMessageService_init(&msgService, msgBuffer, max, blockSize);
- EXPECT_EQUAL_INT("msgService.messagePool.first", msgBuffer, msgService.messagePool.first);
- EXPECT_EQUAL_INT("msgService.messagePool in between", &msgBuffer[3*blockSize], msgService.messagePool.first->next->next->next);
- EXPECT_EQUAL_INT("msgService.messagePool.last(1)", &msgBuffer[5*blockSize], msgService.messagePool.first->next->next->next->next->next);
- EXPECT_EQUAL_INT("msgService.messagePool.last(2)", &msgBuffer[5*blockSize], msgService.messagePool.last);
- EXPECT_EQUAL_INT("msgService.messagePool.last.next", NULL, msgService.messagePool.last->next);
-
+ EXPECT_EQUAL_PTR("msgService.messagePool.first", msgBuffer, msgService.messagePool.first);
+ EXPECT_EQUAL_PTR("msgService.messagePool in between", &msgBuffer[3*blockSize], msgService.messagePool.first->next->next->next);
+ EXPECT_EQUAL_PTR("msgService.messagePool.last(1)", &msgBuffer[5*blockSize], msgService.messagePool.first->next->next->next->next->next);
+ EXPECT_EQUAL_PTR("msgService.messagePool.last(2)", &msgBuffer[5*blockSize], msgService.messagePool.last);
+ EXPECT_EQUAL_PTR("msgService.messagePool.last.next", 0, msgService.messagePool.last->next);
+ RUnit_closeTestCase();
}
-void testRMessageService_GetPushPopReturn(void){
+void TestEtMessageService_GetPushPopReturn(void){
+ RUnit_openTestCase("testRMessageService_GetPushPopReturn");
+
RMessageService msgService;
int16 max = 6;
int16 blockSize = 32;
@@ -45,7 +49,7 @@ void testRMessageService_GetPushPopReturn(void){
RMessage* msg1 = RMessageService_getMessageBuffer(&msgService, sizeof(RMessage));
RMessage* msg2 = RMessageService_getMessageBuffer(&msgService, sizeof(RMessage));
- EXPECT_EQUAL_INT("msgService.messagePool.size", 4, msgService.messagePool.size);
+ EXPECT_EQUAL_INT16("msgService.messagePool.size", 4, msgService.messagePool.size);
// define content
msg1->address = 11;
@@ -57,28 +61,31 @@ void testRMessageService_GetPushPopReturn(void){
RMessageService_pushMessage(&msgService, msg2);
RMessageService_pushMessage(&msgService, msg1);
- EXPECT_EQUAL_INT("msgService.messageQueue.size", 2, msgService.messageQueue.size);
+ EXPECT_EQUAL_INT16("msgService.messageQueue.size", 2, msgService.messageQueue.size);
// pop messages from queue
RMessage* rcvMsg1 = RMessageService_popMessage(&msgService);
RMessage* rcvMsg2 = RMessageService_popMessage(&msgService);
- EXPECT_EQUAL_INT("msgService.messageQueue.size",0, msgService.messageQueue.size);
+ EXPECT_EQUAL_INT16("msgService.messageQueue.size",0, msgService.messageQueue.size);
- EXPECT_EQUAL_INT("msgService.popMessage", 22, rcvMsg1->address);
- EXPECT_EQUAL_INT("msgService.popMessage", 222, rcvMsg1->evtID);
- EXPECT_EQUAL_INT("msgService.popMessage", 11, rcvMsg2->address);
- EXPECT_EQUAL_INT("msgService.popMessage", 111, rcvMsg2->evtID);
+ EXPECT_EQUAL_INT16("msgService.popMessage", 22, rcvMsg1->address);
+ EXPECT_EQUAL_INT16("msgService.popMessage", 222, rcvMsg1->evtID);
+ EXPECT_EQUAL_INT16("msgService.popMessage", 11, rcvMsg2->address);
+ EXPECT_EQUAL_INT16("msgService.popMessage", 111, rcvMsg2->evtID);
RMessageService_returnMessageBuffer(&msgService, rcvMsg1);
RMessageService_returnMessageBuffer(&msgService, rcvMsg2);
- EXPECT_EQUAL_INT("msgService.messagePool.size", 6, msgService.messagePool.size);
+ EXPECT_EQUAL_INT16("msgService.messagePool.size", 6, msgService.messagePool.size);
+ RUnit_closeTestCase();
}
-void testRMessageService_GetReturn(void){
+void TestEtMessageService_GetReturn(void){
+ RUnit_openTestCase("testRMessageService_GetReturn");
+
RMessageService msgService;
int16 max = 2;
int16 blockSize = 32;
@@ -92,23 +99,24 @@ void testRMessageService_GetReturn(void){
RMessage* msg3 = RMessageService_getMessageBuffer(&msgService, sizeof(RMessage));
EXPECT_TRUE("msgService getMessageBuffer", msg1!=NULL);
EXPECT_TRUE("msgService getMessageBuffer", msg2!=NULL);
- EXPECT_EQUAL_INT("msgService getMessageBuffer", msg3, NULL);
+ EXPECT_EQUAL_PTR("msgService getMessageBuffer", msg3, NULL);
// return messages
RMessageService_returnMessageBuffer(&msgService, msg1);
RMessageService_returnMessageBuffer(&msgService, msg2);
- EXPECT_EQUAL_INT("msgService.messagePool.size", 2, msgService.messagePool.size);
+ EXPECT_EQUAL_INT16("msgService.messagePool.size", 2, msgService.messagePool.size);
// get message bigger than blocksize
RMessage* msg4 = RMessageService_getMessageBuffer(&msgService, 33);
- EXPECT_EQUAL_INT("msgService getMessageBuffer", msg4, NULL);
+ EXPECT_EQUAL_PTR("msgService getMessageBuffer", msg4, NULL);
+ RUnit_closeTestCase();
}
-void TestRMessageService_runSuite(void){
- RUnit_open("TestRMessageService");
- testRMessageService_init();
- testRMessageService_GetPushPopReturn();
- testRMessageService_GetReturn();
- RUnit_close();
+void TestEtMessageService_runSuite(void){
+ RUnit_openTestSuite("TestRMessageService");
+ TestEtMessageService_init();
+ TestEtMessageService_GetPushPopReturn();
+ TestEtMessageService_GetReturn();
+ RUnit_closeTestSuite();
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageService.h b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageService.h
index 981a0484b..287ff8c8b 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/TestRMessageService.h
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessageService.h
@@ -10,12 +10,12 @@
*
*******************************************************************************/
-#ifndef TESTRMESSAGESERVICE_H_
-#define TESTRMESSAGESERVICE_H_
+#ifndef _TESTRMESSAGESERVICE_H_
+#define _TESTRMESSAGESERVICE_H_
#include "RMessageService.h"
-void TestRMessageService_runSuite(void);
+void TestEtMessageService_runSuite(void);
-#endif /* TESTRMESSAGESERVICE_H_ */
+#endif /* _TESTRMESSAGESERVICE_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml b/examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml
new file mode 100644
index 000000000..36d6edbba
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml
@@ -0,0 +1,17 @@
+<testsuites name="TestMessageService" tests="0" failures="0" errors="0" time="0">
+ <testsuite name="TestDataClass" tests="0" failures="0" errors="0" time="0">
+ <testcase name="testDataClassDeepCopy" time="0"/>
+ </testsuite>
+ <testsuite name="TestMessage" tests="0" failures="0" errors="0" time="0">
+ <testcase name="TestMessage_testBasicMessage" time="0"/>
+ </testsuite>
+ <testsuite name="TestRMessageQueue" tests="0" failures="0" errors="0" time="0">
+ <testcase name="testPushPop" time="0"/>
+ <testcase name="MassiveMessaging" time="0"/>
+ </testsuite>
+ <testsuite name="TestRMessageService" tests="0" failures="0" errors="0" time="0">
+ <testcase name="testRMessageService_init" time="0"/>
+ <testcase name="testRMessageService_GetPushPopReturn" time="0"/>
+ <testcase name="testRMessageService_GetReturn" time="0"/>
+ </testsuite>
+</testsuites>
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java
index a58326c17..451f8b19c 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java
@@ -702,8 +702,8 @@ public class RootImpl extends EObjectImpl implements Root {
}
private void getVarDeclDataClasses(HashSet<DataClass> dataClasses, Collection<VarDecl> decls) {
- for (VarDecl tid : decls) {
- DataClass dc = name2dc.get(tid.getType());
+ for (VarDecl vd : decls) {
+ DataClass dc = name2dc.get(vd.getType().getName());
if (dc!=null)
dataClasses.add(dc);
}
@@ -711,7 +711,7 @@ public class RootImpl extends EObjectImpl implements Root {
private void getAttributeDataClasses(HashSet<DataClass> dataClasses, Collection<Attribute> attributes) {
for (Attribute attr : attributes) {
- DataClass dc = name2dc.get(attr.getType());
+ DataClass dc = name2dc.get(attr.getType().getName());
if (dc!=null)
dataClasses.add(dc);
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/.cproject b/runtime/org.eclipse.etrice.runtime.c/.cproject
index afb7aca7f..76fd63aca 100644
--- a/runtime/org.eclipse.etrice.runtime.c/.cproject
+++ b/runtime/org.eclipse.etrice.runtime.c/.cproject
@@ -34,9 +34,7 @@
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.1185604346" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.lib.debug.option.optimization.level.157947957" name="Optimization Level" superClass="gnu.c.compiler.mingw.lib.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.lib.debug.option.debugging.level.1083191317" name="Debug Level" superClass="gnu.c.compiler.mingw.lib.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.790097072" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/include}&quot;"/>
- </option>
+ <option id="gnu.c.compiler.option.include.paths.790097072" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.361048721" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.597146923" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
diff --git a/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a b/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
index b7d8582b1..9da19117c 100644
--- a/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
+++ b/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
Binary files differ
diff --git a/runtime/org.eclipse.etrice.runtime.c/Release/liborg.eclipse.etrice.runtime.c.a b/runtime/org.eclipse.etrice.runtime.c/Release/liborg.eclipse.etrice.runtime.c.a
new file mode 100644
index 000000000..89c30a148
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/Release/liborg.eclipse.etrice.runtime.c.a
Binary files differ
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessage.c b/runtime/org.eclipse.etrice.runtime.c/src/RMessage.c
index 9e67a84c2..9e67a84c2 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessage.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RMessage.c
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessage.h b/runtime/org.eclipse.etrice.runtime.c/src/RMessage.h
index dd6927662..dd6927662 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessage.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RMessage.h
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageQueue.c b/runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.c
index 0c28cdec9..0c28cdec9 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageQueue.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.c
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageQueue.h b/runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h
index b2326eec8..b2326eec8 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageQueue.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageService.c b/runtime/org.eclipse.etrice.runtime.c/src/RMessageService.c
index 2fe28406c..2fe28406c 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageService.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RMessageService.c
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageService.h b/runtime/org.eclipse.etrice.runtime.c/src/RMessageService.h
index fae4e33bb..fae4e33bb 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/RMessageService.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RMessageService.h
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/RUnit.c b/runtime/org.eclipse.etrice.runtime.c/src/RUnit.c
new file mode 100644
index 000000000..2a68f5f8f
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RUnit.c
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "RUnit.h"
+#include <string.h>
+
+/*** member variables */
+
+/* file handling */
+static FILE* RUnit_reportfile = NULL;
+
+/* names */
+static char* RUnit_TestFileName = NULL;
+static char* RUnit_TestResultPath = NULL;
+
+static char* RUnit_TestSuiteName = NULL;
+static char* RUnit_TestCaseName = NULL;
+
+/* counters */
+static etInt32 RUnit_passCount = 0;
+static etInt32 RUnit_failCount = 0;
+
+static boool etUnit_testcaseSuccess = TRUE;
+
+#define ETUNIT_FAILURE_TEXT_LEN 256
+
+static char etUnit_failureText[ETUNIT_FAILURE_TEXT_LEN];
+
+/* time measuring */
+static clock_t RUnit_startTime = 0;
+static clock_t RUnit_currentTime = 0;
+
+/* */
+
+/* forward declarations of private functions */
+void expect_equal_int(const char* message, etInt32 expected, etInt32 actual);
+void expect_equal_uint(const char* message, etUInt32 expected, etUInt32 actual);
+void expect_equal_float(const char* message, float64 expected, float64 actual, float64 precision);
+void RUnit_writeTestLog(const char *testcase, boool result, const char *resulttext);
+void etUnit_handleExpect(boool result, const char *resulttext);
+
+/* public functions */
+
+void RUnit_open(char* testResultPath, char* testFileName) {
+ RUnit_passCount = 0;
+ RUnit_failCount = 0;
+ strcpy(etUnit_failureText,"");
+
+ RUnit_TestFileName = testFileName;
+ RUnit_TestResultPath = testResultPath;
+
+ printf("************* TEST START (%s) **************\n", RUnit_TestFileName);
+
+ char filename[ETUNIT_FAILURE_TEXT_LEN];
+ sprintf(filename, "%s/%s.xml", RUnit_TestResultPath, RUnit_TestFileName);
+
+ if (RUnit_reportfile == NULL) {
+ RUnit_reportfile = fopen(filename, "w+");
+ if (RUnit_reportfile != NULL) {
+ fprintf(RUnit_reportfile, "<testsuites name=\"%s\" tests=\"0\" failures=\"0\" errors=\"0\" time=\"0\">\n",
+ RUnit_TestFileName);
+ } else {
+ printf("Unable to open file %s/%s.xml\n", RUnit_TestResultPath, RUnit_TestFileName);
+ }
+ }
+ // prepare time measurement
+ RUnit_startTime = clock();
+ RUnit_currentTime = clock();
+ printf("Start Time: %ld\n", RUnit_startTime);
+
+}
+
+void RUnit_close(void) {
+ printf("\n");
+ if (RUnit_failCount > 0) {
+ printf("************* TEST FAILED *************\n");
+ } else {
+ printf("************* TEST PASSED *************\n");
+ }
+ printf("Number of Tests: %ld\n", RUnit_failCount + RUnit_passCount);
+ printf("Failed: %ld\n", RUnit_failCount);
+ printf("Passed: %ld\n", RUnit_passCount);
+ printf("Total Time: %ld\n", clock() - RUnit_startTime);
+ printf("End Time: %ld, CLOCKS_PER_SEC: %ld\n", clock(), CLOCKS_PER_SEC);
+ printf("***************************************\n");
+
+ if (RUnit_reportfile != NULL) {
+ fprintf(RUnit_reportfile, "</testsuites>\n");
+ fclose(RUnit_reportfile);
+ RUnit_reportfile = NULL;
+ }
+}
+
+void RUnit_openTestSuite(char* testSuiteName) {
+ RUnit_TestSuiteName = testSuiteName;
+ if (RUnit_reportfile != NULL) {
+ fprintf(RUnit_reportfile, "\t<testsuite name=\"%s\" tests=\"0\" failures=\"0\" errors=\"0\" time=\"0\">\n",
+ RUnit_TestSuiteName);
+ }
+}
+
+void RUnit_closeTestSuite(void) {
+ if (RUnit_reportfile != NULL) {
+ fprintf(RUnit_reportfile, "\t</testsuite>\n");
+ }
+}
+
+void RUnit_openTestCase(char* testCaseName) {
+ RUnit_TestCaseName = testCaseName;
+ etUnit_testcaseSuccess = TRUE;
+ strcpy(etUnit_failureText,"");
+}
+
+void RUnit_closeTestCase(void) {
+ if (RUnit_reportfile != NULL && RUnit_TestSuiteName != NULL) {
+ RUnit_writeTestLog(RUnit_TestCaseName, etUnit_testcaseSuccess, etUnit_failureText);
+ }
+}
+
+void EXPECT_TRUE(const char* message, boool condition) {
+ if (condition == FALSE) {
+ char testresult[ETUNIT_FAILURE_TEXT_LEN];
+ sprintf(testresult, "%s: *** EXPECT_TRUE == FALSE", message);
+ etUnit_handleExpect(FALSE, testresult);
+ } else {
+ etUnit_handleExpect(TRUE, "");
+ }
+}
+
+void EXPECT_FALSE(const char* message, boool condition) {
+ if (condition == TRUE) {
+ char testresult[ETUNIT_FAILURE_TEXT_LEN];
+ sprintf(testresult, "%s: EXPECT_FALSE == TRUE", message);
+ etUnit_handleExpect(FALSE, testresult);
+ } else {
+ etUnit_handleExpect(TRUE, "");
+ }
+}
+
+void EXPECT_EQUAL_INT8(const char* message, etInt8 expected, etInt8 actual) {
+ expect_equal_int(message, (etInt32) expected, (etInt32) actual);
+}
+
+void EXPECT_EQUAL_INT16(const char* message, etInt16 expected, etInt16 actual) {
+ expect_equal_int(message, (etInt32) expected, (etInt32) actual);
+}
+
+void EXPECT_EQUAL_INT32(const char* message, etInt32 expected, etInt32 actual) {
+ expect_equal_int(message, (etInt32) expected, (etInt32) actual);
+}
+
+void EXPECT_EQUAL_UINT8(const char* message, etUInt8 expected, etUInt8 actual) {
+ expect_equal_uint(message, (etUInt32) expected, (etUInt32) actual);
+}
+
+void EXPECT_EQUAL_UINT16(const char* message, etUInt16 expected, etUInt16 actual) {
+ expect_equal_uint(message, (etUInt32) expected, (etUInt32) actual);
+}
+
+void EXPECT_EQUAL_UINT32(const char* message, etUInt32 expected, etUInt32 actual) {
+ expect_equal_uint(message, (etUInt32) expected, (etUInt32) actual);
+}
+
+
+void EXPECT_EQUAL_FLOAT32(const char* message, float32 expected, float32 actual, float32 precision) {
+ expect_equal_float(message, (float64) expected, (float64) actual, (float64) precision);
+}
+
+void EXPECT_EQUAL_FLOAT64(const char* message, float64 expected, float64 actual, float64 precision) {
+ expect_equal_float(message, (float64) expected, (float64) actual, (float64) precision);
+}
+
+
+/* private functions */
+
+void expect_equal_int(const char* message, etInt32 expected, etInt32 actual) {
+ if (expected != actual) {
+ char testresult[ETUNIT_FAILURE_TEXT_LEN];
+ sprintf(testresult, "%s: expected=%ld, actual=%ld", message, expected, actual);
+ etUnit_handleExpect(FALSE, testresult);
+ } else {
+ etUnit_handleExpect(TRUE, "");
+ }
+}
+
+void expect_equal_uint(const char* message, etUInt32 expected, etUInt32 actual) {
+ if (expected != actual) {
+ char testresult[ETUNIT_FAILURE_TEXT_LEN];
+ sprintf(testresult, "%s: expected=%lu, actual=%lu", message, expected, actual);
+ etUnit_handleExpect(FALSE, testresult);
+ } else {
+ etUnit_handleExpect(TRUE, "");
+ }
+}
+
+
+void expect_equal_float(const char* message, float64 expected, float64 actual, float64 precision) {
+ if (expected - actual < -precision || expected - actual > precision) {
+ char testresult[ETUNIT_FAILURE_TEXT_LEN];
+ sprintf(testresult, "%s: expected=%lf, actual=%lf", message, expected, actual);
+ etUnit_handleExpect(FALSE, testresult);
+ } else {
+ etUnit_handleExpect(TRUE, "");
+ }
+}
+
+void expect_equal_void_ptr(const char* message, const void* expected, const void* actual) {
+ if (expected != actual) {
+ char testresult[ETUNIT_FAILURE_TEXT_LEN];
+ sprintf(testresult, "%s: expected=%ld, actual=%ld", message, (etUInt32) expected, (etUInt32) actual);
+ etUnit_handleExpect(FALSE, testresult);
+ } else {
+ etUnit_handleExpect(TRUE, "");
+ }
+}
+
+
+//_________
+
+void etUnit_handleExpect(boool result, const char *resulttext){
+ if (result == TRUE) {
+ /* nothing to do because no failure */
+ }
+ else {
+ if (etUnit_testcaseSuccess == TRUE){
+ /* first failure will be remembered */
+ etUnit_testcaseSuccess = FALSE;
+ strcpy(etUnit_failureText, resulttext);
+ }
+ else{
+ /* more than one error will be ignored */
+ }
+ }
+}
+
+void RUnit_buildTestLogXML(char* xml, const char *testcase, boool result, const char *resulttext, clock_t time) {
+ if (result == TRUE) {
+ sprintf(xml, "\t\t<testcase name=\"%s\" time=\"%ld\"/>\n", testcase, time);
+ } else {
+ sprintf(
+ xml,
+ "\t\t<testcase name=\"%s\" classname=\"none\" time=\"%ld\">\n\t\t<failure>%s</failure>\n\t</testcase>\n",
+ testcase, time, resulttext);
+ }
+}
+
+void RUnit_writeTestLog(const char *testcase, boool result, const char *resulttext) {
+ char writeBuffer[ETUNIT_FAILURE_TEXT_LEN];
+
+ // counting
+ if (result == TRUE) {
+ RUnit_passCount++;
+ printf("PASS: %s: %s\n", testcase, resulttext);
+ } else {
+ RUnit_failCount++;
+ printf("FAIL: %s: %s\n", testcase, resulttext);
+ }
+
+ clock_t time = clock() - RUnit_currentTime;
+ RUnit_currentTime = clock();
+
+ // writing to file
+ if (RUnit_reportfile != NULL) {
+ RUnit_buildTestLogXML(writeBuffer, testcase, result, resulttext, time);
+ fprintf(RUnit_reportfile, writeBuffer);
+ }
+}
+
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/RUnit.h b/runtime/org.eclipse.etrice.runtime.c/src/RUnit.h
new file mode 100644
index 000000000..a3badcc7e
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RUnit.h
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef _RUNIT_H_
+#define _RUNIT_H_
+
+#include "datatypes.h"
+#include <stdio.h>
+#include <time.h>
+
+
+// open / close
+void RUnit_open(char* testResultPath, char* testFileName);
+void RUnit_close(void);
+void RUnit_openTestSuite(char* testSuiteName);
+void RUnit_closeTestSuite(void);
+void RUnit_openTestCase(char* testCaseName);
+void RUnit_closeTestCase(void);
+
+/* boolean values */
+void EXPECT_TRUE(const char* testcase, etBool condition);
+void EXPECT_FALSE(const char* testcase, etBool condition);
+
+/* signed integer values */
+void EXPECT_EQUAL_INT8(const char* testcase, etInt8 expected, etInt8 actual);
+void EXPECT_EQUAL_INT16(const char* testcase, etInt16 expected, etInt16 actual);
+void EXPECT_EQUAL_INT32(const char* testcase, etInt32 expected, etInt32 actual);
+
+/* unsigned integer values */
+void EXPECT_EQUAL_UINT8(const char* testcase, etUInt8 expected, etUInt8 actual);
+void EXPECT_EQUAL_UINT16(const char* testcase, etUInt16 expected, etUInt16 actual);
+void EXPECT_EQUAL_UINT32(const char* testcase, etUInt32 expected, etUInt32 actual);
+
+/* float values */
+void EXPECT_EQUAL_FLOAT32(const char* testcase, etFloat32 expected, etFloat32 actual, etFloat32 precision);
+void EXPECT_EQUAL_FLOAT64(const char* testcase, etFloat64 expected, etFloat64 actual, etFloat64 precision);
+
+/* Pointers */
+#define EXPECT_EQUAL_PTR(testcase, expected, actual) \
+ expect_equal_void_ptr(testcase, (const void*) expected, (const void*) actual);
+
+void expect_equal_void_ptr(const char* testcase, const void* expected, const void* actual);
+
+#endif /* _RUNIT_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/datatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/datatypes.h
index ff97c8489..7bcc4826a 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/runtime/datatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/datatypes.h
@@ -13,15 +13,23 @@
#ifndef _DATATYPES_H_
#define _DATATYPES_H_
+/*
+ * typedefs for platform specific datatypes
+ *
+ * */
+
/* unsigned integer datatypes */
typedef unsigned char uint8;
typedef unsigned short int uint16;
typedef unsigned long uint32;
+typedef unsigned long long uint64;
/* signed integer datatypes */
typedef char int8;
typedef short int int16;
typedef long int32;
+typedef long long int64;
+
/* float datatypes */
typedef float float32;
@@ -36,5 +44,22 @@ typedef char boool; /* TODO: bool, Bool, Boolean, and boolean are already defin
#define FALSE 0
#endif
+/*
+ * typedefs for Runtime and Testing
+ *
+ * */
+
+typedef uint8 etInt8;
+typedef int16 etInt16;
+typedef int32 etInt32;
+
+typedef uint8 etUInt8;
+typedef uint16 etUInt16;
+typedef uint32 etUInt32;
+
+typedef boool etBool;
+
+typedef float32 etFloat32;
+typedef float64 etFloat64;
#endif /* _DATATYPES_H_ */
diff --git a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.ChoicePointTest.room b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.ChoicePointTest.room
index f2277d2cc..0790314b8 100644
--- a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.ChoicePointTest.room
+++ b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.ChoicePointTest.room
@@ -1,261 +1,263 @@
-RoomModel org.eclipse.etrice.integration.ChoicePointTest {
-
- LogicalSystem System_HandlerTest {
- SubSystemRef SubSystem_CPTest: SubSystem_CPTest
- }
-
- SubSystemClass SubSystem_CPTest {
- ActorRef HandlerTest_Top: CPTest_Top
- }
-
- ActorClass CPTest_Top {
- Structure {
- ActorRef cp_tester: CPTester
- ActorRef cp_user: CPUser
- Binding cp_tester.TestPort1 and cp_user.TestPort1
- }
- Behavior { }
- }
-
- ActorClass CPUser {
- Interface {
- Port TestPort1: TestProtocol
- }
- Structure {
- usercode1{
- "import org.eclipse.etrice.integration.tests.helpers.*;"
- "import org.eclipse.etrice.runtime.java.messaging.RTServices;"
- }
- usercode2 {
- "private CRC16Generator crcGen = new CRC16Generator();"
- }
- external Port TestPort1
- Attribute counter: int32
- }
- Behavior {
- StateMachine {
- Transition init: initial -> cp cp0 {
- action {
- "System.out.println(\"Top Level init transition\");"
- "crcGen.update(10);"
- "counter = 0;"
- }
- }
- Transition tr4: cp cp0 -> state0 {
- action {
- "System.out.println(\"choice0: else code\");"
- "crcGen.update(17);"
- }
- }
- Transition LastCheck: cp cp0 -> state0 {
- cond {
- "counter == 0"
- }
- action {
- "System.out.println(\"choice0: true code\");"
- "crcGen.update(15);"
- }
- }
- Transition tr1: state0 -> cp cp1 {
- triggers {
- <msg1: TestPort1>
- }
- action {
- "System.out.println(\"state0: msg1: transition code\");"
- "crcGen.update(18);"
- }
- }
- Transition tr2: cp cp1 -> state0 {
- action {
- "System.out.println(\"choice1: else code\");"
- "crcGen.update(10);"
- "counter=3;"
- }
- }
- Transition tr3: cp cp1 -> tp0 of state1 {
- cond {
- "counter == 4"
- }
- action {
- "System.out.println(\"choice1: to entry state1 code\");"
- "crcGen.update(30);"
- }
- }
- Transition tr5: state1 -> cp cp2 {
- triggers {
- <msg1: TestPort1 guard {
- "counter==2"
- }>
- }
- action {
- "System.out.println(\"state1: msg1: transition code\");"
- "crcGen.update(30);"
- "System.out.printf(\"CRC: %d \\n\", crcGen.getCrc());"
- }
- }
- Transition tr0: cp cp2 -> testFalse {
- action {
- "System.out.println(\"Test false\");"
- "RTServices.getInstance().getSubSystem().testFinished(1);"
- }
- }
- Transition tr6: cp cp2 -> testOk {
- cond {
- "crcGen.getCrc()==26639"
- }
- action {
- "System.out.println(\"Test ok\");"
- "RTServices.getInstance().getSubSystem().testFinished(0);"
- }
- }
- Transition tr11: cp cp1 -> state1 {
- cond {
- "counter == 3"
- }
- action {
- "System.out.println(\"choice1: history to State1 transition code\");"
- "crcGen.update(25);"
- "counter = 1;"
- }
- }
- Transition tr7: state1 -> state0 {
- triggers {
- <msg1: TestPort1 guard {
- "counter==1"
- }>
- }
- action {
- "System.out.println(\"state1: msg1: transition code to state0\");"
- "crcGen.update(51);"
- "counter=4;"
- }
- }
- Transition tr8: my tp0 -> my tp0 {
- triggers {
- <msg1: TestPort1>
- }
- action {
- "System.out.println(\"Handler: msg1 received \");"
- "crcGen.update(115);"
- "counter = 2;"
- }
- }
- ChoicePoint cp0
- ChoicePoint cp1
- ChoicePoint cp2
- handler TransitionPoint tp0
- State state0 {
- entry {
- "System.out.println(\"state0: entry code\");"
- "crcGen.update(12);"
- }
- exit {
- "System.out.println(\"state0: exit code\");"
- "crcGen.update(13);"
- }
- }
- State state1 {
- entry {
- "System.out.println(\"state1: entry code\");"
- "crcGen.update(20);"
- }
- exit {
- "System.out.println(\"state1: exit code\");"
- "crcGen.update(21);"
- }
- subgraph {
- Transition tr1: my tp0 -> cp cp0 {
- action {
- "System.out.println(\"state1: tp0: transition code\");"
- "crcGen.update(25);"
- }
- }
- Transition tr2: cp cp0 -> state0 {
- action {
- "System.out.println(\"state1: choice false code\");"
- "crcGen.update(57);"
- }
- }
- Transition tr0: cp cp0 -> state0 {
- cond {
- "counter == 4"
- }
- action {
- "System.out.println(\"state1 choice: true code\");"
- "crcGen.update(56);"
- }
- }
- Transition init: initial -> state0 {
- action {
- "System.out.println(\"state1 initial transition code\");"
- "crcGen.update(53);"
- }
- }
- ChoicePoint cp0
- EntryPoint tp0
- State state0 {
- entry {
- "System.out.println(\"state1\\\\0: entry code\");"
- "System.out.printf(\"counter => %d\\n\",counter);"
- "crcGen.update(22);"
- }
- exit {
- "System.out.println(\"state1\\\\0: exit code\");"
- "crcGen.update(23);"
- }
- }
- }
- }
- State testOk
- State testFalse
- }
- }
- }
-
- ActorClass CPTester {
- Interface {
- conjugated Port TestPort1: TestProtocol
- }
- Structure {
- external Port TestPort1
- }
- Behavior {
- StateMachine {
- Transition init: initial -> state0 {
- action {
- "TestPort1.msg1();"
- "System.out.println(\"msg1 sent \");"
- ""
- "TestPort1.msg1();"
- "System.out.println(\"msg1 sent \");"
- ""
- "TestPort1.msg1();"
- "System.out.println(\"msg1 sent \");"
- ""
- "TestPort1.msg1();"
- "System.out.println(\"msg1 sent \");"
- ""
- "TestPort1.msg1();"
- "System.out.println(\"msg1 sent \");"
- ""
- "TestPort1.msg1();"
- "System.out.println(\"msg1 sent \");"
- }
- }
- State state0
- }
- }
- }
-
- ProtocolClass TestProtocol {
- incoming {
- Message msg1()
- Message msg2()
- Message msg3()
- Message msg4()
- Message msg5()
- }
- outgoing{}
- }
-
+RoomModel org.eclipse.etrice.integration.ChoicePointTest {
+
+ import room.basic.types.java.* from "../../../runtime/org.eclipse.etrice.modellib/models/JavaTypes.room"
+
+ LogicalSystem System_HandlerTest {
+ SubSystemRef SubSystem_CPTest: SubSystem_CPTest
+ }
+
+ SubSystemClass SubSystem_CPTest {
+ ActorRef HandlerTest_Top: CPTest_Top
+ }
+
+ ActorClass CPTest_Top {
+ Structure {
+ ActorRef cp_tester: CPTester
+ ActorRef cp_user: CPUser
+ Binding cp_tester.TestPort1 and cp_user.TestPort1
+ }
+ Behavior { }
+ }
+
+ ActorClass CPUser {
+ Interface {
+ Port TestPort1: TestProtocol
+ }
+ Structure {
+ usercode1{
+ "import org.eclipse.etrice.integration.tests.helpers.*;"
+ "import org.eclipse.etrice.runtime.java.messaging.RTServices;"
+ }
+ usercode2 {
+ "private CRC16Generator crcGen = new CRC16Generator();"
+ }
+ external Port TestPort1
+ Attribute counter: int32
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -> cp cp0 {
+ action {
+ "System.out.println(\"Top Level init transition\");"
+ "crcGen.update(10);"
+ "counter = 0;"
+ }
+ }
+ Transition tr4: cp cp0 -> state0 {
+ action {
+ "System.out.println(\"choice0: else code\");"
+ "crcGen.update(17);"
+ }
+ }
+ Transition LastCheck: cp cp0 -> state0 {
+ cond {
+ "counter == 0"
+ }
+ action {
+ "System.out.println(\"choice0: true code\");"
+ "crcGen.update(15);"
+ }
+ }
+ Transition tr1: state0 -> cp cp1 {
+ triggers {
+ <msg1: TestPort1>
+ }
+ action {
+ "System.out.println(\"state0: msg1: transition code\");"
+ "crcGen.update(18);"
+ }
+ }
+ Transition tr2: cp cp1 -> state0 {
+ action {
+ "System.out.println(\"choice1: else code\");"
+ "crcGen.update(10);"
+ "counter=3;"
+ }
+ }
+ Transition tr3: cp cp1 -> tp0 of state1 {
+ cond {
+ "counter == 4"
+ }
+ action {
+ "System.out.println(\"choice1: to entry state1 code\");"
+ "crcGen.update(30);"
+ }
+ }
+ Transition tr5: state1 -> cp cp2 {
+ triggers {
+ <msg1: TestPort1 guard {
+ "counter==2"
+ }>
+ }
+ action {
+ "System.out.println(\"state1: msg1: transition code\");"
+ "crcGen.update(30);"
+ "System.out.printf(\"CRC: %d \\n\", crcGen.getCrc());"
+ }
+ }
+ Transition tr0: cp cp2 -> testFalse {
+ action {
+ "System.out.println(\"Test false\");"
+ "RTServices.getInstance().getSubSystem().testFinished(1);"
+ }
+ }
+ Transition tr6: cp cp2 -> testOk {
+ cond {
+ "crcGen.getCrc()==26639"
+ }
+ action {
+ "System.out.println(\"Test ok\");"
+ "RTServices.getInstance().getSubSystem().testFinished(0);"
+ }
+ }
+ Transition tr11: cp cp1 -> state1 {
+ cond {
+ "counter == 3"
+ }
+ action {
+ "System.out.println(\"choice1: history to State1 transition code\");"
+ "crcGen.update(25);"
+ "counter = 1;"
+ }
+ }
+ Transition tr7: state1 -> state0 {
+ triggers {
+ <msg1: TestPort1 guard {
+ "counter==1"
+ }>
+ }
+ action {
+ "System.out.println(\"state1: msg1: transition code to state0\");"
+ "crcGen.update(51);"
+ "counter=4;"
+ }
+ }
+ Transition tr8: my tp0 -> my tp0 {
+ triggers {
+ <msg1: TestPort1>
+ }
+ action {
+ "System.out.println(\"Handler: msg1 received \");"
+ "crcGen.update(115);"
+ "counter = 2;"
+ }
+ }
+ ChoicePoint cp0
+ ChoicePoint cp1
+ ChoicePoint cp2
+ handler TransitionPoint tp0
+ State state0 {
+ entry {
+ "System.out.println(\"state0: entry code\");"
+ "crcGen.update(12);"
+ }
+ exit {
+ "System.out.println(\"state0: exit code\");"
+ "crcGen.update(13);"
+ }
+ }
+ State state1 {
+ entry {
+ "System.out.println(\"state1: entry code\");"
+ "crcGen.update(20);"
+ }
+ exit {
+ "System.out.println(\"state1: exit code\");"
+ "crcGen.update(21);"
+ }
+ subgraph {
+ Transition tr1: my tp0 -> cp cp0 {
+ action {
+ "System.out.println(\"state1: tp0: transition code\");"
+ "crcGen.update(25);"
+ }
+ }
+ Transition tr2: cp cp0 -> state0 {
+ action {
+ "System.out.println(\"state1: choice false code\");"
+ "crcGen.update(57);"
+ }
+ }
+ Transition tr0: cp cp0 -> state0 {
+ cond {
+ "counter == 4"
+ }
+ action {
+ "System.out.println(\"state1 choice: true code\");"
+ "crcGen.update(56);"
+ }
+ }
+ Transition init: initial -> state0 {
+ action {
+ "System.out.println(\"state1 initial transition code\");"
+ "crcGen.update(53);"
+ }
+ }
+ ChoicePoint cp0
+ EntryPoint tp0
+ State state0 {
+ entry {
+ "System.out.println(\"state1\\\\0: entry code\");"
+ "System.out.printf(\"counter => %d\\n\",counter);"
+ "crcGen.update(22);"
+ }
+ exit {
+ "System.out.println(\"state1\\\\0: exit code\");"
+ "crcGen.update(23);"
+ }
+ }
+ }
+ }
+ State testOk
+ State testFalse
+ }
+ }
+ }
+
+ ActorClass CPTester {
+ Interface {
+ conjugated Port TestPort1: TestProtocol
+ }
+ Structure {
+ external Port TestPort1
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -> state0 {
+ action {
+ "TestPort1.msg1();"
+ "System.out.println(\"msg1 sent \");"
+ ""
+ "TestPort1.msg1();"
+ "System.out.println(\"msg1 sent \");"
+ ""
+ "TestPort1.msg1();"
+ "System.out.println(\"msg1 sent \");"
+ ""
+ "TestPort1.msg1();"
+ "System.out.println(\"msg1 sent \");"
+ ""
+ "TestPort1.msg1();"
+ "System.out.println(\"msg1 sent \");"
+ ""
+ "TestPort1.msg1();"
+ "System.out.println(\"msg1 sent \");"
+ }
+ }
+ State state0
+ }
+ }
+ }
+
+ ProtocolClass TestProtocol {
+ incoming {
+ Message msg1()
+ Message msg2()
+ Message msg3()
+ Message msg4()
+ Message msg5()
+ }
+ outgoing{}
+ }
+
} \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.HandlerTest.room b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.HandlerTest.room
index a52ec200e..6d598a40e 100644
--- a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.HandlerTest.room
+++ b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.HandlerTest.room
@@ -1,6 +1,7 @@
RoomModel org.eclipse.etrice.integration.HandlerTest {
import room.basic.service.timing.* from "../../../runtime/org.eclipse.etrice.modellib/models/TimingService.room"
+ import room.basic.types.java.* from "../../../runtime/org.eclipse.etrice.modellib/models/JavaTypes.room"
LogicalSystem System_HandlerTest {
SubSystemRef SubSystem_HandlerTest: SubSystem_HandlerTest
diff --git a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTest.room b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTest.room
index ad16f39ca..0a9745359 100644
--- a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTest.room
+++ b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTest.room
@@ -1,6 +1,7 @@
RoomModel org.eclipse.etrice.integration.PingPongThreadTest {
import room.basic.service.timing.* from "../../../runtime/org.eclipse.etrice.modellib/models/TimingService.room"
+ import room.basic.types.java.* from "../../../runtime/org.eclipse.etrice.modellib/models/JavaTypes.room"
LogicalSystem System_PingPong {
SubSystemRef subsystem: SubSystem_PingPong
diff --git a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTestReplPort.room b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTestReplPort.room
index 41ad806c5..25e5d3bfa 100644
--- a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTestReplPort.room
+++ b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.PingPongThreadTestReplPort.room
@@ -1,6 +1,7 @@
RoomModel org.eclipse.etrice.integration.PingPongThreadTestReplPort {
import room.basic.service.timing.* from "../../../runtime/org.eclipse.etrice.modellib/models/TimingService.room"
+ import room.basic.types.java.* from "../../../runtime/org.eclipse.etrice.modellib/models/JavaTypes.room"
LogicalSystem System_PingPongReplPort {
SubSystemRef subsystem: SubSystem_PingPongReplPort
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 11eb87701..ccd65d311 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
@@ -1,307 +1,309 @@
-RoomModel org.eclipse.etrice.integration.SendingDataByValueTest {
-
- LogicalSystem LogSys_SendingData {
- SubSystemRef application: SubSys_SendingData
- }
-
- SubSystemClass SubSys_SendingData {
- ActorRef top: SendingDataTop
- }
-
- ActorClass SendingDataTop {
- Structure {
- ActorRef mrPing: MrPing
- ActorRef mrPong: MrPong
- Binding mrPing.PingPongPort and mrPong.PingPongPort
- }
- Behavior { }
- }
-
- ActorClass MrPong {
- Interface {
- Port PingPongPort: PingPongProtocol
- }
- Structure {
- external Port PingPongPort
- }
- Behavior {
- Operation printData(d: PingPongData): void {
- "System.out.printf(\"\\n\");"
- "System.out.printf(\"i8Val: %d \\n\",d.getI8Val());"
- "System.out.printf(\"i16Val: %d \\n\",d.getI16Val());"
- "System.out.printf(\"i32Val: %d \\n\",d.getI32Val());"
- "System.out.printf(\"charVal: %c \\n\",d.getCharVal());"
- "System.out.printf(\"f32Val: %f \\n\",d.getF32Val());"
- "System.out.printf(\"f64Val: %f \\n\",d.getF64Val());"
- "System.out.printf(\"stringVal: %s \\n\",d.getStringVal());"
- "System.out.printf(\"i32Array: %d %d %d %d %d\\n\",d.getArrayFromInt32()[0],d.getArrayFromInt32()[1],d.getArrayFromInt32()[2],d.getArrayFromInt32()[3],d.getArrayFromInt32()[4] );"
- "System.out.printf(\"\\n\");"
- }
- StateMachine {
- Transition tr0: reply -> reply {
- triggers {
- <ping: PingPongPort>
- }
- action {
- "p.setI8Val((byte)(p.getI8Val()+1));"
- ""
- ""
- "PingPongPort.pong(p);"
- }
- }
- Transition tr1: reply -> reply {
- triggers {
- <pingSimple: PingPongPort>
- }
- action {
- "PingPongPort.pongSimple(++p);"
- }
- }
- Transition init: initial -> reply { }
- State reply
- }
- }
- }
-
- ActorClass MrPing {
- Interface {
- conjugated Port PingPongPort: PingPongProtocol
- }
- Structure {
- usercode1{
- "import org.eclipse.etrice.integration.tests.helpers.*;"
- "import org.eclipse.etrice.runtime.java.messaging.RTServices;"
- }
- usercode2 {
- "private CRC16Generator crcGen = new CRC16Generator();"
- }
- external Port PingPongPort
- Attribute i32Array [ 10 ]: int32
- Attribute data : PingPongData
- }
- Behavior {
- Operation printData(d: PingPongData): void {
- "System.out.printf(\"MrPing:\\n\");"
- "System.out.printf(\"i8Val: %d \\n\",d.getI8Val());"
- "System.out.printf(\"i16Val: %d \\n\",d.getI16Val());"
- "System.out.printf(\"i32Val: %d \\n\",d.getI32Val());"
- "System.out.printf(\"charVal: %c \\n\",d.getCharVal());"
- "System.out.printf(\"f32Val: %f \\n\",d.getF32Val());"
- "System.out.printf(\"f64Val: %f \\n\",d.getF64Val());"
- "System.out.printf(\"stringVal: %s \\n\",d.getStringVal());"
- "System.out.printf(\"i32Array: %d %d %d %d %d\\n\",d.getArrayFromInt32()[0],d.getArrayFromInt32()[1],d.getArrayFromInt32()[2],d.getArrayFromInt32()[3],d.getArrayFromInt32()[4] );"
- "System.out.printf(\"\\n\");"
- }
- StateMachine {
- Transition init: initial -> waitForPong {
- action {
- "int i;"
- "int[] intArray;"
- "this.data=new PingPongData();"
- ""
- "// send default data"
- "PingPongData d = new PingPongData();"
- "PingPongPort.ping(d);"
- ""
- "d.setI8Val((byte) 45);"
- "d.setI16Val((short) 34);"
- "d.setI32Val(2);"
- "d.setF32Val((float)3.14);"
- "d.setF64Val(7.12345);"
- "d.setStringVal(\"Hase !\");"
- ""
- "d.getOwnType().setI8Val((byte)10);"
- "d.getOwnType().setI16Val((short)17);"
- "d.getOwnType().setI32Val(4711);"
- "d.getOwnType().setF32Val((float)3.0815);"
- "d.getOwnType().setF64Val(123.45678);"
- "d.getOwnType().setStringVal(\"Deep Hase !\");"
- "intArray = d.getOwnType().getArrayFromInt32();"
- "for (i=0;i<intArray.length;i++) {intArray[i] = 10+i;}"
- "d.getOwnType().setArrayFromInt32(intArray);"
- ""
- "PingPongPort.ping(d);"
- ""
- "d.setI8Val((byte) 55);"
- "d.setI16Val((short) 44);"
- "d.setI32Val(3);"
- "d.setF32Val((float)24.4563458);"
- "d.setF64Val(2347.2342312345);"
- "d.setStringVal(\"Mein Hase !\");"
- ""
- "d.getOwnType().setI8Val((byte)15);"
- "d.getOwnType().setI16Val((short)23);"
- "d.getOwnType().setI32Val(4812);"
- "d.getOwnType().setF32Val((float)2453.30815);"
- "d.getOwnType().setF64Val(125332.42342);"
- "d.getOwnType().setStringVal(\"Mein Deep Hase !\");"
- "intArray = d.getOwnType().getArrayFromInt32();"
- "for (i=0;i<intArray.length;i++) {intArray[i] = 30+i;}"
- "d.getOwnType().setArrayFromInt32(intArray);"
- ""
- "PingPongPort.ping(d);"
- "PingPongPort.ping(data);"
- ""
- "data.setI8Val((byte) 67);"
- "data.setI16Val((short) 97);"
- "data.setI32Val(70);"
- "data.setF32Val((float)233.14);"
- "data.setF64Val(723434.12345);"
- "data.setStringVal(\"Falscher Hase !\");"
- ""
- "crcGen.update(10);"
- }
- }
- Transition tr0: my tp0 -> my tp0 {
- triggers {
- <pong: PingPongPort>
- }
- action {
- "System.out.printf(\"Top Level : \\n\");"
- "printData(p);"
- "crcGen.update(20);"
- }
- }
- Transition tr1: my tp0 -> my tp0 {
- triggers {
- <pongSimple: PingPongPort>
- }
- action {
- "System.out.printf(\"Top Level Simple: \\n\");"
- "crcGen.update(35);"
- }
- }
- Transition tr10: waitForPong -> cp cp0 {
- triggers {
- <pong: PingPongPort>
- }
- action {
- "printData(p);"
- "crcGen.update(11);"
- }
- }
- Transition tr4: cp cp0 -> waitForPong {
- action {
- "crcGen.update(12);"
- }
- }
- Transition tr3: cp cp0 -> state0 {
- 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);"
- }
- }
- Transition tr5: state0 -> state1 {
- triggers {
- <pong: PingPongPort guard {
- "p.getI32Val()==3"
- }>
- }
- action {
- "printData(p);"
- "PingPongPort.pingSimple(12);"
- "PingPongPort.pingSimple(27);"
- "crcGen.update(14);"
- }
- }
- Transition tr6: state1 -> state2 {
- triggers {
- <pongSimple: PingPongPort>
- }
- action {
- "crcGen.update(15);"
- }
- }
- Transition tr7: state2 -> cp cp1 {
- triggers {
- <pongSimple: PingPongPort>
- }
- action {
- "crcGen.update(16);"
- "System.out.printf(\"CRC: %d \\n\", crcGen.getCrc());"
- }
- }
- Transition tr8: cp cp1 -> TestFalse {
- action {
- "RTServices.getInstance().getSubSystem().testFinished(1);"
- }
- }
- Transition tr9: cp cp1 -> TestOk {
- cond {
- "(p==28) && (crcGen.getCrc()==1187)"
- }
- action {
- "RTServices.getInstance().getSubSystem().testFinished(0);"
- }
- }
- ChoicePoint cp0
- ChoicePoint cp1
- TransitionPoint tp0
- State waitForPong
- State state0
- State state1
- State state2
- State TestFalse
- State TestOk
- }
- }
- }
-
- ProtocolClass PingPongProtocol {
- incoming {
- Message ping(p: PingPongData)
- Message pingSimple(p: int32)
- }
- outgoing {
- Message pong(p: PingPongData)
- Message pongSimple(p: int32)
- }
- }
-
- DataClass PingPongData {
- Attribute i8Val: int8 = "34"
- Attribute i16Val: int16 = "24"
- Attribute i32Val: int32 = "12"
- Attribute charVal: char = "'c'"
- Attribute f32Val: float32 = "4711.0815f"
- Attribute f64Val: float64 = "47114711.08150815"
- Attribute stringVal: string = "\"Du alter Depp !\""
- Attribute arrayFromInt32 [ 5 ]: int32 = "{1,2,3,4,5}"
- Attribute ownType: PingPongDataDeep
- }
-
- DataClass PingPongDataDeep {
- Attribute i8Val: int8
- Attribute i16Val: int16
- Attribute i32Val: int32
- Attribute charVal: char
- Attribute f32Val: float32
- Attribute f64Val: float64
- Attribute stringVal: string
- Attribute arrayFromInt32 [ 10 ]: int32
- }
-
+RoomModel org.eclipse.etrice.integration.SendingDataByValueTest {
+
+ import room.basic.types.java.* from "../../../runtime/org.eclipse.etrice.modellib/models/JavaTypes.room"
+
+ LogicalSystem LogSys_SendingData {
+ SubSystemRef application: SubSys_SendingData
+ }
+
+ SubSystemClass SubSys_SendingData {
+ ActorRef top: SendingDataTop
+ }
+
+ ActorClass SendingDataTop {
+ Structure {
+ ActorRef mrPing: MrPing
+ ActorRef mrPong: MrPong
+ Binding mrPing.PingPongPort and mrPong.PingPongPort
+ }
+ Behavior { }
+ }
+
+ ActorClass MrPong {
+ Interface {
+ Port PingPongPort: PingPongProtocol
+ }
+ Structure {
+ external Port PingPongPort
+ }
+ Behavior {
+ Operation printData(d: PingPongData): void {
+ "System.out.printf(\"\\n\");"
+ "System.out.printf(\"i8Val: %d \\n\",d.getI8Val());"
+ "System.out.printf(\"i16Val: %d \\n\",d.getI16Val());"
+ "System.out.printf(\"i32Val: %d \\n\",d.getI32Val());"
+ "System.out.printf(\"charVal: %c \\n\",d.getCharVal());"
+ "System.out.printf(\"f32Val: %f \\n\",d.getF32Val());"
+ "System.out.printf(\"f64Val: %f \\n\",d.getF64Val());"
+ "System.out.printf(\"stringVal: %s \\n\",d.getStringVal());"
+ "System.out.printf(\"i32Array: %d %d %d %d %d\\n\",d.getArrayFromInt32()[0],d.getArrayFromInt32()[1],d.getArrayFromInt32()[2],d.getArrayFromInt32()[3],d.getArrayFromInt32()[4] );"
+ "System.out.printf(\"\\n\");"
+ }
+ StateMachine {
+ Transition tr0: reply -> reply {
+ triggers {
+ <ping: PingPongPort>
+ }
+ action {
+ "p.setI8Val((byte)(p.getI8Val()+1));"
+ ""
+ ""
+ "PingPongPort.pong(p);"
+ }
+ }
+ Transition tr1: reply -> reply {
+ triggers {
+ <pingSimple: PingPongPort>
+ }
+ action {
+ "PingPongPort.pongSimple(++p);"
+ }
+ }
+ Transition init: initial -> reply { }
+ State reply
+ }
+ }
+ }
+
+ ActorClass MrPing {
+ Interface {
+ conjugated Port PingPongPort: PingPongProtocol
+ }
+ Structure {
+ usercode1{
+ "import org.eclipse.etrice.integration.tests.helpers.*;"
+ "import org.eclipse.etrice.runtime.java.messaging.RTServices;"
+ }
+ usercode2 {
+ "private CRC16Generator crcGen = new CRC16Generator();"
+ }
+ external Port PingPongPort
+ Attribute i32Array [10]: int32
+ Attribute data : PingPongData
+ }
+ Behavior {
+ Operation printData(d: PingPongData): void {
+ "System.out.printf(\"MrPing:\\n\");"
+ "System.out.printf(\"i8Val: %d \\n\",d.getI8Val());"
+ "System.out.printf(\"i16Val: %d \\n\",d.getI16Val());"
+ "System.out.printf(\"i32Val: %d \\n\",d.getI32Val());"
+ "System.out.printf(\"charVal: %c \\n\",d.getCharVal());"
+ "System.out.printf(\"f32Val: %f \\n\",d.getF32Val());"
+ "System.out.printf(\"f64Val: %f \\n\",d.getF64Val());"
+ "System.out.printf(\"stringVal: %s \\n\",d.getStringVal());"
+ "System.out.printf(\"i32Array: %d %d %d %d %d\\n\",d.getArrayFromInt32()[0],d.getArrayFromInt32()[1],d.getArrayFromInt32()[2],d.getArrayFromInt32()[3],d.getArrayFromInt32()[4] );"
+ "System.out.printf(\"\\n\");"
+ }
+ StateMachine {
+ Transition init: initial -> waitForPong {
+ action {
+ "int i;"
+ "int[] intArray;"
+ "this.data=new PingPongData();"
+ ""
+ "// send default data"
+ "PingPongData d = new PingPongData();"
+ "PingPongPort.ping(d);"
+ ""
+ "d.setI8Val((byte) 45);"
+ "d.setI16Val((short) 34);"
+ "d.setI32Val(2);"
+ "d.setF32Val((float)3.14);"
+ "d.setF64Val(7.12345);"
+ "d.setStringVal(\"Hase !\");"
+ ""
+ "d.getOwnType().setI8Val((byte)10);"
+ "d.getOwnType().setI16Val((short)17);"
+ "d.getOwnType().setI32Val(4711);"
+ "d.getOwnType().setF32Val((float)3.0815);"
+ "d.getOwnType().setF64Val(123.45678);"
+ "d.getOwnType().setStringVal(\"Deep Hase !\");"
+ "intArray = d.getOwnType().getArrayFromInt32();"
+ "for (i=0;i<intArray.length;i++) {intArray[i] = 10+i;}"
+ "d.getOwnType().setArrayFromInt32(intArray);"
+ ""
+ "PingPongPort.ping(d);"
+ ""
+ "d.setI8Val((byte) 55);"
+ "d.setI16Val((short) 44);"
+ "d.setI32Val(3);"
+ "d.setF32Val((float)24.4563458);"
+ "d.setF64Val(2347.2342312345);"
+ "d.setStringVal(\"Mein Hase !\");"
+ ""
+ "d.getOwnType().setI8Val((byte)15);"
+ "d.getOwnType().setI16Val((short)23);"
+ "d.getOwnType().setI32Val(4812);"
+ "d.getOwnType().setF32Val((float)2453.30815);"
+ "d.getOwnType().setF64Val(125332.42342);"
+ "d.getOwnType().setStringVal(\"Mein Deep Hase !\");"
+ "intArray = d.getOwnType().getArrayFromInt32();"
+ "for (i=0;i<intArray.length;i++) {intArray[i] = 30+i;}"
+ "d.getOwnType().setArrayFromInt32(intArray);"
+ ""
+ "PingPongPort.ping(d);"
+ "PingPongPort.ping(data);"
+ ""
+ "data.setI8Val((byte) 67);"
+ "data.setI16Val((short) 97);"
+ "data.setI32Val(70);"
+ "data.setF32Val((float)233.14);"
+ "data.setF64Val(723434.12345);"
+ "data.setStringVal(\"Falscher Hase !\");"
+ ""
+ "crcGen.update(10);"
+ }
+ }
+ Transition tr0: my tp0 -> my tp0 {
+ triggers {
+ <pong: PingPongPort>
+ }
+ action {
+ "System.out.printf(\"Top Level : \\n\");"
+ "printData(p);"
+ "crcGen.update(20);"
+ }
+ }
+ Transition tr1: my tp0 -> my tp0 {
+ triggers {
+ <pongSimple: PingPongPort>
+ }
+ action {
+ "System.out.printf(\"Top Level Simple: \\n\");"
+ "crcGen.update(35);"
+ }
+ }
+ Transition tr10: waitForPong -> cp cp0 {
+ triggers {
+ <pong: PingPongPort>
+ }
+ action {
+ "printData(p);"
+ "crcGen.update(11);"
+ }
+ }
+ Transition tr4: cp cp0 -> waitForPong {
+ action {
+ "crcGen.update(12);"
+ }
+ }
+ Transition tr3: cp cp0 -> state0 {
+ 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);"
+ }
+ }
+ Transition tr5: state0 -> state1 {
+ triggers {
+ <pong: PingPongPort guard {
+ "p.getI32Val()==3"
+ }>
+ }
+ action {
+ "printData(p);"
+ "PingPongPort.pingSimple(12);"
+ "PingPongPort.pingSimple(27);"
+ "crcGen.update(14);"
+ }
+ }
+ Transition tr6: state1 -> state2 {
+ triggers {
+ <pongSimple: PingPongPort>
+ }
+ action {
+ "crcGen.update(15);"
+ }
+ }
+ Transition tr7: state2 -> cp cp1 {
+ triggers {
+ <pongSimple: PingPongPort>
+ }
+ action {
+ "crcGen.update(16);"
+ "System.out.printf(\"CRC: %d \\n\", crcGen.getCrc());"
+ }
+ }
+ Transition tr8: cp cp1 -> TestFalse {
+ action {
+ "RTServices.getInstance().getSubSystem().testFinished(1);"
+ }
+ }
+ Transition tr9: cp cp1 -> TestOk {
+ cond {
+ "(p==28) && (crcGen.getCrc()==1187)"
+ }
+ action {
+ "RTServices.getInstance().getSubSystem().testFinished(0);"
+ }
+ }
+ ChoicePoint cp0
+ ChoicePoint cp1
+ TransitionPoint tp0
+ State waitForPong
+ State state0
+ State state1
+ State state2
+ State TestFalse
+ State TestOk
+ }
+ }
+ }
+
+ ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(p: PingPongData)
+ Message pingSimple(p: int32)
+ }
+ outgoing {
+ Message pong(p: PingPongData)
+ Message pongSimple(p: int32)
+ }
+ }
+
+ DataClass PingPongData {
+ Attribute i8Val: int8 = "34"
+ Attribute i16Val: int16 = "24"
+ Attribute i32Val: int32 = "12"
+ Attribute charVal: char = "'c'"
+ Attribute f32Val: float32 = "4711.0815f"
+ Attribute f64Val: float64 = "47114711.08150815"
+ Attribute stringVal: string = "\"Du alter Depp !\""
+ Attribute arrayFromInt32 [5]: int32 = "{1,2,3,4,5}"
+ Attribute ownType: PingPongDataDeep
+ }
+
+ DataClass PingPongDataDeep {
+ Attribute i8Val: int8
+ Attribute i16Val: int16
+ Attribute i32Val: int32
+ Attribute charVal: char
+ Attribute f32Val: float32
+ Attribute f64Val: float64
+ Attribute stringVal: string
+ Attribute arrayFromInt32 [10]: int32
+ }
+
} \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.tests.room b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.tests.room
index f48a02d5f..9b2367851 100644
--- a/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.tests.room
+++ b/tests/org.eclipse.etrice.integration.tests/model/org.eclipse.etrice.integration.tests.room
@@ -1,6 +1,7 @@
RoomModel org.eclipse.etrice.integration.tests {
import room.basic.service.timing.* from "../../../runtime/org.eclipse.etrice.modellib/models/TimingService.room"
+ import room.basic.types.java.* from "../../../runtime/org.eclipse.etrice.modellib/models/JavaTypes.room"
LogicalSystem SystemHFSMTest {
SubSystemRef subsystem : SubSystemHFSMTest
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/CPUser.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/CPUser.java
index 53e8abd96..13a4657ba 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/CPUser.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/CPUser.java
@@ -32,7 +32,7 @@ public class CPUser extends ActorClassBase {
protected static final int IFITEM_TestPort1 = 1;
//--------------------- attributes
- protected int counter;
+ protected int counter = 0;
//--------------------- operations
//--------------------- construction
@@ -41,6 +41,7 @@ public class CPUser extends ActorClassBase {
setClassName("CPUser");
// initialize attributes
+ counter = 0;
// own ports
TestPort1 = new TestProtocolPort(this, "TestPort1", IFITEM_TestPort1, 0, port_addr[IFITEM_TestPort1][0], peer_addr[IFITEM_TestPort1][0]);
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/TestProtocol.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/TestProtocol.java
index fa1a6feb6..fcc06b742 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/TestProtocol.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/ChoicePointTest/TestProtocol.java
@@ -144,8 +144,8 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg1]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg1));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg1));
+ }
public void msg2 ()
{
if (messageStrings[ IN_msg2] != "timerTick"){
@@ -153,8 +153,8 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg2]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg2));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg2));
+ }
public void msg3 ()
{
if (messageStrings[ IN_msg3] != "timerTick"){
@@ -162,8 +162,8 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg3]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg3));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg3));
+ }
public void msg4 ()
{
if (messageStrings[ IN_msg4] != "timerTick"){
@@ -171,8 +171,8 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg4]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg4));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg4));
+ }
public void msg5 ()
{
if (messageStrings[ IN_msg5] != "timerTick"){
@@ -180,8 +180,8 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg5]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg5));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg5));
+ }
}
// replicated port class
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/HandlerUser.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/HandlerUser.java
index 0c9c5b32a..1d78210d8 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/HandlerUser.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/HandlerUser.java
@@ -32,7 +32,7 @@ public class HandlerUser extends ActorClassBase {
protected static final int IFITEM_TestPort1 = 1;
//--------------------- attributes
- protected int counter;
+ protected int counter = 0;
//--------------------- operations
//--------------------- construction
@@ -41,6 +41,7 @@ public class HandlerUser extends ActorClassBase {
setClassName("HandlerUser");
// initialize attributes
+ counter = 0;
// own ports
TestPort1 = new TestProtocolPort(this, "TestPort1", IFITEM_TestPort1, 0, port_addr[IFITEM_TestPort1][0], peer_addr[IFITEM_TestPort1][0]);
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/TestProtocol.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/TestProtocol.java
index 022f574a2..dd3c27618 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/TestProtocol.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/HandlerTest/TestProtocol.java
@@ -145,7 +145,7 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg1]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_msg1, p1));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_msg1, p1));
}
public void msg2 (int p1)
{
@@ -154,7 +154,7 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg2]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_msg2, p1));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_msg2, p1));
}
public void msg3 ()
{
@@ -163,8 +163,8 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg3]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg3));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg3));
+ }
public void msg4 ()
{
if (messageStrings[ IN_msg4] != "timerTick"){
@@ -172,8 +172,8 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg4]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg4));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg4));
+ }
public void msg5 (int p1)
{
if (messageStrings[ IN_msg5] != "timerTick"){
@@ -181,7 +181,7 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg5]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_msg5, p1));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_msg5, p1));
}
public void msg6 (int p1)
{
@@ -190,7 +190,7 @@ public class TestProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg6]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_msg6, p1));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_msg6, p1));
}
}
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/MrPingActor.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/MrPingActor.java
index 72149f301..5d6daf09a 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/MrPingActor.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/MrPingActor.java
@@ -36,8 +36,8 @@ public class MrPingActor extends ActorClassBase {
protected static final int IFITEM_timer = 4;
//--------------------- attributes
- protected int count;
- protected int pongCount;
+ protected int count = 0;
+ protected int pongCount = 0;
//--------------------- operations
//--------------------- construction
@@ -46,6 +46,8 @@ public class MrPingActor extends ActorClassBase {
setClassName("MrPingActor");
// initialize attributes
+ count = 0;
+ pongCount = 0;
// own ports
PingPongPort = new PingPongProtocolConjPort(this, "PingPongPort", IFITEM_PingPongPort, 0, port_addr[IFITEM_PingPongPort][0], peer_addr[IFITEM_PingPongPort][0]);
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/PingPongProtocol.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/PingPongProtocol.java
index 13ecb06a1..5c32c34bf 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/PingPongProtocol.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTest/PingPongProtocol.java
@@ -75,8 +75,8 @@ public class PingPongProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_pong]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_pong));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_pong));
+ }
}
// replicated port class
@@ -157,8 +157,8 @@ public class PingPongProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_ping]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_ping));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_ping));
+ }
}
// replicated port class
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/MrPingActor.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/MrPingActor.java
index 17f6d3087..1b3d3090c 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/MrPingActor.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/MrPingActor.java
@@ -32,8 +32,8 @@ public class MrPingActor extends ActorClassBase {
protected static final int IFITEM_timer = 2;
//--------------------- attributes
- protected int count;
- protected int pongCount;
+ protected int count = 0;
+ protected int pongCount = 0;
//--------------------- operations
//--------------------- construction
@@ -42,6 +42,8 @@ public class MrPingActor extends ActorClassBase {
setClassName("MrPingActor");
// initialize attributes
+ count = 0;
+ pongCount = 0;
// own ports
PingPongPort = new PingPongProtocolConjPortRepl(this, "PingPongPort", IFITEM_PingPongPort, port_addr[IFITEM_PingPongPort], peer_addr[IFITEM_PingPongPort]);
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/PingPongProtocol.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/PingPongProtocol.java
index 4bddf6be7..5da063a7d 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/PingPongProtocol.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/PingPongThreadTestReplPort/PingPongProtocol.java
@@ -75,8 +75,8 @@ public class PingPongProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_pong]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_pong));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_pong));
+ }
}
// replicated port class
@@ -157,8 +157,8 @@ public class PingPongProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_ping]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_ping));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_ping));
+ }
}
// replicated port class
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPing.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPing.java
index 0ca3dbe95..2a57ae280 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPing.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPing.java
@@ -32,10 +32,10 @@ public class MrPing extends ActorClassBase {
protected static final int IFITEM_PingPongPort = 1;
//--------------------- attributes
- protected int[] i32Array =new int[10];
- protected PingPongData data;
+ protected int[] i32Array = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ protected PingPongData data = new PingPongData();
//--------------------- operations
- public void printData (PingPongData d){
+ public void printData(PingPongData d) {
System.out.printf("MrPing:\n");
System.out.printf("i8Val: %d \n",d.getI8Val());
System.out.printf("i16Val: %d \n",d.getI16Val());
@@ -54,6 +54,9 @@ public class MrPing extends ActorClassBase {
setClassName("MrPing");
// initialize attributes
+ for (int i=0;i<10;i++){
+ i32Array[i] = 0;
+ }
data = new PingPongData();
// own ports
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPong.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPong.java
index f28ee10a8..eb010beb2 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPong.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/MrPong.java
@@ -26,7 +26,7 @@ public class MrPong extends ActorClassBase {
//--------------------- attributes
//--------------------- operations
- public void printData (PingPongData d){
+ public void printData(PingPongData d) {
System.out.printf("\n");
System.out.printf("i8Val: %d \n",d.getI8Val());
System.out.printf("i16Val: %d \n",d.getI16Val());
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongData.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongData.java
index e7db2e999..b6ad00ece 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongData.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongData.java
@@ -7,66 +7,77 @@ public class PingPongData {
//--------------------- attributes
- protected byte i8Val;
- protected short i16Val;
- protected int i32Val;
- protected char charVal;
- protected float f32Val;
- protected double f64Val;
- protected String stringVal;
+ protected byte i8Val = 34;
+ protected short i16Val = 24;
+ protected int i32Val = 12;
+ protected char charVal = 'c';
+ protected float f32Val = 4711.0815f;
+ protected double f64Val = 47114711.08150815;
+ protected String stringVal = "Du alter Depp !";
protected int[] arrayFromInt32 = {1,2,3,4,5};
- protected PingPongDataDeep ownType;
+ protected PingPongDataDeep ownType = new PingPongDataDeep();
+
//--------------------- attribute setters and getters
public void setI8Val (byte i8Val) {
this.i8Val = i8Val;
}
public byte getI8Val () {
return this.i8Val;
- }public void setI16Val (short i16Val) {
+ }
+ public void setI16Val (short i16Val) {
this.i16Val = i16Val;
}
public short getI16Val () {
return this.i16Val;
- }public void setI32Val (int i32Val) {
+ }
+ public void setI32Val (int i32Val) {
this.i32Val = i32Val;
}
public int getI32Val () {
return this.i32Val;
- }public void setCharVal (char charVal) {
+ }
+ public void setCharVal (char charVal) {
this.charVal = charVal;
}
public char getCharVal () {
return this.charVal;
- }public void setF32Val (float f32Val) {
+ }
+ public void setF32Val (float f32Val) {
this.f32Val = f32Val;
}
public float getF32Val () {
return this.f32Val;
- }public void setF64Val (double f64Val) {
+ }
+ public void setF64Val (double f64Val) {
this.f64Val = f64Val;
}
public double getF64Val () {
return this.f64Val;
- }public void setStringVal (String stringVal) {
+ }
+ public void setStringVal (String stringVal) {
this.stringVal = stringVal;
}
public String getStringVal () {
return this.stringVal;
- }public void setArrayFromInt32 (int[] arrayFromInt32) {
+ }
+ public void setArrayFromInt32 (int[] arrayFromInt32) {
this.arrayFromInt32 = arrayFromInt32;
}
public int[] getArrayFromInt32 () {
return this.arrayFromInt32;
- }public void setOwnType (PingPongDataDeep ownType) {
+ }
+ public void setOwnType (PingPongDataDeep ownType) {
this.ownType = ownType;
}
public PingPongDataDeep getOwnType () {
return this.ownType;
}
+
//--------------------- operations
// default constructor
public PingPongData() {
+ // initialize attributes
i8Val = 34;
i16Val = 24;
i32Val = 12;
@@ -87,7 +98,9 @@ public class PingPongData {
copy.f32Val = f32Val;
copy.f64Val = f64Val;
copy.stringVal = stringVal;
- for (int i=0;i<5;i++){copy.arrayFromInt32[i]=arrayFromInt32[i];}
+ for (int i=0;i<5;i++){
+ copy.arrayFromInt32[i] = arrayFromInt32[i];
+ }
copy.ownType = ownType.deepCopy();
return copy;
}
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongDataDeep.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongDataDeep.java
index 9d0928824..8aa8d3bb4 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongDataDeep.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongDataDeep.java
@@ -7,60 +7,80 @@ public class PingPongDataDeep {
//--------------------- attributes
- protected byte i8Val;
- protected short i16Val;
- protected int i32Val;
- protected char charVal;
- protected float f32Val;
- protected double f64Val;
- protected String stringVal;
- protected int[] arrayFromInt32 =new int[10];
+ protected byte i8Val = 0;
+ protected short i16Val = 0;
+ protected int i32Val = 0;
+ protected char charVal = 0;
+ protected float f32Val = 0;
+ protected double f64Val = 0;
+ protected String stringVal = "";
+ protected int[] arrayFromInt32 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
//--------------------- attribute setters and getters
public void setI8Val (byte i8Val) {
this.i8Val = i8Val;
}
public byte getI8Val () {
return this.i8Val;
- }public void setI16Val (short i16Val) {
+ }
+ public void setI16Val (short i16Val) {
this.i16Val = i16Val;
}
public short getI16Val () {
return this.i16Val;
- }public void setI32Val (int i32Val) {
+ }
+ public void setI32Val (int i32Val) {
this.i32Val = i32Val;
}
public int getI32Val () {
return this.i32Val;
- }public void setCharVal (char charVal) {
+ }
+ public void setCharVal (char charVal) {
this.charVal = charVal;
}
public char getCharVal () {
return this.charVal;
- }public void setF32Val (float f32Val) {
+ }
+ public void setF32Val (float f32Val) {
this.f32Val = f32Val;
}
public float getF32Val () {
return this.f32Val;
- }public void setF64Val (double f64Val) {
+ }
+ public void setF64Val (double f64Val) {
this.f64Val = f64Val;
}
public double getF64Val () {
return this.f64Val;
- }public void setStringVal (String stringVal) {
+ }
+ public void setStringVal (String stringVal) {
this.stringVal = stringVal;
}
public String getStringVal () {
return this.stringVal;
- }public void setArrayFromInt32 (int[] arrayFromInt32) {
+ }
+ public void setArrayFromInt32 (int[] arrayFromInt32) {
this.arrayFromInt32 = arrayFromInt32;
}
public int[] getArrayFromInt32 () {
return this.arrayFromInt32;
}
+
//--------------------- operations
// default constructor
public PingPongDataDeep() {
+ // initialize attributes
+ i8Val = 0;
+ i16Val = 0;
+ i32Val = 0;
+ charVal = 0;
+ f32Val = 0;
+ f64Val = 0;
+ stringVal = "";
+ for (int i=0;i<10;i++){
+ arrayFromInt32[i] = 0;
+ }
}
// deep copy
@@ -73,7 +93,9 @@ public class PingPongDataDeep {
copy.f32Val = f32Val;
copy.f64Val = f64Val;
copy.stringVal = stringVal;
- for (int i=0;i<10;i++){copy.arrayFromInt32[i]=arrayFromInt32[i];}
+ for (int i=0;i<10;i++){
+ copy.arrayFromInt32[i] = arrayFromInt32[i];
+ }
return copy;
}
};
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongProtocol.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongProtocol.java
index 9faff23b8..f00173c57 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongProtocol.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/SendingDataByValueTest/PingPongProtocol.java
@@ -77,7 +77,7 @@ public class PingPongProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_pong]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), OUT_pong, p.deepCopy()));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), OUT_pong, p.deepCopy()));
}
public void pongSimple (int p)
{
@@ -86,7 +86,7 @@ public class PingPongProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_pongSimple]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), OUT_pongSimple, p));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), OUT_pongSimple, p));
}
}
@@ -175,7 +175,7 @@ public class PingPongProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_ping]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_ping, p.deepCopy()));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_ping, p.deepCopy()));
}
public void pingSimple (int p)
{
@@ -184,7 +184,7 @@ public class PingPongProtocol {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_pingSimple]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_pingSimple, p));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_pingSimple, p));
}
}
diff --git a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/tests/p_HFSM.java b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/tests/p_HFSM.java
index 9d0b6f5ef..3a678aae2 100644
--- a/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/tests/p_HFSM.java
+++ b/tests/org.eclipse.etrice.integration.tests/src-gen/org/eclipse/etrice/integration/tests/p_HFSM.java
@@ -108,8 +108,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_init_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_init_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_init_action));
+ }
public void s1_entry ()
{
if (messageStrings[ OUT_s1_entry] != "timerTick"){
@@ -117,8 +117,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s1_entry]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s1_entry));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s1_entry));
+ }
public void s1_exit ()
{
if (messageStrings[ OUT_s1_exit] != "timerTick"){
@@ -126,8 +126,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s1_exit]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s1_exit));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s1_exit));
+ }
public void s2_entry ()
{
if (messageStrings[ OUT_s2_entry] != "timerTick"){
@@ -135,8 +135,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2_entry]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_entry));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_entry));
+ }
public void s2_exit ()
{
if (messageStrings[ OUT_s2_exit] != "timerTick"){
@@ -144,8 +144,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2_exit]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_exit));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_exit));
+ }
public void s3_entry ()
{
if (messageStrings[ OUT_s3_entry] != "timerTick"){
@@ -153,8 +153,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s3_entry]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s3_entry));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s3_entry));
+ }
public void s3_exit ()
{
if (messageStrings[ OUT_s3_exit] != "timerTick"){
@@ -162,8 +162,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s3_exit]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s3_exit));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s3_exit));
+ }
public void s4_entry ()
{
if (messageStrings[ OUT_s4_entry] != "timerTick"){
@@ -171,8 +171,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s4_entry]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s4_entry));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s4_entry));
+ }
public void s4_exit ()
{
if (messageStrings[ OUT_s4_exit] != "timerTick"){
@@ -180,8 +180,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s4_exit]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s4_exit));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s4_exit));
+ }
public void s2s1_entry ()
{
if (messageStrings[ OUT_s2s1_entry] != "timerTick"){
@@ -189,8 +189,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2s1_entry]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s1_entry));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s1_entry));
+ }
public void s2s1_exit ()
{
if (messageStrings[ OUT_s2s1_exit] != "timerTick"){
@@ -198,8 +198,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2s1_exit]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s1_exit));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s1_exit));
+ }
public void s2s2_entry ()
{
if (messageStrings[ OUT_s2s2_entry] != "timerTick"){
@@ -207,8 +207,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2s2_entry]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s2_entry));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s2_entry));
+ }
public void s2s2_exit ()
{
if (messageStrings[ OUT_s2s2_exit] != "timerTick"){
@@ -216,8 +216,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2s2_exit]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s2_exit));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s2_exit));
+ }
public void s1_m1_s2_action ()
{
if (messageStrings[ OUT_s1_m1_s2_action] != "timerTick"){
@@ -225,8 +225,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s1_m1_s2_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s1_m1_s2_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s1_m1_s2_action));
+ }
public void s2_m1_s2s1_action ()
{
if (messageStrings[ OUT_s2_m1_s2s1_action] != "timerTick"){
@@ -234,8 +234,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2_m1_s2s1_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m1_s2s1_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m1_s2s1_action));
+ }
public void s2s1_m2_s2s2_action ()
{
if (messageStrings[ OUT_s2s1_m2_s2s2_action] != "timerTick"){
@@ -243,8 +243,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2s1_m2_s2s2_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s1_m2_s2s2_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s1_m2_s2s2_action));
+ }
public void s2s2_m3_action ()
{
if (messageStrings[ OUT_s2s2_m3_action] != "timerTick"){
@@ -252,8 +252,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2s2_m3_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s2_m3_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2s2_m3_action));
+ }
public void s2_m4_s4_action ()
{
if (messageStrings[ OUT_s2_m4_s4_action] != "timerTick"){
@@ -261,8 +261,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2_m4_s4_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m4_s4_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m4_s4_action));
+ }
public void s2_m5_s2_action ()
{
if (messageStrings[ OUT_s2_m5_s2_action] != "timerTick"){
@@ -270,8 +270,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2_m5_s2_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m5_s2_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m5_s2_action));
+ }
public void s2_m6_s2_action ()
{
if (messageStrings[ OUT_s2_m6_s2_action] != "timerTick"){
@@ -279,8 +279,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2_m6_s2_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m6_s2_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m6_s2_action));
+ }
public void s2__s3_action ()
{
if (messageStrings[ OUT_s2__s3_action] != "timerTick"){
@@ -288,8 +288,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2__s3_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2__s3_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2__s3_action));
+ }
public void s2_m7_s2_action ()
{
if (messageStrings[ OUT_s2_m7_s2_action] != "timerTick"){
@@ -297,8 +297,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_s2_m7_s2_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m7_s2_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_s2_m7_s2_action));
+ }
public void top_s8_top_action ()
{
if (messageStrings[ OUT_top_s8_top_action] != "timerTick"){
@@ -306,8 +306,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_top_s8_top_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_top_s8_top_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_top_s8_top_action));
+ }
public void top_s9_top_action ()
{
if (messageStrings[ OUT_top_s9_top_action] != "timerTick"){
@@ -315,8 +315,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_top_s9_top_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_top_s9_top_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_top_s9_top_action));
+ }
public void top_reset_s2_action ()
{
if (messageStrings[ OUT_top_reset_s2_action] != "timerTick"){
@@ -324,8 +324,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_top_reset_s2_action]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_top_reset_s2_action));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_top_reset_s2_action));
+ }
}
// replicated port class
@@ -574,8 +574,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m1]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m1));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m1));
+ }
public void m2 ()
{
if (messageStrings[ IN_m2] != "timerTick"){
@@ -583,8 +583,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m2]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m2));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m2));
+ }
public void m3 ()
{
if (messageStrings[ IN_m3] != "timerTick"){
@@ -592,8 +592,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m3]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m3));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m3));
+ }
public void m4 ()
{
if (messageStrings[ IN_m4] != "timerTick"){
@@ -601,8 +601,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m4]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m4));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m4));
+ }
public void m5 ()
{
if (messageStrings[ IN_m5] != "timerTick"){
@@ -610,8 +610,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m5]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m5));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m5));
+ }
public void m6 ()
{
if (messageStrings[ IN_m6] != "timerTick"){
@@ -619,8 +619,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m6]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m6));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m6));
+ }
public void reset ()
{
if (messageStrings[ IN_reset] != "timerTick"){
@@ -628,8 +628,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_reset]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_reset));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_reset));
+ }
public void m7 ()
{
if (messageStrings[ IN_m7] != "timerTick"){
@@ -637,8 +637,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m7]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m7));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m7));
+ }
public void m8 ()
{
if (messageStrings[ IN_m8] != "timerTick"){
@@ -646,8 +646,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m8]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m8));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m8));
+ }
public void m9 ()
{
if (messageStrings[ IN_m9] != "timerTick"){
@@ -655,8 +655,8 @@ public class p_HFSM {
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_m9]);
}
if (getPeerAddress()!=null)
- getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m9));
- }
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_m9));
+ }
}
// replicated port class

Back to the top