Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2013-07-12 08:40:15 +0000
committerThomas Schuetz2013-07-12 08:40:15 +0000
commit12cda553738ca88662624b6f47066b5564549648 (patch)
treebfa65b6c38aa566a5f1cc98395da6546a6c6e282 /runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
parent3447749b1a453735ac54fc09ea7680acdbb19b69 (diff)
parentd65e1d1bdd43feadb43261b85aac2d8aef5e089c (diff)
downloadorg.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.tar.gz
org.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.tar.xz
org.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.zip
Merge remote-tracking branch 'origin/master'
Conflicts: plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip Change-Id: I98e2df3ab57d6e7e8f27e5b0aee7eaa189bfbc33
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h166
1 files changed, 83 insertions, 83 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
index c06898f2b..a59ed2178 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
@@ -1,83 +1,83 @@
-/*******************************************************************************
- * Copyright (c) 2011 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)
- *
- *******************************************************************************/
-
-#ifndef _ETMESSAGESERVICE_H_
-#define _ETMESSAGESERVICE_H_
-
-#include <stddef.h>
-#include "etDatatypes.h"
-#include "messaging/etMessageQueue.h"
-#include "messaging/etMessageReceiver.h"
-
-#include "osal/etMutex.h"
-#include "osal/etThread.h"
-#include "osal/etSema.h"
-#include "osal/etTimer.h"
-
-#define MESSAGESERVICE_ADDRESS 1
-#define BASE_ADDRESS 32
-
-typedef enum etMessageService_execmode {
- EXECMODE_POLLED, EXECMODE_BLOCKED, EXECMODE_MIXED
-} etMessageService_execmode;
-
-typedef struct etBuffer{
- etUInt8 *buffer; /** buffer points to the actual memory position for the message pool */
- etUInt16 maxBlocks; /** number of blocks for the message pool */
- etUInt16 blockSize; /** size of blocks for the message pool */
-} etBuffer;
-
-typedef struct etMessageService {
- etMessageQueue messageQueue; /** message queue that holds all used messages */
- etMessageQueue messagePool; /** message pool that holds all free messages */
- etBuffer messageBuffer; /** information about the message buffer that holds information about the actual memory position and size for the message pool */
- etDispatcherReceiveMessage msgDispatcher; /** function pointer to the generated message dispatcher function */
- etThread thread; /** thread for the execution of the message service */
- etMutex poolMutex; /** mutex for synchronizing the access to the message pool */
- etMutex queueMutex; /** mutex for synchronizing the access to the message queue */
- etSema executionSemaphore; /** semaphore for waiting and waking up the execution */
- etTimer timer; /** timer for cyclic calls */
- etMessageService_execmode execmode; /** execution mode*/
-} etMessageService;
-
-/* lifecycle functions to startup, execute and shutdown the message service */
-void etMessageService_init(
- etMessageService* self,
- etUInt8* buffer,
- etUInt16 maxBlocks,
- etUInt16 blockSize,
- etStacksize stacksize,
- etPriority priority,
- etTime interval,
- etDispatcherReceiveMessage msgDispatcher,
- etMessageService_execmode execmode);
-void etMessageService_start(etMessageService* self);
-void etMessageService_execute(etMessageService* self);
-void etMessageService_stop(etMessageService* self);
-void etMessageService_destroy(etMessageService* self);
-
-/* initialization of message pool */
-void etMessageService_initMessagePool(etMessageService* self);
-
-/* message queue interface for push and pop messages */
-void etMessageService_pushMessage(etMessageService* self, etMessage* msg);
-etMessage* etMessageService_popMessage(etMessageService* self);
-
-/* message pool interface to get and return (push and pop) messages */
-etMessage* etMessageService_getMessageBuffer(etMessageService* self, etUInt16 size);
-void etMessageService_returnMessageBuffer(etMessageService* self, etMessage* buffer);
-
-/* functions for debug and service information */
-etInt16 etMessageService_getMessagePoolLowWaterMark(etMessageService* self);
-
-
-#endif /* RMESSAGESERVICE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2011 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)
+ *
+ *******************************************************************************/
+
+#ifndef _ETMESSAGESERVICE_H_
+#define _ETMESSAGESERVICE_H_
+
+#include <stddef.h>
+#include "etDatatypes.h"
+#include "messaging/etMessageQueue.h"
+#include "messaging/etMessageReceiver.h"
+
+#include "osal/etMutex.h"
+#include "osal/etThread.h"
+#include "osal/etSema.h"
+#include "osal/etTimer.h"
+
+#define MESSAGESERVICE_ADDRESS 1
+#define BASE_ADDRESS 32
+
+typedef enum etMessageService_execmode {
+ EXECMODE_POLLED, EXECMODE_BLOCKED, EXECMODE_MIXED
+} etMessageService_execmode;
+
+typedef struct etBuffer{
+ etUInt8 *buffer; /** buffer points to the actual memory position for the message pool */
+ etUInt16 maxBlocks; /** number of blocks for the message pool */
+ etUInt16 blockSize; /** size of blocks for the message pool */
+} etBuffer;
+
+typedef struct etMessageService {
+ etMessageQueue messageQueue; /** message queue that holds all used messages */
+ etMessageQueue messagePool; /** message pool that holds all free messages */
+ etBuffer messageBuffer; /** information about the message buffer that holds information about the actual memory position and size for the message pool */
+ etDispatcherReceiveMessage msgDispatcher; /** function pointer to the generated message dispatcher function */
+ etThread thread; /** thread for the execution of the message service */
+ etMutex poolMutex; /** mutex for synchronizing the access to the message pool */
+ etMutex queueMutex; /** mutex for synchronizing the access to the message queue */
+ etSema executionSemaphore; /** semaphore for waiting and waking up the execution */
+ etTimer timer; /** timer for cyclic calls */
+ etMessageService_execmode execmode; /** execution mode*/
+} etMessageService;
+
+/* lifecycle functions to startup, execute and shutdown the message service */
+void etMessageService_init(
+ etMessageService* self,
+ etUInt8* buffer,
+ etUInt16 maxBlocks,
+ etUInt16 blockSize,
+ etStacksize stacksize,
+ etPriority priority,
+ etTime interval,
+ etDispatcherReceiveMessage msgDispatcher,
+ etMessageService_execmode execmode);
+void etMessageService_start(etMessageService* self);
+void etMessageService_execute(etMessageService* self);
+void etMessageService_stop(etMessageService* self);
+void etMessageService_destroy(etMessageService* self);
+
+/* initialization of message pool */
+void etMessageService_initMessagePool(etMessageService* self);
+
+/* message queue interface for push and pop messages */
+void etMessageService_pushMessage(etMessageService* self, etMessage* msg);
+etMessage* etMessageService_popMessage(etMessageService* self);
+
+/* message pool interface to get and return (push and pop) messages */
+etMessage* etMessageService_getMessageBuffer(etMessageService* self, etUInt16 size);
+void etMessageService_returnMessageBuffer(etMessageService* self, etMessage* buffer);
+
+/* functions for debug and service information */
+etInt16 etMessageService_getMessagePoolLowWaterMark(etMessageService* self);
+
+
+#endif /* RMESSAGESERVICE_H_ */

Back to the top