Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-02-02 15:43:04 +0000
committerThomas Schuetz2012-02-02 15:43:04 +0000
commit4dd4a99412c8592c4dea41184781ca29b0ee2bd0 (patch)
tree4ff24d4d959d41516f74bee6cdfc4ecbeaa03d29 /examples
parent01278f0231781124a4c8c0cea8c3879a168e26a6 (diff)
downloadorg.eclipse.etrice-4dd4a99412c8592c4dea41184781ca29b0ee2bd0.tar.gz
org.eclipse.etrice-4dd4a99412c8592c4dea41184781ca29b0ee2bd0.tar.xz
org.eclipse.etrice-4dd4a99412c8592c4dea41184781ca29b0ee2bd0.zip
[generator.c] added generator for dispatcher for each MessageService
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c116
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.h112
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.c62
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass1.h80
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.c50
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/DataClass2.h64
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.c28
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/ReceiverManual.h112
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.c29
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SenderManual.h119
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.c146
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys.h54
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Disp.h27
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Inst.h110
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Runner.c82
15 files changed, 620 insertions, 571 deletions
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
index ede596a7b..40bc41261 100644
--- 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
@@ -1,58 +1,58 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ProtocolClass CommunicationProtocol
- *
- */
-
-#include "CommunicationProtocol.h"
-
-#include "etMSCLogger.h"
-
-/*--------------------- port classes */
-
-void CommunicationProtocolPort_receivedData(const CommunicationProtocolPort* self){
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolPort", "receivedData")
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = CommunicationProtocol_OUT_receivedData;
- etMessageService_pushMessage(self->msgService, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-
-void CommunicationProtocolConjPort_sendData(const CommunicationProtocolConjPort* self){
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjPort", "sendData")
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = CommunicationProtocol_IN_sendData;
- etMessageService_pushMessage(self->msgService, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-void CommunicationProtocolConjPort_sendData2(const CommunicationProtocolConjPort* self){
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjPort", "sendData2")
- etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
- msg->address = self->peerAddress;
- msg->evtID = CommunicationProtocol_IN_sendData2;
- etMessageService_pushMessage(self->msgService, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-
-/*--------------------- 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];
- }
-}
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass CommunicationProtocol
+ *
+ */
+
+#include "CommunicationProtocol.h"
+
+#include "etMSCLogger.h"
+
+/*--------------------- port classes */
+
+void CommunicationProtocolPort_receivedData(const CommunicationProtocolPort* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolPort", "receivedData")
+ etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
+ msg->address = self->peerAddress;
+ msg->evtID = CommunicationProtocol_OUT_receivedData;
+ etMessageService_pushMessage(self->msgService, msg);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+
+void CommunicationProtocolConjPort_sendData(const CommunicationProtocolConjPort* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjPort", "sendData")
+ etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
+ msg->address = self->peerAddress;
+ msg->evtID = CommunicationProtocol_IN_sendData;
+ etMessageService_pushMessage(self->msgService, msg);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+void CommunicationProtocolConjPort_sendData2(const CommunicationProtocolConjPort* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjPort", "sendData2")
+ etMessage* msg = etMessageService_getMessageBuffer(self->msgService, sizeof(etMessage));
+ msg->address = self->peerAddress;
+ msg->evtID = CommunicationProtocol_IN_sendData2;
+ etMessageService_pushMessage(self->msgService, msg);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+
+/*--------------------- 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
index 47d40fe59..788b62654 100644
--- 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
@@ -1,56 +1,56 @@
-/**
- * @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;
-
-void CommunicationProtocolPort_receivedData(const CommunicationProtocolPort* self);
-
-
-
-
-
-typedef etPort CommunicationProtocolConjPort;
-
-void CommunicationProtocolConjPort_sendData(const CommunicationProtocolConjPort* self);
-void CommunicationProtocolConjPort_sendData2(const CommunicationProtocolConjPort* self);
-
-
-
-
-
-/*--------------------- debug helpers */
-
-/* get message string for message id */
-const char* CommunicationProtocol_getMessageString(int msg_id);
-
-
-
-#endif /* _COMMUNICATIONPROTOCOL_H_ */
-
+/**
+ * @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;
+
+void CommunicationProtocolPort_receivedData(const CommunicationProtocolPort* self);
+
+
+
+
+
+typedef etPort CommunicationProtocolConjPort;
+
+void CommunicationProtocolConjPort_sendData(const CommunicationProtocolConjPort* self);
+void CommunicationProtocolConjPort_sendData2(const 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 7683d9062..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,31 +1,31 @@
-/**
- * @author generated by eTrice
- *
- * Source File of DataClass DataClass1
- *
- */
-
-#include "DataClass1.h"
-
-#include <string.h>
-
-//--------------------- begin user code
- // usercode3
-//--------------------- end user code
-
-// TODO: do we need setters and getters for C and C++ ?
-
-//--------------------- operations
-int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value) {
- return self->Attr1*value;
-}
-float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value) {
- return self->Attr3*value;
-}
-
-// deep copy
-void DataClass1_deepCopy(DataClass1* source, DataClass1* target) {
- memcpy(target, source, sizeof(DataClass1));
-}
-
-
+/**
+ * @author generated by eTrice
+ *
+ * Source File of DataClass DataClass1
+ *
+ */
+
+#include "DataClass1.h"
+
+#include <string.h>
+
+//--------------------- begin user code
+ // usercode3
+//--------------------- end user code
+
+// TODO: do we need setters and getters for C and C++ ?
+
+//--------------------- operations
+int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value) {
+ return self->Attr1*value;
+}
+float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value) {
+ return self->Attr3*value;
+}
+
+// deep copy
+void DataClass1_deepCopy(DataClass1* source, DataClass1* target) {
+ memcpy(target, source, sizeof(DataClass1));
+}
+
+
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 948491f86..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,40 +1,40 @@
-/**
- * @author generated by eTrice
- *
- * Header File of DataClass DataClass1
- *
- */
-
-#ifndef _DATACLASS1_H_
-#define _DATACLASS1_H_
-
-#include "etDatatypes.h"
-
-/* TODO: includes only for used DataClasses, also for other models */
-#include "DataClass2.h"
-
-//--------------------- begin user code
- // usercode1
-//--------------------- end user code
-
-typedef struct {
- //--------------------- begin user code
- // usercode2
- //--------------------- end user code
- //--------------------- attributes
- int32 Attr1;
- DataClass2 ComplexAttr;
- float32 Attr3;
-} DataClass1;
-
-// TODO: do we need setters and getters for C and C++ ?
-
-//--------------------- operations
-int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value);
-float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value);
-
-// deep copy
-void DataClass1_deepCopy(DataClass1* source, DataClass1* target);
-
-#endif /* _DATACLASS1_H_ */
-
+/**
+ * @author generated by eTrice
+ *
+ * Header File of DataClass DataClass1
+ *
+ */
+
+#ifndef _DATACLASS1_H_
+#define _DATACLASS1_H_
+
+#include "etDatatypes.h"
+
+/* TODO: includes only for used DataClasses, also for other models */
+#include "DataClass2.h"
+
+//--------------------- begin user code
+ // usercode1
+//--------------------- end user code
+
+typedef struct {
+ //--------------------- begin user code
+ // usercode2
+ //--------------------- end user code
+ //--------------------- attributes
+ int32 Attr1;
+ DataClass2 ComplexAttr;
+ float32 Attr3;
+} DataClass1;
+
+// TODO: do we need setters and getters for C and C++ ?
+
+//--------------------- operations
+int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value);
+float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value);
+
+// deep copy
+void DataClass1_deepCopy(DataClass1* source, DataClass1* target);
+
+#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 1fd7e1572..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,25 +1,25 @@
-/**
- * @author generated by eTrice
- *
- * Source File of DataClass DataClass2
- *
- */
-
-#include "DataClass2.h"
-
-#include <string.h>
-
-
-// TODO: do we need setters and getters for C and C++ ?
-
-//--------------------- operations
-void DataClass2_Operation1(DataClass2* self) {
- /*nothing to do*/
-}
-
-// deep copy
-void DataClass2_deepCopy(DataClass2* source, DataClass2* target) {
- memcpy(target, source, sizeof(DataClass2));
-}
-
-
+/**
+ * @author generated by eTrice
+ *
+ * Source File of DataClass DataClass2
+ *
+ */
+
+#include "DataClass2.h"
+
+#include <string.h>
+
+
+// TODO: do we need setters and getters for C and C++ ?
+
+//--------------------- operations
+void DataClass2_Operation1(DataClass2* self) {
+ /*nothing to do*/
+}
+
+// deep copy
+void DataClass2_deepCopy(DataClass2* source, DataClass2* target) {
+ memcpy(target, source, sizeof(DataClass2));
+}
+
+
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 4b1f3164f..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,32 +1,32 @@
-/**
- * @author generated by eTrice
- *
- * Header File of DataClass DataClass2
- *
- */
-
-#ifndef _DATACLASS2_H_
-#define _DATACLASS2_H_
-
-#include "etDatatypes.h"
-
-/* TODO: includes only for used DataClasses, also for other models */
-
-
-typedef struct {
- //--------------------- attributes
- int32 Attr1;
- float32 Attr2;
- int32 Attr3;
-} DataClass2;
-
-// TODO: do we need setters and getters for C and C++ ?
-
-//--------------------- operations
-void DataClass2_Operation1(DataClass2* self);
-
-// deep copy
-void DataClass2_deepCopy(DataClass2* source, DataClass2* target);
-
-#endif /* _DATACLASS2_H_ */
-
+/**
+ * @author generated by eTrice
+ *
+ * Header File of DataClass DataClass2
+ *
+ */
+
+#ifndef _DATACLASS2_H_
+#define _DATACLASS2_H_
+
+#include "etDatatypes.h"
+
+/* TODO: includes only for used DataClasses, also for other models */
+
+
+typedef struct {
+ //--------------------- attributes
+ int32 Attr1;
+ float32 Attr2;
+ int32 Attr3;
+} DataClass2;
+
+// TODO: do we need setters and getters for C and C++ ?
+
+//--------------------- operations
+void DataClass2_Operation1(DataClass2* self);
+
+// deep copy
+void DataClass2_deepCopy(DataClass2* source, DataClass2* target);
+
+#endif /* _DATACLASS2_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
index c18925fda..0906c5e5d 100644
--- 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
@@ -1,26 +1,2 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ActorClass ReceiverManual
- *
- */
-
-#include "ReceiverManual.h"
-
-#include "etLogger.h"
-
-#include "etMSCLogger.h"
-
-
-void ReceiverManual_init(ReceiverManual* self){
- ET_MSC_LOGGER_SYNC_ENTRY("ReceiverManual", "init")
- CommunicationProtocolPort_receivedData(&self->constData->dataIn);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void ReceiverManual_ReceiveMessage(void* self, etInt16 localId, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("ReceiverManual", "ReceiveMessage")
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
+#include "ReceiverManual.h"
+
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
index 76e82d9f8..c5b9549ad 100644
--- 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
@@ -1,40 +1,72 @@
-/**
- * @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_init(ReceiverManual* self);
-
-void ReceiverManual_ReceiveMessage(void* self, etInt16 localId, const etMessage* msg);
-
-
-
-
-#endif /* _RECEIVERMANUAL_H_ */
-
+#ifndef _ReceiverManual_H_
+#define _ReceiverManual_H_
+
+#include "etDatatypes.h"
+
+//package cGenRef;
+
+
+
+
+#include "CommunicationProtocol.h"
+
+
+
+public class ReceiverManual extends ActorClassBase {
+
+
+ //--------------------- ports
+ protected CommunicationProtocolPort dataIn = null;
+ //--------------------- saps
+ //--------------------- services
+
+ //--------------------- interface item IDs
+ protected static final int IFITEM_dataIn = 1;
+
+ //--------------------- attributes
+ //--------------------- operations
+
+ //--------------------- construction
+ public ReceiverManual(IRTObject parent, String name, Address[][] port_addr, Address[][] peer_addr){
+ super(parent, name, port_addr[0][0], peer_addr[0][0]);
+ setClassName("ReceiverManual");
+
+ // initialize attributes
+
+ // own ports
+ dataIn = new CommunicationProtocolPort(this, "dataIn", IFITEM_dataIn, 0, port_addr[IFITEM_dataIn][0], peer_addr[IFITEM_dataIn][0]);
+ // own saps
+ // own service implementations
+ }
+
+
+ //--------------------- lifecycle functions
+ public void init(){
+ initUser();
+ }
+
+ public void start(){
+ startUser();
+ }
+
+ public void stop(){
+ stopUser();
+ }
+
+ public void destroy(){
+ destroyUser();
+ }
+
+ //--------------------- no state machine
+ @Override
+ public void receiveEvent(InterfaceItemBase ifitem, int evt, Object data) {
+ handleSystemEvent(ifitem, evt, data);
+ }
+
+ @Override
+ public void executeInitTransition(){
+ }
+};
+
+#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
index 429f523d8..27e587469 100644
--- 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
@@ -1,27 +1,2 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ActorClass SenderManual
- *
- */
-
-#include "SenderManual.h"
-
-#include "etLogger.h"
-
-#include "etMSCLogger.h"
-
-
-void SenderManual_init(SenderManual* self){
- ET_MSC_LOGGER_SYNC_ENTRY("SenderManual", "init")
- CommunicationProtocolConjPort_sendData(&self->constData->dataOut);
- CommunicationProtocolConjPort_sendData2(&self->constData->dataOut);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void SenderManual_ReceiveMessage(void* self, etInt16 localId, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("SenderManual", "ReceiveMessage")
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
+#include "SenderManual.h"
+
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
index c35a55cd4..1f0acf5e4 100644
--- 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
@@ -1,41 +1,78 @@
-/**
- * @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_init(SenderManual* self);
-
-void SenderManual_ReceiveMessage(void* self, etInt16 localId, const etMessage* msg);
-
-
-
-
-#endif /* _SENDERMANUAL_H_ */
-
+#ifndef _SenderManual_H_
+#define _SenderManual_H_
+
+#include "etDatatypes.h"
+
+//package cGenRef;
+
+
+
+#include "DataClass1.h"
+
+#include "CommunicationProtocol.h"
+
+
+
+public class SenderManual extends ActorClassBase {
+
+
+ //--------------------- ports
+ protected CommunicationProtocolConjPort dataOut = null;
+ //--------------------- saps
+ //--------------------- services
+
+ //--------------------- interface item IDs
+ protected static final int IFITEM_dataOut = 1;
+
+ //--------------------- attributes
+ int32 attribute1;
+ DataClass1 attribute2;
+ //--------------------- operations
+ void SenderManual_operation1(SenderManual* self, int32 argument1, DataClass1 argument2);
+
+ //--------------------- construction
+ public SenderManual(IRTObject parent, String name, Address[][] port_addr, Address[][] peer_addr){
+ super(parent, name, port_addr[0][0], peer_addr[0][0]);
+ setClassName("SenderManual");
+
+ // initialize attributes
+ attribute1 = 0;
+ attribute2 = new DataClass1();
+
+ // own ports
+ dataOut = new CommunicationProtocolConjPort(this, "dataOut", IFITEM_dataOut, 0, port_addr[IFITEM_dataOut][0], peer_addr[IFITEM_dataOut][0]);
+ // own saps
+ // own service implementations
+ }
+
+
+ //--------------------- lifecycle functions
+ public void init(){
+ initUser();
+ }
+
+ public void start(){
+ startUser();
+ }
+
+ public void stop(){
+ stopUser();
+ }
+
+ public void destroy(){
+ destroyUser();
+ }
+
+ //--------------------- no state machine
+ @Override
+ public void receiveEvent(InterfaceItemBase ifitem, int evt, Object data) {
+ handleSystemEvent(ifitem, evt, data);
+ }
+
+ @Override
+ public void executeInitTransition(){
+ }
+};
+
+#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 63cf04923..0d24a222c 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
@@ -1,73 +1,73 @@
-/**
- * @author generated by eTrice
- *
- * Source File of SubSystemClass SubSys
- *
- */
-
-#include "SubSys.h"
-
-/* include instances for all classes */
-#include "SubSys_Inst.h"
-
-#include "etLogger.h"
-#include "etMSCLogger.h"
-
-
-/* data for SubSysten SubSys */
-typedef struct SubSys {
- char *name;
-} SubSys;
-
-static SubSys SubSysInst = {"SubSys"};
-
-void SubSys_initActorInstances(void);
-
-void SubSys_init(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "init")
- etLogger_logInfoF("%s_init", SubSysInst.name);
-
- /* initialization of all message services */
- etMessageService_init(&msgService_Thread1, msgBuffer_Thread1, MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE);
-
- /* init all actors */
- SubSys_initActorInstances();
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_start(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "start")
- etLogger_logInfoF("%s_start", SubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_run(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "run")
- int32 i;
- for (i=0; i<100; i++){
- etLogger_logInfoF("%s Scheduler tick %d", SubSysInst.name, i);
- etMessageService_execute(&msgService_Thread1);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_stop(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "stop")
- etLogger_logInfoF("%s_stop", SubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_destroy(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "destroy")
- etLogger_logInfoF("%s_destroy", SubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSys_initActorInstances(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "initActorInstances")
- ReceiverManual_init(&_SubSys_Receiver);
- SenderManual_init(&_SubSys_Sender);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
+/**
+ * @author generated by eTrice
+ *
+ * Source File of SubSystemClass SubSys
+ *
+ */
+
+#include "SubSys.h"
+
+/* include instances for all classes */
+#include "SubSys_Inst.h"
+
+#include "etLogger.h"
+#include "etMSCLogger.h"
+
+
+/* data for SubSysten SubSys */
+typedef struct SubSys {
+ char *name;
+} SubSys;
+
+static SubSys SubSysInst = {"SubSys"};
+
+void SubSys_initActorInstances(void);
+
+void SubSys_init(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "init")
+ etLogger_logInfoF("%s_init", SubSysInst.name);
+
+ /* initialization of all message services */
+ etMessageService_init(&msgService_Thread1, msgBuffer_Thread1, MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE);
+
+ /* init all actors */
+ SubSys_initActorInstances();
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void SubSys_start(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "start")
+ etLogger_logInfoF("%s_start", SubSysInst.name);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void SubSys_run(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "run")
+ int32 i;
+ for (i=0; i<100; i++){
+ etLogger_logInfoF("%s Scheduler tick %d", SubSysInst.name, i);
+ etMessageService_execute(&msgService_Thread1);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void SubSys_stop(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "stop")
+ etLogger_logInfoF("%s_stop", SubSysInst.name);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void SubSys_destroy(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "destroy")
+ etLogger_logInfoF("%s_destroy", SubSysInst.name);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void SubSys_initActorInstances(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "initActorInstances")
+ ReceiverManual_init(&_SubSys_Receiver);
+ SenderManual_init(&_SubSys_Sender);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
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 7bd1b52eb..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
@@ -1,27 +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); /* lifecycle run */
-
-void SubSys_stop(void); /* lifecycle stop */
-void SubSys_destroy(void); /* lifecycle destroy */
-
-
-#endif /* _SUBSYS_H_ */
-
-
+/**
+ * @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); /* lifecycle run */
+
+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_Disp.h b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Disp.h
new file mode 100644
index 000000000..50a4f0d20
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/SubSys_Disp.h
@@ -0,0 +1,27 @@
+/**
+ * @author generated by eTrice
+ *
+ * Dispatcher File of SubSystemClass SubSys
+ * - one generated dispatcher for each MessageService (Thread)
+ */
+
+#include "etMessageReceiver.h"
+#include "etLogger.h"
+
+void MsgService_Thread1_ReceiveMessage(const etMessage* msg){
+ switch(msg->address){
+
+ /* interface items of /SubSys/Receiver */
+ case 102:
+ etPort_receive(&/SubSys/Receiver_const.dataIn, msg);
+ break;
+ /* interface items of /SubSys/Sender */
+ case 104:
+ etPort_receive(&/SubSys/Sender_const.dataOut, msg);
+ break;
+
+ default:
+ etLogger_logErrorF("MessageService_Thread1_ReceiveMessage: address %d does not exist ", msg->address);
+ break;
+ }
+}
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
index 446338db6..a699a676b 100644
--- 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
@@ -1,54 +1,56 @@
-/**
- * @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, ReceiverManual_ReceiveMessage, &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, SenderManual_ReceiveMessage, &msgService_Thread1, 1, 123} /* Port dataOut */
-
-};
-static SenderManual _SubSys_Sender = {&_SubSys_Sender_const};
-
-
-
+/**
+ * @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 "ReceiverManual.h"
+#include "SenderManual.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, ReceiverManual_ReceiveMessage, &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, SenderManual_ReceiveMessage, &msgService_Thread1, 1, 123} /* Port dataOut */
+
+};
+static SenderManual _SubSys_Sender = {&_SubSys_Sender_const};
+
+
+
+
+
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
index 8ea034db1..b0b586b8b 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/SubSys_Runner.c
@@ -1,41 +1,41 @@
-/**
- * @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"
-#include "etMSCLogger.h"
-
-
-/**
- * main function
- * creates component and starts and stops the lifecycle
- */
-
-int main(void) {
-
- etLogger_logInfo("*** T H E B E G I N ***");
- ET_MSC_LOGGER_OPEN("main");
-
- /* 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 */
-
- ET_MSC_LOGGER_CLOSE
- etLogger_logInfo("*** T H E E N D ***");
-
- return 0;
-}
-
+/**
+ * @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"
+#include "etMSCLogger.h"
+
+
+/**
+ * main function
+ * creates component and starts and stops the lifecycle
+ */
+
+int main(void) {
+
+ etLogger_logInfo("*** T H E B E G I N ***");
+ ET_MSC_LOGGER_OPEN("main");
+
+ /* 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 */
+
+ ET_MSC_LOGGER_CLOSE
+ etLogger_logInfo("*** T H E E N D ***");
+
+ return 0;
+}
+

Back to the top