Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-01-30 13:39:21 -0500
committerThomas Schuetz2012-01-30 13:39:21 -0500
commit59b20491d052bf964936dadbe4fc619d65c9494a (patch)
tree3c33334c20bb2295c1bcd0e26cd4ba47f31aba4a /examples/org.eclipse.etrice.generator.c.reference
parentd5afc9c0c42138ac147199ae60193899953869cb (diff)
downloadorg.eclipse.etrice-59b20491d052bf964936dadbe4fc619d65c9494a.tar.gz
org.eclipse.etrice-59b20491d052bf964936dadbe4fc619d65c9494a.tar.xz
org.eclipse.etrice-59b20491d052bf964936dadbe4fc619d65c9494a.zip
[generator.c] first version of Generator for SubSystem and Runner
Diffstat (limited to 'examples/org.eclipse.etrice.generator.c.reference')
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/CTypes.room2
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room37
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SS.structure356
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure89
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c21
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h50
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c7
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h13
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c7
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h13
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c42
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h27
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c37
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/Runner.c25
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c43
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.h27
16 files changed, 347 insertions, 449 deletions
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/CTypes.room b/examples/org.eclipse.etrice.generator.c.reference/model/CTypes.room
index 9c76a085e..669cd250b 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/CTypes.room
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/CTypes.room
@@ -1,6 +1,6 @@
RoomModel room.basic.types.c {
- PrimitiveType boolean -> boolean (boolean) default "FALSE"
+ PrimitiveType bool -> bool (boolean) default "FALSE"
PrimitiveType char -> char (char) default "0"
PrimitiveType int8 -> int8 (int8) default "0"
PrimitiveType int16 -> int16 (int16) default "0"
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 c1ec04d23..3413c2566 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
@@ -1,24 +1,31 @@
RoomModel cGenRef {
import room.basic.types.c.* from "CTypes.room"
- SubSystemClass SS {
+ SubSystemClass SubSys {
ActorRef Receiver: Receiver
ActorRef Sender: Sender
- ActorRef Broadcast: Broadcast
- ActorRef Receiver2: Receiver
- ActorRef ref0: Broadcast
- ActorRef ref1: Broadcast
- ActorRef ref2: Receiver
- ActorRef ref3: Receiver
- Binding Sender.dataOut and Broadcast.dataIn
- Binding Broadcast.dataOut and ref0.dataIn
- Binding Broadcast.dataOut and ref1.dataIn
- Binding Receiver.dataIn and ref0.dataOut
- Binding Receiver2.dataIn and ref0.dataOut
- Binding ref2.dataIn and ref1.dataOut
- Binding ref3.dataIn and ref1.dataOut
+ Binding Sender.dataOut and Receiver.dataIn
}
+// SubSystemClass SubSysSomewhatBigger {
+// ActorRef Receiver: Receiver
+// ActorRef Sender: Sender
+// ActorRef Broadcast: Broadcast
+// ActorRef Receiver2: Receiver
+// ActorRef ref0: Broadcast
+// ActorRef ref1: Broadcast
+// ActorRef ref2: Receiver
+// ActorRef ref3: Receiver
+// Binding Sender.dataOut and Broadcast.dataIn
+// Binding Broadcast.dataOut and ref0.dataIn
+// Binding Broadcast.dataOut and ref1.dataIn
+// Binding Receiver.dataIn and ref0.dataOut
+// Binding Receiver2.dataIn and ref0.dataOut
+// Binding ref2.dataIn and ref1.dataOut
+// Binding ref3.dataIn and ref1.dataOut
+// }
+
+
ActorClass Receiver {
Interface {
Port dataIn: CommunicationProtocol
@@ -172,7 +179,7 @@ RoomModel cGenRef {
Attribute Attr1: int32
Attribute Attr2: float32
Attribute Attr3: int32
- Operation Operation1(): void {"/*nothing to do*/"}
+ Operation Operation1() {"/*nothing to do*/"}
}
} \ No newline at end of file
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SS.structure b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SS.structure
deleted file mode 100644
index 93082cde0..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SS.structure
+++ /dev/null
@@ -1,356 +0,0 @@
-<?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 SS" 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 //@children.0/@children.2/@link //@children.0/@children.2/@children.1/@link //@children.0/@children.2/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.3/@children.1/@link //@children.0/@children.4/@link //@children.0/@children.4/@children.1/@link //@children.0/@children.4/@children.2/@link //@children.0/@children.5/@link //@children.0/@children.5/@children.1/@link //@children.0/@children.5/@children.2/@link //@children.0/@children.6/@link //@children.0/@children.6/@children.1/@link //@children.0/@children.7/@link //@children.0/@children.7/@children.1/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link //@connections.4/@link //@connections.5/@link //@connections.6/@link" verticalGridUnit="0">
- <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
- <link>
- <businessObjects href="../cGenRef.room#SubSystemClass:SS"/>
- </link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="cls"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#SubSystemClass:SS"/>
- </link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="26" y="170">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#ActorRef:SS$Receiver"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Receiver&#xA;(Receiver)"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="79">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Receiver$dataIn"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="222" y="170">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#ActorRef:SS$Sender"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" 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="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Sender&#xA;(Sender)"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value="C"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="79">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Sender$dataOut"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataOut"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="418" y="170">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#ActorRef:SS$Broadcast"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" 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="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Broadcast&#xA;(Broadcast)"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="45">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Broadcast$dataIn"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value="CM"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="112">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="23" y="19"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Broadcast$dataOut"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1 //@connections.2" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.1"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataOut"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="614" y="170">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#ActorRef:SS$Receiver2"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Receiver2&#xA;(Receiver)"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="79">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Receiver$dataIn"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.4" referencedGraphicsAlgorithm="//@children.0/@children.3/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="26" y="280">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#ActorRef:SS$ref0"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ref0&#xA;(Broadcast)"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="45">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Broadcast$dataIn"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.4/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value="CM"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="112">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="23" y="19"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Broadcast$dataOut"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.3 //@connections.4" referencedGraphicsAlgorithm="//@children.0/@children.4/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.1"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataOut"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="222" y="280">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#ActorRef:SS$ref1"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.5/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ref1&#xA;(Broadcast)"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="45">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Broadcast$dataIn"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.0/@children.5/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value="CM"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="112">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="23" y="19"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Broadcast$dataOut"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.5 //@connections.6" referencedGraphicsAlgorithm="//@children.0/@children.5/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.1"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataOut"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="418" y="280">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#ActorRef:SS$ref2"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.6/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ref2&#xA;(Receiver)"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="79">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Receiver$dataIn"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.5" referencedGraphicsAlgorithm="//@children.0/@children.6/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="614" y="280">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#ActorRef:SS$ref3"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.7/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ref3&#xA;(Receiver)"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="79">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../cGenRef.room#Port:Receiver$dataIn"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.6" referencedGraphicsAlgorithm="//@children.0/@children.7/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
- </children>
- </children>
- </children>
- </children>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@children.1/@anchors.0" end="//@children.0/@children.2/@children.1/@anchors.0">
- <properties key="obj-type" value="bind"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#Binding:SS$dataOut!Sender-dataIn!Broadcast"/>
- </link>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.2/@anchors.0" end="//@children.0/@children.4/@children.1/@anchors.0">
- <properties key="obj-type" value="bind"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#Binding:SS$dataOut!Broadcast-dataIn!ref0"/>
- </link>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.2/@anchors.0" end="//@children.0/@children.5/@children.1/@anchors.0">
- <properties key="obj-type" value="bind"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#Binding:SS$dataOut!Broadcast-dataIn!ref1"/>
- </link>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.0/@children.1/@anchors.0" end="//@children.0/@children.4/@children.2/@anchors.0">
- <properties key="obj-type" value="bind"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#Binding:SS$dataIn!Receiver-dataOut!ref0"/>
- </link>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.3/@children.1/@anchors.0" end="//@children.0/@children.4/@children.2/@anchors.0">
- <properties key="obj-type" value="bind"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#Binding:SS$dataIn!Receiver2-dataOut!ref0"/>
- </link>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.6/@children.1/@anchors.0" end="//@children.0/@children.5/@children.2/@anchors.0">
- <properties key="obj-type" value="bind"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#Binding:SS$dataIn!ref2-dataOut!ref1"/>
- </link>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.7/@children.1/@anchors.0" end="//@children.0/@children.5/@children.2/@anchors.0">
- <properties key="obj-type" value="bind"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../cGenRef.room#Binding:SS$dataIn!ref3-dataOut!ref1"/>
- </link>
- </connections>
- <colors red="227" green="238" blue="249"/>
- <colors red="255" green="255" blue="255"/>
- <colors/>
- <colors red="200" green="200" blue="200"/>
- <fonts name="Arial" size="8"/>
-</pi:Diagram>
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
new file mode 100644
index 000000000..d315e15c5
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure
@@ -0,0 +1,89 @@
+<?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">
+ <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"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="cls"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#SubSystemClass:SubSys"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="177" height="127" x="297" y="358">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="117" height="67" x="30" y="30">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="87" y="37"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="82" y="52"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#ActorRef:SubSys$Receiver"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="117" height="67" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Receiver&#xA;(Receiver)"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="51">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#Port:Receiver$dataIn"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="177" height="127" x="304" y="68">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="117" height="67" x="30" y="30">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="87" y="37"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="82" y="52"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#ActorRef:SubSys$Sender"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" 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="117" height="67" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Sender&#xA;(Sender)"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="60" y="67">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#Port:Sender$dataOut"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="15" y="39" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataOut"/>
+ </children>
+ </children>
+ </children>
+ </children>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@children.1/@anchors.0" end="//@children.0/@children.0/@children.1/@anchors.0">
+ <properties key="obj-type" value="bind"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../cGenRef.room#Binding:SubSys$dataOut!Sender-dataIn!Receiver"/>
+ </link>
+ </connections>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <colors red="200" green="200" blue="200"/>
+ <fonts name="Arial" size="8"/>
+</pi:Diagram>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c
deleted file mode 100644
index 22bc04cec..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "CommunicationProtocol.h"
-
-/*--------------------- port classes */
-
-
-
-/*--------------------- debug helpers */
-
-/* TODO: make this optional or different for smaller footprint */
-/* message names as strings for debugging (generate MSC) */
-static const char* CommunicationProtocol_messageStrings[] = {"MIN", "receivedData","sendData", "sendData2", "MAX"};
-
-const char* CommunicationProtocol_getMessageString(int msg_id) {
- if (msg_id<CommunicationProtocol_MSG_MIN || msg_id>CommunicationProtocol_MSG_MAX+1){
- /* id out of range */
- return "Message ID out of range";
- }
- else{
- return CommunicationProtocol_messageStrings[msg_id];
- }
-}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h
deleted file mode 100644
index 937c181f6..000000000
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef _CommunicationProtocol_H_
-#define _CommunicationProtocol_H_
-
-#include "etDatatypes.h"
-
-
-#include "DataClass1.h"
-
-typedef struct {
-
-
-} CommunicationProtocol;
-
-/* message IDs */
-enum {
- CommunicationProtocol_MSG_MIN = 0,
- /* IDs for outgoing messages */
- CommunicationProtocol_OUT_receivedData = 1,
- /* IDs for incoming messages */
- CommunicationProtocol_IN_sendData = 2,
- CommunicationProtocol_IN_sendData2 = 3,
- /* error if msgID >= MSG_MAX */
- CommunicationProtocol_MSG_MAX = 4
-};
-
-/*--------------------- port classes */
-
-typedef struct etPort CommunicationProtocolPort;
-
-void CommunicationProtocolPort_MyOperation1(CommunicationProtocolPort* self, int a, int b);
-int CommunicationProtocolPort_MyOperation2(CommunicationProtocolPort* self);
-
-
-
-typedef struct etPort CommunicationProtocolConjPort;
-
-void CommunicationProtocolConjPort_MyOperation1(CommunicationProtocolConjPort* self, int a, int b);
-int CommunicationProtocolConjPort_MyOperation2(CommunicationProtocolConjPort* self);
-
-
-
-/*--------------------- debug helpers */
-
-/* get message string for message id */
-const char* CommunicationProtocol_getMessageString(int msg_id);
-
-
-
-#endif /* _CommunicationProtocol_H_ */
-
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c
index d4235dbc3..d66aaaae4 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c
@@ -1,3 +1,10 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of DataClass DataClass1
+ *
+ */
+
#include "DataClass1.h"
#include <string.h>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h
index dbf8dee81..c9ffdba2b 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h
@@ -1,5 +1,12 @@
-#ifndef _DataClass1_H_
-#define _DataClass1_H_
+/**
+ * @author generated by eTrice
+ *
+ * Header File of DataClass DataClass1
+ *
+ */
+
+#ifndef _DATACLASS1_H_
+#define _DATACLASS1_H_
#include "etDatatypes.h"
@@ -29,5 +36,5 @@ float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value);
// deep copy
void DataClass1_deepCopy(DataClass1* source, DataClass1* target);
-#endif /* _DataClass1_H_ */
+#endif /* _DATACLASS1_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c
index 2150d7b41..6445aa75a 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c
@@ -1,3 +1,10 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of DataClass DataClass2
+ *
+ */
+
#include "DataClass2.h"
#include <string.h>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h
index 2d8cbb74f..dc3dd8c7c 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h
@@ -1,5 +1,12 @@
-#ifndef _DataClass2_H_
-#define _DataClass2_H_
+/**
+ * @author generated by eTrice
+ *
+ * Header File of DataClass DataClass2
+ *
+ */
+
+#ifndef _DATACLASS2_H_
+#define _DATACLASS2_H_
#include "etDatatypes.h"
@@ -21,5 +28,5 @@ void DataClass2_Operation1(DataClass2* self);
// deep copy
void DataClass2_deepCopy(DataClass2* source, DataClass2* target);
-#endif /* _DataClass2_H_ */
+#endif /* _DATACLASS2_H_ */
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c
new file mode 100644
index 000000000..2f406e75c
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c
@@ -0,0 +1,42 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of SubSystemClass SubSys
+ *
+ */
+
+#include "SubSys.h"
+
+#include "etLogger.h"
+
+/* data for SubSysten SubSys */
+typedef struct SubSys {
+ char *name;
+} SubSys;
+
+static SubSys SubSysInst = {"SubSys"};
+
+void SubSys_init(void){
+ etLogger_logInfoF("%s_init", SubSysInst.name);
+}
+
+void SubSys_start(void){
+ etLogger_logInfoF("%s_start", SubSysInst.name);
+}
+
+void SubSys_run(void){
+ int32 i;
+ for (i=0; i<100; i++){
+ etLogger_logInfoF("%s Scheduler tick %d", SubSysInst.name, i);
+ }
+}
+
+void SubSys_stop(void){
+ etLogger_logInfoF("%s_stop", SubSysInst.name);
+}
+
+void SubSys_destroy(void){
+ etLogger_logInfoF("%s_destroy", SubSysInst.name);
+}
+
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h
new file mode 100644
index 000000000..1a7674395
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h
@@ -0,0 +1,27 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of SubSystemClass SubSys
+ *
+ */
+
+#ifndef _SUBSYS_H_
+#define _SUBSYS_H_
+
+
+/* lifecycle functions
+ * init -> start -> run (loop) -> stop -> destroy
+ */
+
+void SubSys_init(void); // lifecycle init
+void SubSys_start(void); // lifecycle start
+
+void SubSys_run(void);
+
+void SubSys_stop(void); // lifecycle stop
+void SubSys_destroy(void); // lifecycle destroy
+
+
+#endif /* _SUBSYS_H_ */
+
+
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/SubSys_Runner.c
new file mode 100644
index 000000000..845779756
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c
@@ -0,0 +1,37 @@
+/**
+ * @author generated by eTrice
+ *
+ * this class contains the main function running component SubSys
+ * it instantiates SubSys and starts and ends the lifecycle
+ */
+
+
+#include "SubSys.h"
+
+#include "etLogger.h"
+
+/**
+ * main function
+ * creates component and starts and stops the lifecycle
+ */
+
+int main(void) {
+
+ etLogger_logInfo("*** T H E B E G I N ***");
+
+ /* startup sequence of lifecycle */
+ SubSys_init(); /* lifecycle init */
+ SubSys_start(); /* lifecycle start */
+
+ /* run Scheduler */
+ SubSys_run();
+
+ /* shutdown sequence of lifecycle */
+ SubSys_stop(); /* lifecycle stop */
+ SubSys_destroy(); /* lifecycle destroy */
+
+ etLogger_logInfo("*** T H E E N D ***");
+
+ return 0;
+}
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/Runner.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/Runner.c
new file mode 100644
index 000000000..c082e6398
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/Runner.c
@@ -0,0 +1,25 @@
+
+
+#include "etLogger.h"
+
+#include "SubSystem.h"
+
+//int main(void) {
+//
+//
+// etLogger_logInfo("*** T H E B E G I N ***");
+//
+// SubSystem_init(); // lifecycle init
+// SubSystem_start(); // lifecycle start
+//
+// // run Scheduler
+// SubSystem_Scheduler();
+//
+// // end the lifecycle
+// SubSystem_stop(); // lifecycle stop
+// SubSystem_destroy(); // lifecycle destroy
+//
+// etLogger_logInfo("*** T H E E N D ***");
+//
+// return 0;
+//}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c
new file mode 100644
index 000000000..7ce89ce52
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.c
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "etLogger.h"
+
+typedef struct SubSystem {
+ char *name;
+} SubSystem;
+
+static SubSystem SubSystemInst = {"SubSystem"};
+
+void SubSystem_init(void){
+ etLogger_logInfoF("%s_init", SubSystemInst.name);
+}
+
+void SubSystem_start(void){
+ etLogger_logInfoF("%s_start", SubSystemInst.name);
+}
+
+void SubSystem_Scheduler(void){
+ int32 i;
+ for (i=0; i<100; i++){
+ etLogger_logInfoF("%s Scheduler tick %d", SubSystemInst.name, i);
+ }
+}
+
+void SubSystem_stop(void){
+ etLogger_logInfoF("%s_stop", SubSystemInst.name);
+}
+
+void SubSystem_destroy(void){
+ etLogger_logInfoF("%s_destroy", SubSystemInst.name);
+}
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.h b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.h
new file mode 100644
index 000000000..4f280984e
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/SubSystem.h
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+
+
+#ifndef _SUBSYSTEM_H_
+#define _SUBSYSTEM_H_
+
+void SubSystem_init(void); // lifecycle init
+void SubSystem_start(void); // lifecycle start
+
+void SubSystem_Scheduler(void);
+
+void SubSystem_stop(void); // lifecycle stop
+void SubSystem_destroy(void); // lifecycle destroy
+
+
+#endif /* _SUBSYSTEM_H_ */

Back to the top