Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-02-02 15:43:04 +0000
committerThomas Schuetz2012-02-02 15:43:04 +0000
commit4dd4a99412c8592c4dea41184781ca29b0ee2bd0 (patch)
tree4ff24d4d959d41516f74bee6cdfc4ecbeaa03d29 /runtime
parent01278f0231781124a4c8c0cea8c3879a168e26a6 (diff)
downloadorg.eclipse.etrice-4dd4a99412c8592c4dea41184781ca29b0ee2bd0.tar.gz
org.eclipse.etrice-4dd4a99412c8592c4dea41184781ca29b0ee2bd0.tar.xz
org.eclipse.etrice-4dd4a99412c8592c4dea41184781ca29b0ee2bd0.zip
[generator.c] added generator for dispatcher for each MessageService
Diffstat (limited to 'runtime')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/Debug/liborg.eclipse.etrice.runtime.c.abin129582 -> 129292 bytes
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etDatatypes.h4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etMessageReceiver.h3
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h6
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etPort.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/etPort.h4
7 files changed, 11 insertions, 10 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 9bd33e784..12f2f7741 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/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/etDatatypes.h
index bba9160a4..e49ebf53a 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etDatatypes.h
@@ -38,7 +38,7 @@ typedef float float32;
typedef double float64;
/* boolean datatypes and values */
-typedef char boolean; /* TODO: bool, Bool, Boolean, and boolean are already defined in some platforms*/
+typedef char bool; /* TODO: bool, Bool, Boolean, and boolean are already defined in some platforms*/
#ifndef TRUE
#define TRUE 1
#endif
@@ -59,7 +59,7 @@ typedef uint8 etUInt8;
typedef uint16 etUInt16;
typedef uint32 etUInt32;
-typedef boolean etBool;
+typedef bool etBool;
typedef float32 etFloat32;
typedef float64 etFloat64;
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageReceiver.h b/runtime/org.eclipse.etrice.runtime.c/src/etMessageReceiver.h
index fd88700b8..cc82eb3fe 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etMessageReceiver.h
@@ -17,6 +17,7 @@
#include "etMessage.h"
-typedef void (*etReceiveMessage)(void* self, etInt16 localId, const etMessage*);
+typedef void (*etActorReceiveMessage)(void* self, etInt16 localId, const etMessage* msg);
+typedef void (*etDispatcherReceiveMessage)(const etMessage* msg);
#endif /* _ETMESSAGERECEIVER_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c b/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c
index 8dd93a9ad..e4d58065a 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.c
@@ -79,7 +79,7 @@ void etMessageService_returnMessageBuffer(etMessageService* self, etMessage* buf
void etMessageService_deliverAllMessages(etMessageService* self){
ET_MSC_LOGGER_SYNC_ENTRY("etMessageService", "deliverAllMessages")
- while (self->messageQueue.size > 0){
+ while (etMessageQueue_isNotEmpty(&self->messageQueue)){
etMessage* msg = etMessageService_popMessage(self);
etLogger_logInfoF("Message ID=%d, Address=%d", msg->evtID, msg->address);
etMessageService_returnMessageBuffer(self, msg);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h b/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h
index b17665542..e8a16b284 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etMessageService.h
@@ -18,16 +18,16 @@
#include "etMessageQueue.h"
-typedef struct RBuffer{
+typedef struct etBuffer{
etUInt8 *buffer;
etUInt16 maxBlocks;
etUInt16 blockSize;
-} RBuffer;
+} etBuffer;
typedef struct etMessageService {
etMessageQueue messageQueue;
etMessageQueue messagePool;
- RBuffer messageBuffer;
+ etBuffer messageBuffer;
} etMessageService;
void etMessageService_init(etMessageService* self, etUInt8* buffer, etUInt16 maxBlocks, etUInt16 blockSize);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etPort.c b/runtime/org.eclipse.etrice.runtime.c/src/etPort.c
index 75db77d8d..89edfaafa 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etPort.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etPort.c
@@ -14,7 +14,7 @@
#include "etMSCLogger.h"
-void etPort_receive(etPort* self, etMessage* msg) {
+void etPort_receive(const etPort* self, const etMessage* msg) {
ET_MSC_LOGGER_SYNC_ENTRY("etPort", "receive")
(self->receiveMessageFunc)(self->myActor, self->localId, msg);
ET_MSC_LOGGER_SYNC_EXIT
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/etPort.h b/runtime/org.eclipse.etrice.runtime.c/src/etPort.h
index 7a9cb65a3..f7b4ea81e 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/etPort.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/etPort.h
@@ -22,7 +22,7 @@
typedef struct {
void* myActor;
- etReceiveMessage receiveMessageFunc;
+ etActorReceiveMessage receiveMessageFunc;
etMessageService* msgService;
etAddressId peerAddress;
etAddressId localId;
@@ -33,7 +33,7 @@ typedef struct {
#endif
} etPort;
-void etPort_receive(etPort* self, etMessage* msg);
+void etPort_receive(const etPort* self, const etMessage* msg);

Back to the top