Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-02-19 12:59:31 +0000
committerThomas Schuetz2012-02-19 12:59:31 +0000
commitee42f0a62cd3443d25aab12f7a8703ae7d58e3b6 (patch)
treec17ab2284a5f73dfd6758f017a4c153276952a26 /runtime
parente30f9cc595fb5d8ccbb4006b486dbbed7567085c (diff)
downloadorg.eclipse.etrice-ee42f0a62cd3443d25aab12f7a8703ae7d58e3b6.tar.gz
org.eclipse.etrice-ee42f0a62cd3443d25aab12f7a8703ae7d58e3b6.tar.xz
org.eclipse.etrice-ee42f0a62cd3443d25aab12f7a8703ae7d58e3b6.zip
[runtime] added LowWaterMark for Message Service
Diffstat (limited to 'runtime')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.abin129592 -> 130350 bytes
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c6
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h5
5 files changed, 12 insertions, 3 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a b/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
index 9ee693e9a..837d3c6c3 100644
--- a/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
+++ b/runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.a
Binary files differ
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.c b/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.c
index 2e2e7edf6..639798bc6 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.c
@@ -92,7 +92,7 @@ etBool etMessageQueue_isNotEmpty(etMessageQueue* self){
return self->last != NULL;
}
-etInt16 etMessageQueue_getHightWaterMark(etMessageQueue* self) {
+etInt16 etMessageQueue_getHighWaterMark(etMessageQueue* self) {
ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "getHightWaterMark")
ET_MSC_LOGGER_SYNC_EXIT
return self->highWaterMark;
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.h b/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.h
index f08b19901..a303146ec 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etMessageQueue.h
@@ -36,7 +36,7 @@ etMessage* etMessageQueue_getLast(etMessageQueue* self);
etBool etMessageQueue_isNotEmpty(etMessageQueue* self);
-etInt16 etMessageQueue_getHightWaterMark(etMessageQueue* self);
+etInt16 etMessageQueue_getHighWaterMark(etMessageQueue* self);
etInt16 etMessageQueue_getSize(etMessageQueue* self);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c b/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c
index 7af1c4bf7..10e2fe00c 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c
@@ -95,3 +95,9 @@ void etMessageService_execute(etMessageService* self){
ET_MSC_LOGGER_SYNC_EXIT
}
+etInt16 etMessageService_getMessagePoolLowWaterMark(etMessageService* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("etMessageService", "getMessagePoolLowWaterMark")
+ etInt16 lowWaterMark = self->messageBuffer.maxBlocks - etMessageQueue_getHighWaterMark(&self->messageQueue);
+ ET_MSC_LOGGER_SYNC_EXIT
+ return lowWaterMark;
+}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h b/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h
index b7c46060c..5997363d1 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h
@@ -38,10 +38,13 @@ void etMessageService_initMessagePool(etMessageService* self);
void etMessageService_pushMessage(etMessageService* self, etMessage* msg);
etMessage* etMessageService_popMessage(etMessageService* self);
-
etMessage* etMessageService_getMessageBuffer(etMessageService* self, etUInt16 size);
void etMessageService_returnMessageBuffer(etMessageService* self, etMessage* buffer);
void etMessageService_execute(etMessageService* self);
+/* functions for debug and service information */
+etInt16 etMessageService_getMessagePoolLowWaterMark(etMessageService* self);
+
+
#endif /* RMESSAGESERVICE_H_ */

Back to the top