Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/CommunicationProtocol.c')
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/CommunicationProtocol.c178
1 files changed, 89 insertions, 89 deletions
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/CommunicationProtocol.c b/examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/CommunicationProtocol.c
index 63831f3f3..79947aa6d 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/CommunicationProtocol.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src-gen-ts/cGenRef/CommunicationProtocol.c
@@ -1,89 +1,89 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ProtocolClass CommunicationProtocol
- *
- */
-
-#include "CommunicationProtocol.h"
-#include "debugging/etMSCLogger.h"
-
-
-/*--------------------- port methods */
-
-void CommunicationProtocolPort_receivedData(const CommunicationProtocolPort* self) {
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolPort", "receivedData")
- etPort_sendMessage(self, CommunicationProtocol_OUT_receivedData, 0, NULL);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void CommunicationProtocolReplPort_receivedData_broadcast(const CommunicationProtocolReplPort* self) {
- int i;
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolReplPort", "receivedData")
- for (i=0; i<((etReplPort*)self)->size; ++i) {
- etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), CommunicationProtocol_OUT_receivedData, 0, NULL);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void CommunicationProtocolReplPort_receivedData(const CommunicationProtocolReplPort* self, int idx) {
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolReplPort", "receivedData")
- if (0<=idx && idx<((etReplPort*)self)->size) {
- etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), CommunicationProtocol_OUT_receivedData, 0, NULL);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-// getReplication
-etInt32 CommunicationProtocolReplPort_getReplication(const CommunicationProtocolReplPort* self) {
- return ((etReplPort*)self)->size;
-}
-
-
-
-void CommunicationProtocolConjPort_sendData(const CommunicationProtocolConjPort* self) {
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjPort", "sendData")
- etPort_sendMessage(self, CommunicationProtocol_IN_sendData, 0, NULL);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void CommunicationProtocolConjReplPort_sendData_broadcast(const CommunicationProtocolConjReplPort* self) {
- int i;
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjReplPort", "sendData")
- for (i=0; i<((etReplPort*)self)->size; ++i) {
- etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), CommunicationProtocol_IN_sendData, 0, NULL);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void CommunicationProtocolConjReplPort_sendData(const CommunicationProtocolConjReplPort* self, int idx) {
- ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjReplPort", "sendData")
- if (0<=idx && idx<((etReplPort*)self)->size) {
- etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), CommunicationProtocol_IN_sendData, 0, NULL);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-// getReplication
-etInt32 CommunicationProtocolConjReplPort_getReplication(const CommunicationProtocolConjReplPort* self) {
- return ((etReplPort*)self)->size;
-}
-
-
-
-/*--------------------- debug helpers */
-
-/* message names as strings for debugging (generate MSC) */
-static const char* const CommunicationProtocol_messageStrings[] = {"MIN", "receivedData","sendData", "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 "debugging/etMSCLogger.h"
+
+
+/*--------------------- port methods */
+
+void CommunicationProtocolPort_receivedData(const CommunicationProtocolPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolPort", "receivedData")
+ etPort_sendMessage(self, CommunicationProtocol_OUT_receivedData, 0, NULL);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void CommunicationProtocolReplPort_receivedData_broadcast(const CommunicationProtocolReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolReplPort", "receivedData")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), CommunicationProtocol_OUT_receivedData, 0, NULL);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void CommunicationProtocolReplPort_receivedData(const CommunicationProtocolReplPort* self, int idx) {
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolReplPort", "receivedData")
+ if (0<=idx && idx<((etReplPort*)self)->size) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), CommunicationProtocol_OUT_receivedData, 0, NULL);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+// getReplication
+etInt32 CommunicationProtocolReplPort_getReplication(const CommunicationProtocolReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+void CommunicationProtocolConjPort_sendData(const CommunicationProtocolConjPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjPort", "sendData")
+ etPort_sendMessage(self, CommunicationProtocol_IN_sendData, 0, NULL);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void CommunicationProtocolConjReplPort_sendData_broadcast(const CommunicationProtocolConjReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjReplPort", "sendData")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), CommunicationProtocol_IN_sendData, 0, NULL);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void CommunicationProtocolConjReplPort_sendData(const CommunicationProtocolConjReplPort* self, int idx) {
+ ET_MSC_LOGGER_SYNC_ENTRY("CommunicationProtocolConjReplPort", "sendData")
+ if (0<=idx && idx<((etReplPort*)self)->size) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), CommunicationProtocol_IN_sendData, 0, NULL);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+// getReplication
+etInt32 CommunicationProtocolConjReplPort_getReplication(const CommunicationProtocolConjReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+/*--------------------- debug helpers */
+
+/* message names as strings for debugging (generate MSC) */
+static const char* const CommunicationProtocol_messageStrings[] = {"MIN", "receivedData","sendData", "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];
+ }
+}

Back to the top