Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c')
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src-gen/cGenRef/CommunicationProtocol.c28
1 files changed, 28 insertions, 0 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
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];
+ }
+}

Back to the top