aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c')
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c89
1 files changed, 89 insertions, 0 deletions
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c
new file mode 100644
index 0000000..63acb37
--- /dev/null
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c
@@ -0,0 +1,89 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass FileReaderProtocol
+ *
+ */
+
+#include "FileReaderProtocol.h"
+#include "debugging/etMSCLogger.h"
+
+
+/*--------------------- port methods */
+
+void FileReaderProtocolPort_nextChar(const FileReaderProtocolPort* self, char data) {
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolPort", "nextChar")
+ etPort_sendMessage(self, FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void FileReaderProtocolReplPort_nextChar_broadcast(const FileReaderProtocolReplPort* self, char data) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolReplPort", "nextChar")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void FileReaderProtocolReplPort_nextChar(const FileReaderProtocolReplPort* self, int idx, char data) {
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolReplPort", "nextChar")
+ if (0<=idx && idx<((etReplPort*)self)->size) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+// getReplication
+etInt32 FileReaderProtocolReplPort_getReplication(const FileReaderProtocolReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+void FileReaderProtocolConjPort_getNextChar(const FileReaderProtocolConjPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjPort", "getNextChar")
+ etPort_sendMessage(self, FileReaderProtocol_IN_getNextChar, 0, NULL);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void FileReaderProtocolConjReplPort_getNextChar_broadcast(const FileReaderProtocolConjReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjReplPort", "getNextChar")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), FileReaderProtocol_IN_getNextChar, 0, NULL);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void FileReaderProtocolConjReplPort_getNextChar(const FileReaderProtocolConjReplPort* self, int idx) {
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjReplPort", "getNextChar")
+ if (0<=idx && idx<((etReplPort*)self)->size) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), FileReaderProtocol_IN_getNextChar, 0, NULL);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+// getReplication
+etInt32 FileReaderProtocolConjReplPort_getReplication(const FileReaderProtocolConjReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+/*--------------------- debug helpers */
+
+/* message names as strings for debugging (generate MSC) */
+static const char* const FileReaderProtocol_messageStrings[] = {"MIN", "nextChar","getNextChar", "MAX"};
+
+const char* FileReaderProtocol_getMessageString(int msg_id) {
+ if (msg_id<FileReaderProtocol_MSG_MIN || msg_id>FileReaderProtocol_MSG_MAX+1){
+ /* id out of range */
+ return "Message ID out of range";
+ }
+ else{
+ return FileReaderProtocol_messageStrings[msg_id];
+ }
+}