Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c
index a1e734618..1eff66694 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.c
@@ -1,45 +1,45 @@
-/*******************************************************************************
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "modelbase/etPort.h"
-
-#include "debugging/etMSCLogger.h"
-#include "osal/etMemory.h"
-#include <string.h>
-
-/*
-void etPort_receive(const etPort* self, const etMessage* msg) {
- ET_MSC_LOGGER_SYNC_ENTRY("etPort", "receive")
- if (self->receiveMessageFunc!=NULL)
- (self->receiveMessageFunc)(self->myActor, (void*)self, msg);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-*/
-
-void etPort_sendMessage(const etPort* self, etInt16 evtId, int size, void* data) {
- int offset = MEM_CEIL(sizeof(etMessage));
- int totalSize = offset+size;
- etMessage* msg = NULL;
- ET_MSC_LOGGER_SYNC_ENTRY("etPort", "sendMessage")
- msg = etMessageService_getMessageBuffer(self->msgService, totalSize);
- if (msg!=NULL) {
- msg->address = self->peerAddress;
- msg->evtID = evtId;
-
- if (size>0 && data!=NULL) {
- memcpy(((char*)msg)+offset, data, size);
- }
-
- etMessageService_pushMessage(self->msgService, msg);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "modelbase/etPort.h"
+
+#include "debugging/etMSCLogger.h"
+#include "osal/etMemory.h"
+#include <string.h>
+
+/*
+void etPort_receive(const etPort* self, const etMessage* msg) {
+ ET_MSC_LOGGER_SYNC_ENTRY("etPort", "receive")
+ if (self->receiveMessageFunc!=NULL)
+ (self->receiveMessageFunc)(self->myActor, (void*)self, msg);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+*/
+
+void etPort_sendMessage(const etPort* self, etInt16 evtId, int size, void* data) {
+ int offset = MEM_CEIL(sizeof(etMessage));
+ int totalSize = offset+size;
+ etMessage* msg = NULL;
+ ET_MSC_LOGGER_SYNC_ENTRY("etPort", "sendMessage")
+ msg = etMessageService_getMessageBuffer(self->msgService, totalSize);
+ if (msg!=NULL) {
+ msg->address = self->peerAddress;
+ msg->evtID = evtId;
+
+ if (size>0 && data!=NULL) {
+ memcpy(((char*)msg)+offset, data, size);
+ }
+
+ etMessageService_pushMessage(self->msgService, msg);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}

Back to the top