summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2013-04-04 08:10:36 (EDT)
committer Thomas Schuetz2013-04-04 08:10:36 (EDT)
commit55713dae5563d9c09a285605cd4677a915a0b169 (patch)
treeec3674ef0bb6dc5657e0c16616f0525e7763e854
parenta028053da2837752a8260a0a7ceb1c1fe4740ebe (diff)
downloadorg.eclipse.etrice-55713dae5563d9c09a285605cd4677a915a0b169.zip
org.eclipse.etrice-55713dae5563d9c09a285605cd4677a915a0b169.tar.gz
org.eclipse.etrice-55713dae5563d9c09a285605cd4677a915a0b169.tar.bz2
[runtime.c, generator.c] bugfixes for messaging and MSC logging
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/.cproject10
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch6
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etmap9
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etphys6
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room42
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior40
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Sender.behavior66
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure2
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/Node1.c44
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1.c170
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1.h30
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1_Inst.h81
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Receiver.c52
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.c50
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.h1
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1.c158
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1.h30
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Disp.h (renamed from examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1_Disp.h)25
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Inst.h79
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Runner.c (renamed from examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c)16
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq1022
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend7
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java33
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/.gitignore2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.c1
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c5
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c12
28 files changed, 1500 insertions, 503 deletions
diff --git a/examples/org.eclipse.etrice.generator.c.reference/.cproject b/examples/org.eclipse.etrice.generator.c.reference/.cproject
index 3c63ede..f4e952e 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/.cproject
+++ b/examples/org.eclipse.etrice.generator.c.reference/.cproject
@@ -65,16 +65,6 @@
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1915798937" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
</toolChain>
</folderInfo>
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550.834203625" name="/" resourcePath="src-gen-ts">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1267442943" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug" unusedChildren="">
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.989031536" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2128193487"/>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.2002258166" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base.1852443642"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.936216193" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1864486752"/>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.262501100" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303"/>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.2064786241" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.2141539090"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.213598096" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1915798937"/>
- </toolChain>
- </folderInfo>
<sourceEntries>
<entry excluding="src-gen-ts|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch b/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch
index f080024..7250a88 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch
+++ b/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.etrice.generator.launch.c.launchConfigurationType">
+<booleanAttribute key="Debug" value="true"/>
+<booleanAttribute key="GenDocumentation" value="false"/>
<booleanAttribute key="GenInstanceDiagram" value="false"/>
<stringAttribute key="GenModelPath" value=""/>
<booleanAttribute key="Lib" value="false"/>
+<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
-<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/cGenRef.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/cGenRef.etmap}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
+<booleanAttribute key="Verbose" value="false"/>
</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etmap b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etmap
index 5bb3183..70b2ce5 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etmap
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etmap
@@ -6,11 +6,12 @@ MappingModel cgenRef {
Mapping cGenRef.LS -> cGenRef.Sys {
SubSystemMapping sys1 -> node1 {
ThreadMapping dflt_thread -> PhysicalThread1
+ //ThreadMapping other_thread -> PhysicalThread1
ThreadMapping other_thread -> PhysicalThread2
}
- SubSystemMapping sys2 -> node2 {
- ThreadMapping dflt_thread -> PhysicalThread1
- ThreadMapping other_thread -> PhysicalThread2
- }
+// SubSystemMapping sys2 -> node2 {
+// ThreadMapping dflt_thread -> PhysicalThread1
+// ThreadMapping other_thread -> PhysicalThread2
+// }
}
} \ No newline at end of file
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etphys b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etphys
index f900efe..fbf9f42 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etphys
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.etphys
@@ -2,7 +2,7 @@ PhysicalModel cGenRef {
PhysicalSystem Sys {
NodeRef node1: PC
- NodeRef node2: PC
+// NodeRef node2: PC
}
NodeClass PC {
@@ -15,7 +15,7 @@ PhysicalModel cGenRef {
prio = 5
stacksize = 1024
msgblocksize = 64
- msgpoolsize = 256
+ msgpoolsize = 5
}
Thread PhysicalThread2 {
@@ -23,7 +23,7 @@ PhysicalModel cGenRef {
prio = 5
stacksize = 1024
msgblocksize = 64
- msgpoolsize = 256
+ msgpoolsize = 3
}
}
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 f37b6bc..cbbff79 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
@@ -3,7 +3,7 @@ RoomModel cGenRef {
LogicalSystem LS {
SubSystemRef sys1: SubSys
- SubSystemRef sys2: SubSys
+// SubSystemRef sys2: SubSys
}
SubSystemClass SubSys {
@@ -55,7 +55,15 @@ RoomModel cGenRef {
action {
"dataIn.receivedData();"
}
- }
+ }
+ Transition tr1: DataReceived -> DataReceived {
+ triggers {
+ <sendData: dataIn>
+ }
+ action {
+ "dataIn.receivedData();"
+ }
+ }
State Idle
State DataReceived
}
@@ -147,21 +155,41 @@ RoomModel cGenRef {
}
Structure {
external Port dataOut
+ Attribute counter: int32
+
}
Behavior {
StateMachine {
- Transition init: initial -> SendingData { }
- Transition tr0: SendingData -> Done {
+ Transition init: initial -> SendingData {
+ action {
+ "counter=0;"
+ }
+ }
+ Transition tr0: SendingData -> cp cp0 {
triggers {
<receivedData: dataOut>
- }
- }
+ }
+ action {
+ "counter++;"
+ }
+ }
+ Transition tr1: cp cp0 -> Done
+ Transition tr2: cp cp0 -> SendingData {
+ cond {
+ "counter<10"
+ }
+ }
+ ChoicePoint cp0
State SendingData {
entry {
"dataOut.sendData();"
}
}
- State Done
+ State Done {
+ entry {
+ "etLogger_logInfo(\"+++ Sender Done +++\");"
+ }
+ }
}
}
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior
index b7e79f1..b27df1a 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Receiver.behavior
@@ -1,5 +1,5 @@
<?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 Receiver" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@connections.0/@link //@connections.1/@link" verticalGridUnit="0">
+<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 Receiver" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link" verticalGridUnit="0" version="0.9.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:Receiver"/>
@@ -14,7 +14,7 @@
<businessObjects href="../cGenRef.room#StateGraph:Receiver$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="/"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" 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"/>
@@ -26,7 +26,7 @@
</link>
<anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" 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"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" 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">
@@ -53,11 +53,11 @@
</graphicsAlgorithmChildren>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#BaseState:Receiver$Idle"/>
+ <businessObjects href="../cGenRef.room#SimpleState:Receiver$Idle"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@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="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Idle"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" 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">
@@ -84,11 +84,11 @@
</graphicsAlgorithmChildren>
</graphicsAlgorithm>
<link>
- <businessObjects href="../cGenRef.room#BaseState:Receiver$DataReceived"/>
+ <businessObjects href="../cGenRef.room#SimpleState:Receiver$DataReceived"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2" incomingConnections="//@connections.1 //@connections.2" 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="89" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="DataReceived"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="89" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="DataReceived"/>
</children>
</children>
</children>
@@ -106,7 +106,7 @@
</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"/>
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" 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/@anchors.0">
@@ -123,8 +123,28 @@
</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..."/>
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-47" y="9" font="//@fonts.0" value="tr0: &lt;sendData:dataI..."/>
</connectionDecorators>
+ <bendpoints x="449" y="170"/>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.3/@anchors.0" end="//@children.0/@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#TriggeredTransition:Receiver$tr1"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" 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" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr1: &lt;sendData:dataI..."/>
+ </connectionDecorators>
+ <bendpoints x="602" y="285"/>
+ <bendpoints x="640" y="285"/>
</connections>
<colors red="227" green="238" blue="249"/>
<colors red="255" green="255" blue="255"/>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Sender.behavior b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Sender.behavior
index 66dc227..bcc18d5 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Sender.behavior
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.Sender.behavior
@@ -1,5 +1,5 @@
<?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 Sender" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@connections.0/@link //@connections.1/@link" verticalGridUnit="0" version="0.9.0">
+<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 Sender" showGuides="true" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@connections.0/@link //@connections.1/@link //@children.0/@children.4/@link //@connections.2/@link //@connections.3/@link" verticalGridUnit="0" version="0.9.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:Sender"/>
@@ -55,17 +55,17 @@
<link>
<businessObjects href="../cGenRef.room#SimpleState:Sender$SendingData"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0 //@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="84" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="SendingData"/>
</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="502" y="80">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="236" y="297">
<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">
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="30" y="24">
<points x="-3" y="-3"/>
<points x="-3" y="3"/>
<points x="-11" y="3"/>
@@ -86,11 +86,24 @@
<link>
<businessObjects href="../cGenRef.room#SimpleState:Sender$Done"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.2"/>
<children visible="true">
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Done"/>
</children>
</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="50" height="50" x="271" y="205">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="25" height="25" x="12" y="12"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#ChoicePoint:Sender$cp0"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2 //@connections.3" incomingConnections="//@connections.1"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="50" height="25" y="12" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="C"/>
+ </children>
+ </children>
</children>
<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"/>
@@ -99,7 +112,7 @@
<businessObjects href="../cGenRef.room#InitialTransition:Sender$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">
+ <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"/>
@@ -109,22 +122,57 @@
<graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" 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/@anchors.0">
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@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#TriggeredTransition:Sender$tr0"/>
</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">
+ <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" filled="false" transparency="0.0" x="-76" y="-21" font="//@fonts.0" value="tr0: &lt;receivedData:d..."/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@anchors.0" end="//@children.0/@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:Sender$tr1"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" 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" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr1: [else]"/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@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#CPBranchTransition:Sender$tr2"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" 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" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr0: &lt;receivedData:d..."/>
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr2: [counter&lt;10]"/>
</connectionDecorators>
+ <bendpoints x="408" y="217"/>
</connections>
<colors red="227" green="238" blue="249"/>
<colors red="255" green="255" blue="255"/>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure
index 27bbaaa..4946537 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure
@@ -1,5 +1,5 @@
<?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.structure" name="Structure of SubSys" showGuides="true" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.0/@children.1/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@connections.0/@link" verticalGridUnit="0" version="0.9.1">
+<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.structure" name="Structure of SubSys" showGuides="true" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.0/@children.1/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@connections.0/@link" verticalGridUnit="0" version="0.9.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#SubSystemClass:SubSys"/>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/Node1.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/Node1.c
index 098b842..9d13e22 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/Node1.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/Node1.c
@@ -8,8 +8,8 @@
#include "Node1.h"
/* include instances for all classes */
-#include "Node1_Inst.h"
-#include "Node1_Disp.h"
+#include "node1_sys1_Inst.h"
+#include "node1_sys1_Disp.h"
#include "debugging/etLogger.h"
#include "debugging/etMSCLogger.h"
@@ -26,11 +26,11 @@ typedef struct Node1 {
static Node1 Node1Inst = {"Node1",0};
-void Node1_initActorInstances(void);
-void Node1_constructActorInstances(void);
+void node1_sys1_initActorInstances(void);
+void node1_sys1_constructActorInstances(void);
-void Node1_initMessageServices(void){
+void node1_sys1_initMessageServices(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "initMessageServices")
/* filling all message service threads with data */
@@ -58,7 +58,7 @@ void Node1_initMessageServices(void){
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_startMessageServices(void){
+void node1_sys1_startMessageServices(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "startMessageServices")
etMessageService_start(&msgService_PhysicalThread1);
@@ -67,7 +67,7 @@ void Node1_startMessageServices(void){
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_stopMessageServices(void){
+void node1_sys1_stopMessageServices(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "stopMessageServices")
etMessageService_stop(&msgService_PhysicalThread1);
@@ -76,7 +76,7 @@ void Node1_stopMessageServices(void){
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_destroyMessageServices(void){
+void node1_sys1_destroyMessageServices(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "destroyMessageServices")
etMessageService_destroy(&msgService_PhysicalThread1);
@@ -85,29 +85,29 @@ void Node1_destroyMessageServices(void){
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_init(void){
+void node1_sys1_init(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "init")
etLogger_logInfoF("%s_init", Node1Inst.name);
/* construct all actors */
- Node1_constructActorInstances();
+ node1_sys1_constructActorInstances();
- Node1_initMessageServices();
+ node1_sys1_initMessageServices();
/* init all actors */
- Node1_initActorInstances();
+ node1_sys1_initActorInstances();
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_start(void){
+void node1_sys1_start(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "start")
etLogger_logInfoF("%s_start", Node1Inst.name);
- Node1_startMessageServices();
+ node1_sys1_startMessageServices();
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_run(void){
+void node1_sys1_run(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "run")
etThread_sleep(1000);
@@ -134,21 +134,21 @@ void Node1_run(void){
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_stop(void){
+void node1_sys1_stop(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "stop")
etLogger_logInfoF("%s_stop", Node1Inst.name);
- Node1_stopMessageServices();
+ node1_sys1_stopMessageServices();
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_destroy(void){
+void node1_sys1_destroy(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "destroy")
etLogger_logInfoF("%s_destroy", Node1Inst.name);
- Node1_destroyMessageServices();
+ node1_sys1_destroyMessageServices();
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_shutdown(void){
+void node1_sys1_shutdown(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "shutdown")
etLogger_logInfoF("%s_shutdown", Node1Inst.name);
Node1Inst.shutdownRequest = 1;
@@ -156,12 +156,12 @@ void Node1_shutdown(void){
}
-void Node1_constructActorInstances(void){
+void node1_sys1_constructActorInstances(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "constructActorInstances")
ET_MSC_LOGGER_SYNC_EXIT
}
-void Node1_initActorInstances(void){
+void node1_sys1_initActorInstances(void){
ET_MSC_LOGGER_SYNC_ENTRY("Node1", "initActorInstances")
Sender_init(&_SubSys_Sender);
Receiver_init(&_SubSys_Receiver);
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1.c
deleted file mode 100644
index 3e1e7e1..0000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Source File of SubSystemClass SubSys
- *
- */
-
-#include "Node1.h"
-
-/* include instances for all classes */
-#include "Node1_Inst.h"
-#include "Node1_Disp.h"
-
-#include "debugging/etLogger.h"
-#include "debugging/etMSCLogger.h"
-
-#include "platform/etTimer.h"
-#include "etRuntimeConfig.h"
-#include "messaging/etMessageService.h"
-
-/* data for SubSysten SubSys */
-typedef struct Node1 {
- char *name;
- volatile int shutdownRequest;
-} Node1;
-
-static Node1 Node1Inst = {"Node1",0};
-
-void Node1_initActorInstances(void);
-void Node1_constructActorInstances(void);
-
-
-void Node1_initMessageServices(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "initMessageServices")
-
- /* filling all message service threads with data */
- /*PhysicalThread1*/
- // TODO: gen
- msgService_PhysicalThread1.thread.stacksize = 1024;
- msgService_PhysicalThread1.thread.priority = 0;
- msgService_PhysicalThread1.thread.threadName = "PhysicalThread1";
- msgService_PhysicalThread1.thread.threadFunction = (etThreadFunction) etMessageService_execute;
- msgService_PhysicalThread1.thread.threadFunctionData = &msgService_PhysicalThread1;
-
-
- /*PhysicalThread2*/
- // TODO: gen
- msgService_PhysicalThread2.thread.stacksize = 1024;
- msgService_PhysicalThread2.thread.priority = 0;
- msgService_PhysicalThread2.thread.threadName = "PhysicalThread2";
- msgService_PhysicalThread2.thread.threadFunction = (etThreadFunction) etMessageService_execute;
- msgService_PhysicalThread2.thread.threadFunctionData = &msgService_PhysicalThread2;
-
- /* initialization of all message services */
- etMessageService_init(&msgService_PhysicalThread1, msgBuffer_PhysicalThread1, MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE, MsgDispatcher_PhysicalThread1_receiveMessage);
- etMessageService_init(&msgService_PhysicalThread2, msgBuffer_PhysicalThread2, MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE, MsgDispatcher_PhysicalThread2_receiveMessage);
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_startMessageServices(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "startMessageServices")
-
- etMessageService_start(&msgService_PhysicalThread1);
- etMessageService_start(&msgService_PhysicalThread2);
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_stopMessageServices(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "stopMessageServices")
-
- etMessageService_stop(&msgService_PhysicalThread1);
- etMessageService_stop(&msgService_PhysicalThread2);
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_destroyMessageServices(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "destroyMessageServices")
-
- etMessageService_destroy(&msgService_PhysicalThread1);
- etMessageService_destroy(&msgService_PhysicalThread2);
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_init(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "init")
- etLogger_logInfoF("%s_init", Node1Inst.name);
-
- /* construct all actors */
- Node1_constructActorInstances();
-
- Node1_initMessageServices();
-
- /* init all actors */
- Node1_initActorInstances();
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_start(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "start")
- etLogger_logInfoF("%s_start", Node1Inst.name);
- Node1_startMessageServices();
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_run(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "run")
-
- etThread_sleep(1000);
-
-// #ifdef ET_RUNTIME_ENDLESS
-// while(!(Node1Inst.shutdownRequest)){
-// if (etTimer_executeNeeded()){
-// etMessageService_execute(&msgService_PhysicalThread1);
-// }
-// }
-// #else
-// uint32 loopCounter = 0;
-// while(!(Node1Inst.shutdownRequest)){
-// if (etTimer_executeNeeded()){
-// etMessageService_execute(&msgService_PhysicalThread1);
-// etLogger_logInfo("Execute");
-// if (loopCounter++ > ET_RUNTIME_MAXLOOP){
-// break;
-// }
-// }
-// }
-// #endif
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_stop(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "stop")
- etLogger_logInfoF("%s_stop", Node1Inst.name);
- Node1_stopMessageServices();
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_destroy(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "destroy")
- etLogger_logInfoF("%s_destroy", Node1Inst.name);
- Node1_destroyMessageServices();
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_shutdown(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "shutdown")
- etLogger_logInfoF("%s_shutdown", Node1Inst.name);
- Node1Inst.shutdownRequest = 1;
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void Node1_constructActorInstances(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "constructActorInstances")
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void Node1_initActorInstances(void){
- ET_MSC_LOGGER_SYNC_ENTRY("Node1", "initActorInstances")
- Sender_init(&_SubSys_Sender);
- Receiver_init(&_SubSys_Receiver);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1.h
deleted file mode 100644
index 7fce4d2..0000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Header File of SubSystemClass SubSys
- *
- */
-
-#ifndef _NODE1_H_
-#define _NODE1_H_
-
-
-
-/* lifecycle functions
- * init -> start -> run (loop) -> stop -> destroy
- */
-
-void Node1_init(void); /* lifecycle init */
-void Node1_start(void); /* lifecycle start */
-
-void Node1_run(void); /* lifecycle run */
-
-void Node1_stop(void); /* lifecycle stop */
-void Node1_destroy(void); /* lifecycle destroy */
-
-void Node1_shutdown(void); /* shutdown the dispatcher loop */
-
-
-#endif /* _NODE1_H_ */
-
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1_Inst.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1_Inst.h
deleted file mode 100644
index 75c0d0c..0000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1_Inst.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * @author generated by eTrice
- *
- * Instance File of SubSystemClass SubSys
- * - instantiation of all actor instances and port instances
- * - configuration of data and connection of ports
- */
-
-#include "platform/etMemory.h"
-
-/* include all used ActorClasses */
-#include "Receiver.h"
-#include "Sender.h"
-
-/* include all used ProtcolClasses */
-#include "CommunicationProtocol.h"
-
-
-/* instantiation of message services */
-/* PhysicalThread1 */
-// TODO: generate sizes
-static uint8 msgBuffer_PhysicalThread1[MESSAGE_POOL_MAX*MESSAGE_BLOCK_SIZE];
-static etMessageService msgService_PhysicalThread1;
-
-/* PhysicalThread2 */
-static uint8 msgBuffer_PhysicalThread2[MESSAGE_POOL_MAX*MESSAGE_BLOCK_SIZE];
-static etMessageService msgService_PhysicalThread2;
-
-/* declarations of all ActorClass instances (const and variable structs) */
-
-/* forward declaration of variable actor structs */
-static Sender _SubSys_Sender;
-static Receiver _SubSys_Receiver;
-
-/* forward declaration of variable port structs */
-
-
-/* instance _SubSys_Sender */
-static const Sender_const _SubSys_Sender_const = {
- /* Ports: {varData, msgService, peerAddress, localId} */
- {0,&msgService_PhysicalThread2, 104, 1} /* Port dataOut */
-
- /* data receive ports */
-};
-static Sender _SubSys_Sender = {
- &_SubSys_Sender_const,
-
- /* data send ports */
-
- /* attributes */
-
- /* state and history are initialized in init fuction */
-};
-
-/* instance _SubSys_Receiver */
-static const Receiver_const _SubSys_Receiver_const = {
- /* Ports: {varData, msgService, peerAddress, localId} */
- {0,&msgService_PhysicalThread1, 102, 1} /* Port dataIn */
-
- /* data receive ports */
-};
-static Receiver _SubSys_Receiver = {
- &_SubSys_Receiver_const,
-
- /* data send ports */
-
- /* attributes */
- {
- 0,
- {
- 0,
- 0,
- 0
- },
- 0
- }
- , /* attr1 */
-
- /* state and history are initialized in init fuction */
-};
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Receiver.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Receiver.c
index 02fc5f2..df15b3c 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Receiver.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Receiver.c
@@ -21,7 +21,6 @@ enum interface_items {
IFITEM_dataIn = 1
};
-
/* state IDs */
enum state_ids {
NO_STATE = 0,
@@ -30,14 +29,11 @@ enum state_ids {
STATE_DataReceived = 3
};
-static char* state_names[] = {
- "NO_STATE", "TOP", "Idle", "DataReceived"
-};
-
/* transition chains */
enum chain_ids {
CHAIN_TRANS_INITIAL_TO__Idle = 1,
- CHAIN_TRANS_tr0_FROM_Idle_TO_DataReceived_BY_sendDatadataIn = 2
+ CHAIN_TRANS_tr0_FROM_Idle_TO_DataReceived_BY_sendDatadataIn = 2,
+ CHAIN_TRANS_tr1_FROM_DataReceived_TO_DataReceived_BY_sendDatadataIn_tr1 = 3
};
/* triggers */
@@ -48,15 +44,20 @@ enum triggers {
static void setState(Receiver* self, int new_state) {
- etLogger_logInfoF("Receiver: setState: new state=%d", new_state);
- ET_MSC_LOGGER_CHANGE_STATE("Receiver", state_names[new_state]);
- self->state = new_state;
+ self->state = (etInt16) new_state;
+}
+
+static int getState(Receiver* self) {
+ return self->state;
}
/* Entry and Exit Codes */
/* Action Codes */
-static void action_TRANS_tr0_FROM_Idle_TO_DataReceived_BY_sendDatadataIn(Receiver* self, InterfaceItemBase *ifitem) {
+static void action_TRANS_tr0_FROM_Idle_TO_DataReceived_BY_sendDatadataIn(Receiver* self, const InterfaceItemBase* ifitem) {
+ CommunicationProtocolPort_receivedData(&self->constData->dataIn) /* ORIG: dataIn.receivedData() */;
+}
+static void action_TRANS_tr1_FROM_DataReceived_TO_DataReceived_BY_sendDatadataIn_tr1(Receiver* self, const InterfaceItemBase* ifitem) {
CommunicationProtocolPort_receivedData(&self->constData->dataIn) /* ORIG: dataIn.receivedData() */;
}
@@ -89,7 +90,7 @@ static void exitTo(Receiver* self, int current, int to, boolean handler) {
* @param generic_data - the generic data pointer
* @return the ID of the final state
*/
-static int executeTransitionChain(Receiver* self, int chain, InterfaceItemBase *ifitem, void* generic_data) {
+static int executeTransitionChain(Receiver* self, int chain, const InterfaceItemBase* ifitem, void* generic_data) {
switch (chain) {
case CHAIN_TRANS_INITIAL_TO__Idle:
{
@@ -100,6 +101,11 @@ static int executeTransitionChain(Receiver* self, int chain, InterfaceItemBase *
action_TRANS_tr0_FROM_Idle_TO_DataReceived_BY_sendDatadataIn(self, ifitem);
return STATE_DataReceived;
}
+ case CHAIN_TRANS_tr1_FROM_DataReceived_TO_DataReceived_BY_sendDatadataIn_tr1:
+ {
+ action_TRANS_tr1_FROM_DataReceived_TO_DataReceived_BY_sendDatadataIn_tr1(self, ifitem);
+ return STATE_DataReceived;
+ }
}
return NO_STATE;
}
@@ -128,7 +134,7 @@ static int enterHistory(Receiver* self, int state, boolean handler, boolean skip
//return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
}
-static void executeInitTransition(Receiver* self) {
+static void Receiver_executeInitTransition(Receiver* self) {
int chain = CHAIN_TRANS_INITIAL_TO__Idle;
int next = executeTransitionChain(self, chain, NULL, NULL);
next = enterHistory(self, next, FALSE, FALSE);
@@ -136,16 +142,15 @@ static void executeInitTransition(Receiver* self) {
}
/* receiveEvent contains the main implementation of the FSM */
-static void receiveEvent(Receiver* self, InterfaceItemBase *ifitem, int evt, void* generic_data) {
+static void Receiver_receiveEvent(Receiver* self, InterfaceItemBase* ifitem, int evt, void* generic_data) {
int trigger = ifitem->localId + EVT_SHIFT*evt;
int chain = NOT_CAUGHT;
int catching_state = NO_STATE;
boolean is_handler = FALSE;
boolean skip_entry = FALSE;
- ET_MSC_LOGGER_SYNC_ENTRY("Receiver", "receiveEvent")
if (!handleSystemEvent(ifitem, evt, generic_data)) {
- switch (self->state) {
+ switch (getState(self)) {
case STATE_Idle:
switch(trigger) {
case TRIG_dataIn__sendData:
@@ -157,16 +162,23 @@ static void receiveEvent(Receiver* self, InterfaceItemBase *ifitem, int evt, voi
}
break;
case STATE_DataReceived:
+ switch(trigger) {
+ case TRIG_dataIn__sendData:
+ {
+ chain = CHAIN_TRANS_tr1_FROM_DataReceived_TO_DataReceived_BY_sendDatadataIn_tr1;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
break;
}
}
if (chain != NOT_CAUGHT) {
- exitTo(self, self->state, catching_state, is_handler);
+ exitTo(self, getState(self), catching_state, is_handler);
int next = executeTransitionChain(self, chain, ifitem, generic_data);
next = enterHistory(self, next, is_handler, skip_entry);
setState(self, next);
}
- ET_MSC_LOGGER_SYNC_EXIT
}
//******************************************
@@ -181,15 +193,15 @@ void Receiver_init(Receiver* self){
for (i=0; i<RECEIVER_HISTORY_SIZE; ++i)
self->history[i] = NO_STATE;
}
- executeInitTransition(self);
+ Receiver_executeInitTransition(self);
ET_MSC_LOGGER_SYNC_EXIT
}
void Receiver_receiveMessage(void* self, void* ifitem, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("Receiver", "receiveMessage")
+ ET_MSC_LOGGER_SYNC_ENTRY("Receiver", "_receiveMessage")
- receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+ Receiver_receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
ET_MSC_LOGGER_SYNC_EXIT
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.c
index ac71335..b04db93 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.c
@@ -21,7 +21,6 @@ enum interface_items {
IFITEM_dataOut = 1
};
-
/* state IDs */
enum state_ids {
NO_STATE = 0,
@@ -30,14 +29,10 @@ enum state_ids {
STATE_Done = 3
};
-static char* state_names[] = {
- "NO_STATE", "TOP", "SendingData", "Done"
-};
-
/* transition chains */
enum chain_ids {
CHAIN_TRANS_INITIAL_TO__SendingData = 1,
- CHAIN_TRANS_tr0_FROM_SendingData_TO_Done_BY_receivedDatadataOut = 2
+ CHAIN_TRANS_tr0_FROM_SendingData_TO_cp0_BY_receivedDatadataOut = 2
};
/* triggers */
@@ -48,17 +43,28 @@ enum triggers {
static void setState(Sender* self, int new_state) {
- etLogger_logInfoF("Sender: setState: new state=%d", new_state);
- ET_MSC_LOGGER_CHANGE_STATE("Sender", state_names[new_state]);
- self->state = new_state;
+ self->state = (etInt16) new_state;
+}
+
+static int getState(Sender* self) {
+ return self->state;
}
/* Entry and Exit Codes */
static void entry_SendingData(Sender* self) {
CommunicationProtocolConjPort_sendData(&self->constData->dataOut) /* ORIG: dataOut.sendData() */;
}
+static void entry_Done(Sender* self) {
+ etLogger_logInfo("+++ Sender Done +++");
+}
/* Action Codes */
+static void action_TRANS_INITIAL_TO__SendingData(Sender* self) {
+ self->counter /* ORIG: counter */=0;
+}
+static void action_TRANS_tr0_FROM_SendingData_TO_cp0_BY_receivedDatadataOut(Sender* self, const InterfaceItemBase* ifitem) {
+ self->counter /* ORIG: counter */++;
+}
/**
* calls exit codes while exiting from the current state to one of its
@@ -89,15 +95,20 @@ static void exitTo(Sender* self, int current, int to, boolean handler) {
* @param generic_data - the generic data pointer
* @return the ID of the final state
*/
-static int executeTransitionChain(Sender* self, int chain, InterfaceItemBase* ifitem, void* generic_data) {
+static int executeTransitionChain(Sender* self, int chain, const InterfaceItemBase* ifitem, void* generic_data) {
switch (chain) {
case CHAIN_TRANS_INITIAL_TO__SendingData:
{
+ action_TRANS_INITIAL_TO__SendingData(self);
return STATE_SendingData;
}
- case CHAIN_TRANS_tr0_FROM_SendingData_TO_Done_BY_receivedDatadataOut:
+ case CHAIN_TRANS_tr0_FROM_SendingData_TO_cp0_BY_receivedDatadataOut:
{
- return STATE_Done;
+ action_TRANS_tr0_FROM_SendingData_TO_cp0_BY_receivedDatadataOut(self, ifitem);
+ if (self->counter /* ORIG: counter */<10) {
+ return STATE_SendingData;}
+ else {
+ return STATE_Done;}
}
}
return NO_STATE;
@@ -117,6 +128,7 @@ static int enterHistory(Sender* self, int state, boolean handler, boolean skip_e
// in leaf state: return state id
return STATE_SendingData;
case STATE_Done:
+ if (!(skip_entry || handler)) entry_Done(self);
// in leaf state: return state id
return STATE_Done;
case STATE_TOP:
@@ -128,7 +140,7 @@ static int enterHistory(Sender* self, int state, boolean handler, boolean skip_e
//return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
}
-static void executeInitTransition(Sender* self) {
+static void Sender_executeInitTransition(Sender* self) {
int chain = CHAIN_TRANS_INITIAL_TO__SendingData;
int next = executeTransitionChain(self, chain, NULL, NULL);
next = enterHistory(self, next, FALSE, FALSE);
@@ -136,7 +148,7 @@ static void executeInitTransition(Sender* self) {
}
/* receiveEvent contains the main implementation of the FSM */
-static void receiveEvent(Sender* self, InterfaceItemBase *ifitem, int evt, void* generic_data) {
+static void Sender_receiveEvent(Sender* self, InterfaceItemBase* ifitem, int evt, void* generic_data) {
int trigger = ifitem->localId + EVT_SHIFT*evt;
int chain = NOT_CAUGHT;
int catching_state = NO_STATE;
@@ -144,12 +156,12 @@ static void receiveEvent(Sender* self, InterfaceItemBase *ifitem, int evt, void*
boolean skip_entry = FALSE;
if (!handleSystemEvent(ifitem, evt, generic_data)) {
- switch (self->state) {
+ switch (getState(self)) {
case STATE_SendingData:
switch(trigger) {
case TRIG_dataOut__receivedData:
{
- chain = CHAIN_TRANS_tr0_FROM_SendingData_TO_Done_BY_receivedDatadataOut;
+ chain = CHAIN_TRANS_tr0_FROM_SendingData_TO_cp0_BY_receivedDatadataOut;
catching_state = STATE_TOP;
}
break;
@@ -160,7 +172,7 @@ static void receiveEvent(Sender* self, InterfaceItemBase *ifitem, int evt, void*
}
}
if (chain != NOT_CAUGHT) {
- exitTo(self, self->state, catching_state, is_handler);
+ exitTo(self, getState(self), catching_state, is_handler);
int next = executeTransitionChain(self, chain, ifitem, generic_data);
next = enterHistory(self, next, is_handler, skip_entry);
setState(self, next);
@@ -179,7 +191,7 @@ void Sender_init(Sender* self){
for (i=0; i<SENDER_HISTORY_SIZE; ++i)
self->history[i] = NO_STATE;
}
- executeInitTransition(self);
+ Sender_executeInitTransition(self);
ET_MSC_LOGGER_SYNC_EXIT
}
@@ -187,7 +199,7 @@ void Sender_init(Sender* self){
void Sender_receiveMessage(void* self, void* ifitem, const etMessage* msg){
ET_MSC_LOGGER_SYNC_ENTRY("Sender", "_receiveMessage")
- receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+ Sender_receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
ET_MSC_LOGGER_SYNC_EXIT
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.h
index 50b9824..9050809 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.h
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Sender.h
@@ -41,6 +41,7 @@ struct Sender {
/* data send ports */
/*--------------------- attributes ---------------------*/
+ int32 counter;
/* state machine variables */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1.c
new file mode 100644
index 0000000..53879ec
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1.c
@@ -0,0 +1,158 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of Node node1 with SubSystem sys1
+ *
+ */
+
+#include "node1_sys1.h"
+
+/* include instances for all classes */
+#include "node1_sys1_Inst.h"
+#include "node1_sys1_Disp.h"
+
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+
+#include "platform/etTimer.h"
+#include "etRuntimeConfig.h"
+
+
+/* data for Node node1 with SubSytsem sys1 */
+typedef struct node1_sys1 {
+ char *name;
+ volatile int shutdownRequest;
+} node1_sys1;
+
+static node1_sys1 node1_sys1Inst = {"node1_sys1", 0};
+
+void node1_sys1_initActorInstances(void);
+void node1_sys1_constructActorInstances(void);
+
+static void node1_sys1_initMessageServices(void) {
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "initMessageServices")
+
+ /* filling all message service threads with data */
+ msgService_PhysicalThread1.thread.stacksize = 1024;
+ msgService_PhysicalThread1.thread.priority = 5;
+ msgService_PhysicalThread1.thread.threadName = "PhysicalThread1";
+ msgService_PhysicalThread1.thread.threadFunction = (etThreadFunction) etMessageService_execute;
+ msgService_PhysicalThread1.thread.threadFunctionData = &msgService_PhysicalThread1;
+
+
+ msgService_PhysicalThread2.thread.stacksize = 1024;
+ msgService_PhysicalThread2.thread.priority = 5;
+ msgService_PhysicalThread2.thread.threadName = "PhysicalThread2";
+ msgService_PhysicalThread2.thread.threadFunction = (etThreadFunction) etMessageService_execute;
+ msgService_PhysicalThread2.thread.threadFunctionData = &msgService_PhysicalThread2;
+
+ /* initialization of all message services */
+ etMessageService_init(&msgService_PhysicalThread1, msgBuffer_PhysicalThread1, 5, 64, MsgDispatcher_PhysicalThread1_receiveMessage);
+ etMessageService_init(&msgService_PhysicalThread2, msgBuffer_PhysicalThread2, 3, 64, MsgDispatcher_PhysicalThread2_receiveMessage);
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+static void node1_sys1_startMessageServices(void) {
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "startMessageServices")
+
+ etMessageService_start(&msgService_PhysicalThread1);
+ etMessageService_start(&msgService_PhysicalThread2);
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+static void node1_sys1_stopMessageServices(void) {
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "stopMessageServices")
+
+ etMessageService_stop(&msgService_PhysicalThread1);
+ etMessageService_stop(&msgService_PhysicalThread2);
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+static void node1_sys1_destroyMessageServices(void) {
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "destroyMessageServices")
+
+ etMessageService_destroy(&msgService_PhysicalThread1);
+ etMessageService_destroy(&msgService_PhysicalThread2);
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void node1_sys1_init(void) {
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "init")
+ etLogger_logInfoF("%s_init", node1_sys1Inst.name);
+
+ /* construct all actors */
+ node1_sys1_constructActorInstances();
+
+ /* initialization of all message services */
+ node1_sys1_initMessageServices();
+
+ /* init all actors */
+ node1_sys1_initActorInstances();
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void node1_sys1_start(void) {
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "start")
+ etLogger_logInfoF("%s_start", node1_sys1Inst.name);
+ node1_sys1_startMessageServices();
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void node1_sys1_run(void) {
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "run")
+
+ etThread_sleep(1000);
+
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void node1_sys1_stop(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "stop")
+ etLogger_logInfoF("%s_stop", node1_sys1Inst.name);
+
+ node1_sys1_stopMessageServices();
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void node1_sys1_destroy(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "destroy")
+ etLogger_logInfoF("%s_destroy", node1_sys1Inst.name);
+
+ node1_sys1_destroyMessageServices();
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void node1_sys1_shutdown(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "shutdown")
+ etLogger_logInfoF("%s_shutdown", node1_sys1Inst.name);
+
+ node1_sys1Inst.shutdownRequest = 1;
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void node1_sys1_constructActorInstances(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "constructActorInstances")
+
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void node1_sys1_initActorInstances(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("node1_sys1", "initActorInstances")
+
+ Sender_init(&_LS_sys1_Sender);
+ Receiver_init(&_LS_sys1_Receiver);
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1.h
new file mode 100644
index 0000000..1cd6dd4
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1.h
@@ -0,0 +1,30 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of Node node1 with SubSystem sys1
+ *
+ */
+
+#ifndef _NODE1_SYS1_H_
+#define _NODE1_SYS1_H_
+
+
+
+/* lifecycle functions
+ * init -> start -> run (loop) -> stop -> destroy
+ */
+
+void node1_sys1_init(void); /* lifecycle init */
+void node1_sys1_start(void); /* lifecycle start */
+
+void node1_sys1_run(void); /* lifecycle run */
+
+void node1_sys1_stop(void); /* lifecycle stop */
+void node1_sys1_destroy(void); /* lifecycle destroy */
+
+void node1_sys1_shutdown(void); /* shutdown the dispatcher loop */
+
+
+#endif /* _NODE1_SYS1_H_ */
+
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1_Disp.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Disp.h
index 38c3df5..6df3a8d 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/Node1_Disp.h
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Disp.h
@@ -1,7 +1,7 @@
/**
* @author generated by eTrice
*
- * Dispatcher File of SubSystemClass SubSys
+ * Dispatcher File of Node node1 with SubSystem sys1
* - one generated dispatcher for each MessageService (Thread)
*/
@@ -13,13 +13,13 @@ static void MsgDispatcher_PhysicalThread1_receiveMessage(const etMessage* msg){
ET_MSC_LOGGER_SYNC_ENTRY("MsgDispatcher_PhysicalThread1", "receiveMessage")
switch(msg->address){
- /* interface items of /SubSys/Sender */
- case 102:
- Sender_receiveMessage((void*)&_SubSys_Sender,(etPort*)&_SubSys_Sender_const.dataOut, msg);
+ /* interface items of /LS/sys1/Receiver */
+ case 104:
+ Receiver_receiveMessage((void*)&_LS_sys1_Receiver,(etPort*)&_LS_sys1_Receiver_const.dataIn, msg);
break;
-
+
default:
- etLogger_logErrorF("MessageService_Thread1_receiveMessage: address %d does not exist ", msg->address);
+ etLogger_logErrorF("MessageService_PhysicalThread1_receiveMessage: address %d does not exist ", msg->address);
break;
}
ET_MSC_LOGGER_SYNC_EXIT
@@ -28,16 +28,15 @@ static void MsgDispatcher_PhysicalThread1_receiveMessage(const etMessage* msg){
static void MsgDispatcher_PhysicalThread2_receiveMessage(const etMessage* msg){
ET_MSC_LOGGER_SYNC_ENTRY("MsgDispatcher_PhysicalThread2", "receiveMessage")
switch(msg->address){
-
- /* interface items of /SubSys/Receiver */
- case 104:
- Receiver_receiveMessage((void*)&_SubSys_Receiver,(etPort*)&_SubSys_Receiver_const.dataIn, msg);
+
+ /* interface items of /LS/sys1/Sender */
+ case 102:
+ Sender_receiveMessage((void*)&_LS_sys1_Sender,(etPort*)&_LS_sys1_Sender_const.dataOut, msg);
break;
-
+
default:
- etLogger_logErrorF("MessageService_Thread1_receiveMessage: address %d does not exist ", msg->address);
+ etLogger_logErrorF("MessageService_PhysicalThread2_receiveMessage: address %d does not exist ", msg->address);
break;
}
ET_MSC_LOGGER_SYNC_EXIT
}
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Inst.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Inst.h
new file mode 100644
index 0000000..b966af7
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Inst.h
@@ -0,0 +1,79 @@
+/**
+ * @author generated by eTrice
+ *
+ * Instance File of Node node1 with SubSystem sys1
+ * - instantiation of all actor instances and port instances
+ * - configuration of data and connection of ports
+ */
+
+#include "messaging/etMessageService.h"
+#include "platform/etMemory.h"
+
+/* include all used ActorClasses */
+#include "Receiver.h"
+#include "Sender.h"
+
+/* include all used ProtcolClasses */
+#include "CommunicationProtocol.h"
+
+/* instantiation of message services and message buffers */
+/* PhysicalThread1 */
+static uint8 msgBuffer_PhysicalThread1[5 * 64]; /* msgBuffer_<threadname>[<msgpoolsize> * <msgblocksize>] */
+static etMessageService msgService_PhysicalThread1;
+/* PhysicalThread2 */
+static uint8 msgBuffer_PhysicalThread2[3 * 64]; /* msgBuffer_<threadname>[<msgpoolsize> * <msgblocksize>] */
+static etMessageService msgService_PhysicalThread2;
+
+/* declarations of all ActorClass instances (const and variable structs) */
+
+/* forward declaration of variable actor structs */
+static Sender _LS_sys1_Sender;
+static Receiver _LS_sys1_Receiver;
+
+/* forward declaration of variable port structs */
+
+
+/* instance _LS_sys1_Sender */
+static const Sender_const _LS_sys1_Sender_const = {
+ /* Ports: {varData, msgService, peerAddress, localId} */
+ {0, &msgService_PhysicalThread1, 104, 1} /* Port dataOut */
+
+ /* data receive ports */
+};
+static Sender _LS_sys1_Sender = {
+ &_LS_sys1_Sender_const,
+
+ /* data send ports */
+
+ /* attributes */
+ 0 /* counter */
+
+ /* state and history are initialized in init fuction */
+};
+
+/* instance _LS_sys1_Receiver */
+static const Receiver_const _LS_sys1_Receiver_const = {
+ /* Ports: {varData, msgService, peerAddress, localId} */
+ {0, &msgService_PhysicalThread2, 102, 1} /* Port dataIn */
+
+ /* data receive ports */
+};
+static Receiver _LS_sys1_Receiver = {
+ &_LS_sys1_Receiver_const,
+
+ /* data send ports */
+
+ /* attributes */
+ {
+ 0 /* Attr1 */,
+ {
+ 0 /* Attr1 */,
+ 0 /* Attr2 */,
+ 0 /* Attr3 */
+ } /* ComplexAttr */,
+ 0 /* Attr3 */
+ } /* attr1 */
+
+ /* state and history are initialized in init fuction */
+};
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Runner.c
index 12b91ea..c321f75 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/node1_sys1_Runner.c
@@ -1,12 +1,12 @@
/**
* @author generated by eTrice
*
- * this class contains the main function running component SubSys
- * it instantiates SubSys and starts and ends the lifecycle
+ * this class contains the main function running Node node1 with SubSystem sys1
+ * it instantiates Node node1 with SubSystem sys1 and starts and ends the lifecycle
*/
-#include "Node1.h"
+#include "node1_sys1.h"
#include "debugging/etLogger.h"
#include "debugging/etMSCLogger.h"
@@ -25,19 +25,19 @@ int main(void) {
ET_MSC_LOGGER_OPEN("main");
/* startup sequence of lifecycle */
- Node1_init(); /* lifecycle init */
- Node1_start(); /* lifecycle start */
+ node1_sys1_init(); /* lifecycle init */
+ node1_sys1_start(); /* lifecycle start */
etUserPreRun(); /* platform specific */
/* run Scheduler */
- Node1_run();
+ node1_sys1_run();
etUserPostRun(); /* platform specific */
/* shutdown sequence of lifecycle */
- Node1_stop(); /* lifecycle stop */
- Node1_destroy(); /* lifecycle destroy */
+ node1_sys1_stop(); /* lifecycle stop */
+ node1_sys1_destroy(); /* lifecycle destroy */
ET_MSC_LOGGER_CLOSE
etLogger_logInfo("*** T H E E N D ***");
diff --git a/examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq b/examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq
index 0fbca53..096df8f 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq
+++ b/examples/org.eclipse.etrice.generator.c.reference/tmp/msc.seq
@@ -1,8 +1,8 @@
-main ==> Node1 init
-Node1 ==> Node1 constructActorInstances
-Node1 <== Node1
-Node1 ==> Node1 initMessageServices
-Node1 ==> etMessageService init
+main ==> node1_sys1 init
+node1_sys1 ==> node1_sys1 constructActorInstances
+node1_sys1 <== node1_sys1
+node1_sys1 ==> node1_sys1 initMessageServices
+node1_sys1 ==> etMessageService init
etMessageService ==> etMessageQueue init
etMessageService <== etMessageQueue
etMessageService ==> etMessageQueue init
@@ -18,10 +18,20 @@ etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
-etMessageService ==> etMessageQueue push
+etMessageService <== etMessageService
+etMessageService ==> etMutex construct
+etMessageService <== etMutex
+etMessageService ==> etMutex construct
+etMessageService <== etMutex
+etMessageService ==> etSema construct
+etMessageService <== etSema
+node1_sys1 <== etMessageService
+node1_sys1 ==> etMessageService init
+etMessageService ==> etMessageQueue init
etMessageService <== etMessageQueue
-etMessageService ==> etMessageQueue push
+etMessageService ==> etMessageQueue init
etMessageService <== etMessageQueue
+etMessageService ==> etMessageService initMessagePool
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
etMessageService ==> etMessageQueue push
@@ -35,52 +45,423 @@ etMessageService ==> etMutex construct
etMessageService <== etMutex
etMessageService ==> etSema construct
etMessageService <== etSema
-Node1 <== etMessageService
-Node1 ==> etMessageService init
-etMessageService ==> etMessageQueue init
+node1_sys1 <== etMessageService
+node1_sys1 <== node1_sys1
+node1_sys1 ==> node1_sys1 initActorInstances
+node1_sys1 ==> Sender init
+Sender ==> CommunicationProtocolConjPort sendData
+CommunicationProtocolConjPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
etMessageService <== etMessageQueue
-etMessageService ==> etMessageQueue init
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
-etMessageService ==> etMessageService initMessagePool
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+node1_sys1 <== Sender
+node1_sys1 ==> Receiver init
+node1_sys1 <== Receiver
+node1_sys1 <== node1_sys1
+main <== node1_sys1
+main ==> node1_sys1 start
+node1_sys1 ==> node1_sys1 startMessageServices
+node1_sys1 ==> etMessageService start
+etMessageService ==> etThread construct
+etMessageService <== etThread
+node1_sys1 <== etMessageService
+node1_sys1 ==> etMessageService start
+etMessageService ==> etThread construct
+etThread ==> etThread execute
+etThread ==> etMessageService execute
+etMessageService ==> etMessageService deliverAllMessages
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService <== etThread
+etMessageService ==> etMutex leave
+node1_sys1 <== etMessageService
+node1_sys1 <== node1_sys1
+main <== node1_sys1
+main ==> node1_sys1 run
+node1_sys1 ==> etThread sleep
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
+etMutex ==> etThread execute
+etMessageService ==> etSema wakeup
+etThread ==> etMessageService execute
+etMessageService <== etSema
+etMessageService ==> etMessageService deliverAllMessages
+etMessageService ==> etMutex leave
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMutex
+etMessageService <== etMessageQueue
+etPort <== etMessageService
+etMessageService ==> etMessageService popMessage
+CommunicationProtocolPort <== etPort
+etMessageService ==> etMutex enter
+Receiver <== CommunicationProtocolPort
+etMessageService <== etMutex
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService ==> etMessageQueue pop
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex leave
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService <== etMutex
+etMessageService <== etMessageService
etMessageService ==> etMessageQueue push
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+etMessageService <== etMessageQueue
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+etMessageService ==> etMutex leave
+Sender ==> CommunicationProtocolConjPort sendData
+etMessageService <== etMutex
+CommunicationProtocolConjPort ==> etPort sendMessage
+etMessageService <== etMessageService
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService ==> etMutex enter
etMessageService <== etMessageQueue
+etMessageService <== etMutex
+etMessageService ==> etSema waitForWakeup
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMutex
+etMessageService <== etMessageQueue
+etPort <== etMessageService
+etMessageService ==> etSema waitForWakeup
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolPort <== etPort
+Receiver <== CommunicationProtocolPort
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+Sender ==> CommunicationProtocolConjPort sendData
+CommunicationProtocolConjPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etSema
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue isNotEmpty
+etPort <== etMessageService
+etMessageService <== etMessageQueue
+CommunicationProtocolPort <== etPort
+etMessageService ==> etMessageService popMessage
+Receiver <== CommunicationProtocolPort
+etMessageService ==> etMutex enter
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService <== etMutex
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService ==> etMessageQueue pop
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex enter
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMutex
etMessageService ==> etMessageQueue push
+etMessageService <== etMessageService
etMessageService <== etMessageQueue
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+etMessageService ==> etMutex leave
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+etMessageService <== etMutex
+Sender ==> CommunicationProtocolConjPort sendData
etMessageService <== etMessageService
-etMessageService ==> etMutex construct
+CommunicationProtocolConjPort ==> etPort sendMessage
+etMessageService ==> etMessageQueue isNotEmpty
+etPort ==> etMessageService getMessageBuffer
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex enter
+etMessageService ==> etSema waitForWakeup
etMessageService <== etMutex
-etMessageService ==> etMutex construct
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
etMessageService <== etMutex
-etMessageService ==> etSema construct
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+etMessageService <== etSema
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+etMessageService <== etMessageQueue
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+etMessageService ==> etSema waitForWakeup
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolPort <== etPort
+Receiver <== CommunicationProtocolPort
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
etMessageService <== etSema
-Node1 <== etMessageService
-Node1 <== Node1
-Node1 ==> Node1 initActorInstances
-Node1 ==> Sender init
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
Sender ==> CommunicationProtocolConjPort sendData
-CommunicationProtocolConjPort ==> etMessageService getMessageBuffer
+CommunicationProtocolConjPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
etMessageService ==> etMutex enter
etMessageService <== etMutex
etMessageService ==> etMessageQueue pop
etMessageService <== etMessageQueue
-CommunicationProtocolConjPort <== etMessageService
-CommunicationProtocolConjPort ==> etMessageService pushMessage
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
etMessageService ==> etMutex enter
etMessageService <== etMutex
etMessageService ==> etMessageQueue push
@@ -89,36 +470,71 @@ etMessageService ==> etSema wakeup
etMessageService <== etSema
etMessageService ==> etMutex leave
etMessageService <== etMutex
-CommunicationProtocolConjPort <== etMessageService
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
Sender <== CommunicationProtocolConjPort
-Sender >>> SendingData
-Node1 <== Sender
-Node1 ==> Receiver init
-Receiver >>> Idle
-Node1 <== Receiver
-Node1 <== Node1
-main <== Node1
-main ==> Node1 start
-Node1 ==> Node1 startMessageServices
-Node1 ==> etMessageService start
-etMessageService ==> etThread construct
-etMessageService <== etThread
-Node1 <== etMessageService
-Node1 ==> etMessageService start
-etMessageService ==> etThread construct
-etThread ==> etMessageService execute
-etMessageService ==> etMessageService deliverAllMessages
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
etMessageService ==> etMessageQueue isNotEmpty
etMessageService <== etMessageQueue
etMessageService ==> etSema waitForWakeup
-etMessageService <== etThread
-Node1 <== etMessageService
-Node1 <== Node1
-main <== Node1
-main ==> Node1 run
-Node1 ==> etThread sleep
-etSema ==> etMessageService execute
-etMessageService ==> etMessageService deliverAllMessages
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolPort <== etPort
+Receiver <== CommunicationProtocolPort
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
etMessageService ==> etMessageQueue isNotEmpty
etMessageService <== etMessageQueue
etMessageService ==> etMessageService popMessage
@@ -130,16 +546,210 @@ etMessageService ==> etMutex leave
etMessageService <== etMutex
etMessageService <== etMessageService
etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
-MsgDispatcher_PhysicalThread2 ==> Receiver receiveMessage
-Receiver ==> Receiver receiveEvent
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+Sender ==> CommunicationProtocolConjPort sendData
+CommunicationProtocolConjPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolPort <== etPort
+Receiver <== CommunicationProtocolPort
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+Sender ==> CommunicationProtocolConjPort sendData
+CommunicationProtocolConjPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
Receiver ==> CommunicationProtocolPort receivedData
-CommunicationProtocolPort ==> etMessageService getMessageBuffer
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolPort <== etPort
+Receiver <== CommunicationProtocolPort
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+Sender ==> CommunicationProtocolConjPort sendData
+CommunicationProtocolConjPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
etMessageService ==> etMutex enter
etMessageService <== etMutex
etMessageService ==> etMessageQueue pop
etMessageService <== etMessageQueue
-CommunicationProtocolPort <== etMessageService
-CommunicationProtocolPort ==> etMessageService pushMessage
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
etMessageService ==> etMutex enter
etMessageService <== etMutex
etMessageService ==> etMessageQueue push
@@ -148,63 +758,319 @@ etMessageService ==> etSema wakeup
etMessageService <== etSema
etMessageService ==> etMutex leave
etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
etMessageService <== etSema
-CommunicationProtocolPort <== etMessageService
etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolPort <== etPort
Receiver <== CommunicationProtocolPort
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
etMessageService <== etMessageQueue
etMessageService ==> etMessageService popMessage
etMessageService ==> etMutex enter
etMessageService <== etMutex
-Receiver >>> DataReceived
etMessageService ==> etMessageQueue pop
-Receiver <== Receiver
etMessageService <== etMessageQueue
-MsgDispatcher_PhysicalThread2 <== Receiver
etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+Sender ==> CommunicationProtocolConjPort sendData
+CommunicationProtocolConjPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+MsgDispatcher_PhysicalThread2 <== Sender
etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolPort <== etPort
+Receiver <== CommunicationProtocolPort
+MsgDispatcher_PhysicalThread1 <== Receiver
+etMessageService <== MsgDispatcher_PhysicalThread1
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+Sender ==> CommunicationProtocolConjPort sendData
+CommunicationProtocolConjPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolConjPort <== etPort
+Sender <== CommunicationProtocolConjPort
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService <== MsgDispatcher_PhysicalThread2
etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
etMessageService ==> MsgDispatcher_PhysicalThread1 receiveMessage
-MsgDispatcher_PhysicalThread1 ==> Sender _receiveMessage
-Sender >>> Done
-MsgDispatcher_PhysicalThread1 <== Sender
+MsgDispatcher_PhysicalThread1 ==> Receiver _receiveMessage
+Receiver ==> CommunicationProtocolPort receivedData
+CommunicationProtocolPort ==> etPort sendMessage
+etPort ==> etMessageService getMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+etPort ==> etMessageService pushMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etSema wakeup
+etMessageService <== etSema
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etPort <== etMessageService
+CommunicationProtocolPort <== etPort
+Receiver <== CommunicationProtocolPort
+MsgDispatcher_PhysicalThread1 <== Receiver
etMessageService <== MsgDispatcher_PhysicalThread1
etMessageService ==> etMessageService returnMessageBuffer
etMessageService ==> etMutex enter
-Node1 <== etThread
-main <== Node1
-main ==> Node1 stop
-Node1 ==> Node1 stopMessageServices
-Node1 ==> etMessageService stop
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+etMessageService <== etSema
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etMessageService popMessage
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue pop
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> MsgDispatcher_PhysicalThread2 receiveMessage
+MsgDispatcher_PhysicalThread2 ==> Sender _receiveMessage
+MsgDispatcher_PhysicalThread2 <== Sender
+etMessageService <== MsgDispatcher_PhysicalThread2
+etMessageService ==> etMessageService returnMessageBuffer
+etMessageService ==> etMutex enter
+etMessageService <== etMutex
+etMessageService ==> etMessageQueue push
+etMessageService <== etMessageQueue
+etMessageService ==> etMutex leave
+etMessageService <== etMutex
+etMessageService <== etMessageService
+etMessageService ==> etMessageQueue isNotEmpty
+etMessageService <== etMessageQueue
+etMessageService ==> etSema waitForWakeup
+node1_sys1 <== etThread
+main <== node1_sys1
+main ==> node1_sys1 stop
+node1_sys1 ==> node1_sys1 stopMessageServices
+node1_sys1 ==> etMessageService stop
etMessageService ==> etThread destruct
etMessageService <== etThread
-Node1 <== etMessageService
-Node1 ==> etMessageService stop
+node1_sys1 <== etMessageService
+node1_sys1 ==> etMessageService stop
etMessageService ==> etThread destruct
etMessageService <== etThread
-Node1 <== etMessageService
-Node1 <== Node1
-main <== Node1
-main ==> Node1 destroy
-Node1 ==> Node1 destroyMessageServices
-Node1 ==> etMessageService destroy
+node1_sys1 <== etMessageService
+node1_sys1 <== node1_sys1
+main <== node1_sys1
+main ==> node1_sys1 destroy
+node1_sys1 ==> node1_sys1 destroyMessageServices
+node1_sys1 ==> etMessageService destroy
etMessageService ==> etMutex destruct
etMessageService <== etMutex
etMessageService ==> etMutex destruct
etMessageService <== etMutex
etMessageService ==> etSema destruct
etMessageService <== etSema
-Node1 <== etMessageService
-Node1 ==> etMessageService destroy
+node1_sys1 <== etMessageService
+node1_sys1 ==> etMessageService destroy
etMessageService ==> etMutex destruct
etMessageService <== etMutex
etMessageService ==> etMutex destruct
etMessageService <== etMutex
etMessageService ==> etSema destruct
etMessageService <== etSema
-Node1 <== etMessageService
-Node1 <== Node1
-main <== Node1
+node1_sys1 <== etMessageService
+node1_sys1 <== node1_sys1
+main <== node1_sys1
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
index 245744e..9bd9411 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
@@ -166,7 +166,7 @@ class NodeGen {
«ENDFOR»
/* initialization of all message services */
«FOR thread: nr.type.threads»
- etMessageService_init(&msgService_«thread.name», &msgBuffer_«thread.name», MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE, MsgDispatcher_«thread.name»_receiveMessage);
+ etMessageService_init(&msgService_«thread.name», msgBuffer_«thread.name», «thread.msgpoolsize», «thread.msgblocksize», MsgDispatcher_«thread.name»_receiveMessage);
«ENDFOR»
ET_MSC_LOGGER_SYNC_EXIT
@@ -337,9 +337,10 @@ class NodeGen {
#include "«protocolClass.name».h"
«ENDFOR»
- /* instantiation of message services */
+ /* instantiation of message services and message buffers */
«FOR thread: nr.type.threads»
- static uint8 msgBuffer_«thread.name»;
+ /* «thread.name» */
+ static uint8 msgBuffer_«thread.name»[«thread.msgpoolsize» * «thread.msgblocksize»]; /* msgBuffer_<threadname>[<msgpoolsize> * <msgblocksize>] */
static etMessageService msgService_«thread.name»;
«ENDFOR»
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java
index 75268eb..49c9b62 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java
@@ -417,10 +417,16 @@ public class NodeGen {
_builder.append("etMessageService_init(&msgService_");
String _name_13 = thread_1.getName();
_builder.append(_name_13, " ");
- _builder.append(", &msgBuffer_");
+ _builder.append(", msgBuffer_");
String _name_14 = thread_1.getName();
_builder.append(_name_14, " ");
- _builder.append(", MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE, MsgDispatcher_");
+ _builder.append(", ");
+ int _msgpoolsize = thread_1.getMsgpoolsize();
+ _builder.append(_msgpoolsize, " ");
+ _builder.append(", ");
+ int _msgblocksize = thread_1.getMsgblocksize();
+ _builder.append(_msgblocksize, " ");
+ _builder.append(", MsgDispatcher_");
String _name_15 = thread_1.getName();
_builder.append(_name_15, " ");
_builder.append("_receiveMessage);");
@@ -898,20 +904,31 @@ public class NodeGen {
}
}
_builder.newLine();
- _builder.append("/* instantiation of message services */");
+ _builder.append("/* instantiation of message services and message buffers */");
_builder.newLine();
{
NodeClass _type = nr.getType();
EList<PhysicalThread> _threads = _type.getThreads();
for(final PhysicalThread thread : _threads) {
- _builder.append("static uint8 msgBuffer_");
+ _builder.append("/* ");
String _name_4 = thread.getName();
_builder.append(_name_4, "");
- _builder.append(";");
+ _builder.append(" */");
_builder.newLineIfNotEmpty();
- _builder.append("static etMessageService msgService_");
+ _builder.append("static uint8 msgBuffer_");
String _name_5 = thread.getName();
_builder.append(_name_5, "");
+ _builder.append("[");
+ int _msgpoolsize = thread.getMsgpoolsize();
+ _builder.append(_msgpoolsize, "");
+ _builder.append(" * ");
+ int _msgblocksize = thread.getMsgblocksize();
+ _builder.append(_msgblocksize, "");
+ _builder.append("]; /* msgBuffer_<threadname>[<msgpoolsize> * <msgblocksize>] */ ");
+ _builder.newLineIfNotEmpty();
+ _builder.append("static etMessageService msgService_");
+ String _name_6 = thread.getName();
+ _builder.append(_name_6, "");
_builder.append(";");
_builder.newLineIfNotEmpty();
}
@@ -927,8 +944,8 @@ public class NodeGen {
for(final ActorInstance ai : _allContainedInstances) {
_builder.append("static ");
ActorClass _actorClass = ai.getActorClass();
- String _name_6 = _actorClass.getName();
- _builder.append(_name_6, "");
+ String _name_7 = _actorClass.getName();
+ _builder.append(_name_7, "");
_builder.append(" ");
String _path = ai.getPath();
String _pathName = this._roomExtensions.getPathName(_path);
diff --git a/runtime/org.eclipse.etrice.modellib.c/.gitignore b/runtime/org.eclipse.etrice.modellib.c/.gitignore
new file mode 100644
index 0000000..76b025a
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/.gitignore
@@ -0,0 +1,2 @@
+Debug
+Release
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.c b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.c
index d602edb..de713f5 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.c
@@ -106,6 +106,7 @@ etMessage* etMessageService_getMessageBuffer(etMessageService* self, etUInt16 si
if (size<=self->messageBuffer.blockSize){
if (self->messagePool.size>0){
etMessage* msg = etMessageQueue_pop(&self->messagePool);
+ etMutex_leave(&self->poolMutex);
ET_MSC_LOGGER_SYNC_EXIT
return msg;
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c
index d8b94aa..0bf0a8f 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c
@@ -28,7 +28,9 @@ void etPort_receive(const etPort* self, const etMessage* msg) {
void etPort_sendMessage(const etPort* self, etInt16 evtId, int size, void* data) {
int offset = MEM_CEIL(sizeof(etMessage));
int totalSize = offset+size;
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, totalSize);
+ etMessage* msg = NULL;
+ ET_MSC_LOGGER_SYNC_ENTRY("etPort", "sendMessage")
+ msg = etMessageService_getMessageBuffer(self->msgService, totalSize);
if (msg!=NULL) {
msg->address = self->peerAddress;
msg->evtID = evtId;
@@ -39,4 +41,5 @@ void etPort_sendMessage(const etPort* self, etInt16 evtId, int size, void* data)
etMessageService_pushMessage(self->msgService, msg);
}
+ ET_MSC_LOGGER_SYNC_EXIT
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h b/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
index e19bba3..fcf8f9c 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
@@ -25,10 +25,6 @@
#define ET_RUNTIME_MAXLOOP 100
//#define ET_RUNTIME_ENDLESS
-/* pool and block size */
-#define MESSAGE_POOL_MAX 10
-#define MESSAGE_BLOCK_SIZE 64
-
/* enable multi threading (e.g. for protection of message queues) */
#define ET_MULTI_THREADING
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c
index e29a8ec..efe9f27 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c
@@ -32,13 +32,23 @@ void etUserExit(void){ }
#if defined __MINGW32__
/******************thread********************/
+void etThread_execute(etThread* self);
+
void etThread_construct(etThread* self){
ET_MSC_LOGGER_SYNC_ENTRY("etThread", "construct")
- self->osData = (HANDLE)_beginthread( self->threadFunction, self->stacksize, self->threadFunctionData );
+ self->osData = (HANDLE)_beginthread( (etThreadFunction)etThread_execute, self->stacksize, self );
SetThreadPriority(self->osData, self->priority);
ET_MSC_LOGGER_SYNC_EXIT
}
+void etThread_execute(etThread* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("etThread", "execute")
+ /* etThread_execute redirects the call from the thread to the execute function in the eTrice runtime to enable correct synchronous MSC logging */
+ self->threadFunction(self->threadFunctionData);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
void etThread_destruct(etThread* self){
ET_MSC_LOGGER_SYNC_ENTRY("etThread", "destruct")
TerminateThread(self->osData, 0);