Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-01-31 16:25:45 -0500
committerThomas Schuetz2012-01-31 16:25:45 -0500
commit01de373df4a524f266ad4250ea54d9aa30299920 (patch)
treeea2f77be21334d9daaf0156986d25e1a3e5b0a6f /examples/org.eclipse.etrice.generator.c.reference
parent010759ae39852112ad533827402087c0e3daef59 (diff)
downloadorg.eclipse.etrice-01de373df4a524f266ad4250ea54d9aa30299920.tar.gz
org.eclipse.etrice-01de373df4a524f266ad4250ea54d9aa30299920.tar.xz
org.eclipse.etrice-01de373df4a524f266ad4250ea54d9aa30299920.zip
[generator.c] added const instances for ROM
Diffstat (limited to 'examples/org.eclipse.etrice.generator.c.reference')
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room33
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.ReceiverManual.structure36
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SenderManual.structure36
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SubSys.structure30
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c28
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h49
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.c14
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h38
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c14
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h39
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c7
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h10
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Inst.h54
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/test.h8
14 files changed, 359 insertions, 37 deletions
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 57726f6f6..8054390a4 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/cGenRef.room
@@ -2,8 +2,8 @@ RoomModel cGenRef {
import room.basic.types.c.* from "CTypes.room"
SubSystemClass SubSys {
- ActorRef Receiver: Receiver
- ActorRef Sender: Sender
+ ActorRef Receiver: ReceiverManual
+ ActorRef Sender: SenderManual
Binding Sender.dataOut and Receiver.dataIn
}
@@ -122,22 +122,29 @@ RoomModel cGenRef {
}
}
- ActorClass SenderManual {
- Interface {
-
- }
- Structure {
+ ActorClass SenderManual {
+ Interface {
+ conjugated Port dataOut: CommunicationProtocol
+ }
+ Structure {
+ external Port dataOut
+ Attribute attribute1: int32
+ Attribute attribute2: DataClass1
}
- Behavior {
+ Behavior {
+ @BehaviorManual
+ Operation operation1(argument1:int32, argument2: DataClass1 ref){""}
}
}
- ActorClass ReceiverManual {
- Interface {
-
- }
- Structure {
+ ActorClass ReceiverManual {
+ Interface {
+ Port dataIn: CommunicationProtocol
+ }
+ Structure {
+ external Port dataIn
}
Behavior {
+ @BehaviorManual
}
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.ReceiverManual.structure b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.ReceiverManual.structure
new file mode 100644
index 000000000..31fb3ac21
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.ReceiverManual.structure
@@ -0,0 +1,36 @@
+<?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 ReceiverManual" showGuides="true" pictogramLinks="//@children.0/@link //@link //@children.0/@children.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#ActorClass:ReceiverManual"/>
+ </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#ActorClass:ReceiverManual"/>
+ </link>
+ <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="80" height="80" x="339">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.1" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#Port:ReceiverManual$dataIn"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="80" height="20" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataIn"/>
+ </children>
+ </children>
+ </children>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <fonts name="Arial" size="8"/>
+</pi:Diagram>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SenderManual.structure b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SenderManual.structure
new file mode 100644
index 000000000..033bd2d82
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/diagrams/cGenRef.SenderManual.structure
@@ -0,0 +1,36 @@
+<?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 SenderManual" showGuides="true" pictogramLinks="//@children.0/@link //@link //@children.0/@children.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#ActorClass:SenderManual"/>
+ </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#ActorClass:SenderManual"/>
+ </link>
+ <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="80" height="80" x="392" y="500">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../cGenRef.room#Port:SenderManual$dataOut"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="80" height="20" y="60" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="dataOut"/>
+ </children>
+ </children>
+ </children>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <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
index d315e15c5..9091e8ac8 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">
+<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.1/@link //@children.0/@children.1/@children.1/@link //@children.0/@children.0/@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"/>
@@ -15,10 +15,10 @@
</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"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="223" y="272">
+ <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>
@@ -26,16 +26,16 @@
</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)"/>
+ <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;(ReceiverManual)"/>
</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">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="63">
<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"/>
+ <businessObjects href="../cGenRef.room#Port:ReceiverManual$dataIn"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
@@ -45,10 +45,10 @@
</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"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="223" y="85">
+ <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>
@@ -56,16 +56,16 @@
</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)"/>
+ <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;(SenderManual)"/>
</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">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="77" y="80">
<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"/>
+ <businessObjects href="../cGenRef.room#Port:SenderManual$dataOut"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
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
new file mode 100644
index 000000000..4ff412e02
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c
@@ -0,0 +1,28 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass CommunicationProtocol
+ *
+ */
+
+#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
new file mode 100644
index 000000000..a600e07e8
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h
@@ -0,0 +1,49 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ProtocolClass CommunicationProtocol
+ *
+ */
+
+#ifndef _COMMUNICATIONPROTOCOL_H_
+#define _COMMUNICATIONPROTOCOL_H_
+
+#include "etDatatypes.h"
+#include "etPort.h"
+
+
+#include "DataClass1.h"
+
+/* 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 etPort CommunicationProtocolPort;
+
+
+
+
+typedef etPort CommunicationProtocolConjPort;
+
+
+
+
+/*--------------------- 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/ReceiverManual.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.c
new file mode 100644
index 000000000..aa5113e40
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.c
@@ -0,0 +1,14 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass ReceiverManual
+ *
+ */
+
+#include "ReceiverManual.h"
+
+
+void ReceiverManual_ReceiveMessage(void* self, etInt16 localId, const etMessage*){
+ etLogger_logInfoF("ReceiverManual_ReceiveMessage");
+}
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h
new file mode 100644
index 000000000..a1d21b256
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h
@@ -0,0 +1,38 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass ReceiverManual
+ *
+ */
+
+#ifndef _RECEIVERMANUAL_H_
+#define _RECEIVERMANUAL_H_
+
+#include "etDatatypes.h"
+
+
+#include "CommunicationProtocol.h"
+
+
+typedef struct ReceiverManual ReceiverManual;
+
+/* const part of ActorClass (ROM) */
+typedef struct ReceiverManual_const {
+ const ReceiverManual* actor;
+ /* Ports */
+ const CommunicationProtocolPort dataIn;
+
+} ReceiverManual_const;
+
+/* variable part of ActorClass (RAM) */
+struct ReceiverManual {
+ const ReceiverManual_const* constData;
+};
+
+void ReceiverManual_ReceiveMessage(void* self, etInt16 localId, const etMessage*);
+
+
+
+
+#endif /* _RECEIVERMANUAL_H_ */
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c
new file mode 100644
index 000000000..0ba6959ee
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c
@@ -0,0 +1,14 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass SenderManual
+ *
+ */
+
+#include "SenderManual.h"
+
+
+void SenderManual_ReceiveMessage(void* self, etInt16 localId, const etMessage*){
+ etLogger_logInfoF("SenderManual_ReceiveMessage");
+}
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h
new file mode 100644
index 000000000..b131993a7
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h
@@ -0,0 +1,39 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass SenderManual
+ *
+ */
+
+#ifndef _SENDERMANUAL_H_
+#define _SENDERMANUAL_H_
+
+#include "etDatatypes.h"
+
+#include "DataClass1.h"
+
+#include "CommunicationProtocol.h"
+
+
+typedef struct SenderManual SenderManual;
+
+/* const part of ActorClass (ROM) */
+typedef struct SenderManual_const {
+ const SenderManual* actor;
+ /* Ports */
+ const CommunicationProtocolConjPort dataOut;
+
+} SenderManual_const;
+
+/* variable part of ActorClass (RAM) */
+struct SenderManual {
+ const SenderManual_const* constData;
+};
+
+void SenderManual_ReceiveMessage(void* self, etInt16 localId, const etMessage*);
+
+
+
+
+#endif /* _SENDERMANUAL_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
index 2f406e75c..eca7b5290 100644
--- 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
@@ -7,6 +7,9 @@
#include "SubSys.h"
+/* include instances for all classes */
+#include "SubSys_Inst.h"
+
#include "etLogger.h"
/* data for SubSysten SubSys */
@@ -18,6 +21,10 @@ static SubSys SubSysInst = {"SubSys"};
void SubSys_init(void){
etLogger_logInfoF("%s_init", SubSysInst.name);
+
+ /* initialization of all message services */
+ etMessageService_init(&msgService_Thread1, msgBuffer_Thread1, MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE);
+
}
void SubSys_start(void){
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
index 1a7674395..eee116929 100644
--- 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
@@ -13,13 +13,13 @@
* init -> start -> run (loop) -> stop -> destroy
*/
-void SubSys_init(void); // lifecycle init
-void SubSys_start(void); // lifecycle start
+void SubSys_init(void); /* lifecycle init */
+void SubSys_start(void); /* lifecycle start */
-void SubSys_run(void);
+void SubSys_run(void); /* lifecycle run */
-void SubSys_stop(void); // lifecycle stop
-void SubSys_destroy(void); // lifecycle destroy
+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_Inst.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Inst.h
new file mode 100644
index 000000000..2feae0971
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Inst.h
@@ -0,0 +1,54 @@
+/**
+ * @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 "etMessageService.h"
+
+/* instantiation of message services */
+#define MESSAGE_POOL_MAX 10
+#define MESSAGE_BLOCK_SIZE 32
+/* MessageService for Thread1 */
+uint8 msgBuffer_Thread1[MESSAGE_POOL_MAX*MESSAGE_BLOCK_SIZE];
+etMessageService msgService_Thread1;
+
+
+/* include all used ActorClasses */
+/* TODO: only include used Actor Classes for current SubSystem */
+#include "SenderManual.h"
+#include "ReceiverManual.h"
+
+/* include all used ProtcolClasses */
+#include "CommunicationProtocol.h"
+
+
+/* declarations of all ActorClass instances (const and variable structs) */
+
+/* forward declaration of varible actor structs */
+static ReceiverManual _SubSys_Receiver;
+static SenderManual _SubSys_Sender;
+
+
+/* instance _SubSys_Receiver */
+static const ReceiverManual_const _SubSys_Receiver_const = {
+ &_SubSys_Receiver,
+ /* Ports: {myActor, etReceiveMessage, msgService, peerAddress, localId} */
+ {&_SubSys_Receiver, NULL, &msgService_Thread1, 1, 123} /* Port dataIn */
+
+};
+static ReceiverManual _SubSys_Receiver = {&_SubSys_Receiver_const};
+
+/* instance _SubSys_Sender */
+static const SenderManual_const _SubSys_Sender_const = {
+ &_SubSys_Sender,
+ /* Ports: {myActor, etReceiveMessage, msgService, peerAddress, localId} */
+ {&_SubSys_Sender, NULL, &msgService_Thread1, 1, 123} /* Port dataOut */
+
+};
+static SenderManual _SubSys_Sender = {&_SubSys_Sender_const};
+
+
+
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/test.h b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/test.h
index cb4ddabe1..a7df3481b 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/test.h
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/experiments/test.h
@@ -11,14 +11,14 @@ struct MyActor {
const MyActor_const* constData;
};
-static const MyActor Actor1;
-static const MyActor Actor2;
+static MyActor Actor1;
+static MyActor Actor2;
static const MyActor_const Actor1_const = {&Actor1};
static const MyActor_const Actor2_const = {&Actor2};
-static const MyActor Actor1 = {&Actor1_const};
-static const MyActor Actor2 = {&Actor2_const};;
+static MyActor Actor1 = {&Actor1_const};
+static MyActor Actor2 = {&Actor2_const};;
//*****************************

Back to the top