Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2019-06-28 08:30:42 -0400
committerHenrik Rentz-Reichert2019-06-28 13:56:33 -0400
commita877df88488833e5f057ad56fafaef78171c0c5a (patch)
tree502cb2bc20057f29c3901887f5713f6d8d801893 /runtime/org.eclipse.etrice.runtime.c/src/common/messaging
parent934759368615c62e0133b4b7b214438567f53859 (diff)
downloadorg.eclipse.etrice-a877df88488833e5f057ad56fafaef78171c0c5a.tar.gz
org.eclipse.etrice-a877df88488833e5f057ad56fafaef78171c0c5a.tar.xz
org.eclipse.etrice-a877df88488833e5f057ad56fafaef78171c0c5a.zip
Bug 539945 - Provide C++ option for the C code generator
* runtime.c headers with extern "C" for C++ * generator with switch for C++ file extensions *.cpp/*.hpp * introduced explicit casts where C++ compiler requires them Change-Id: I0aba20a9fde24e1355427bc53b758cee223b9e60
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/common/messaging')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.h4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.h3
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageReceiver.h4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etSystemProtocol.h3
5 files changed, 18 insertions, 0 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.h
index be3978ea3..cc3bbdb9a 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessage.h
@@ -25,6 +25,8 @@
#include "etDatatypes.h"
+ET_EXTERN_C_BEGIN
+
/**
* the message structure
*/
@@ -41,4 +43,6 @@ typedef struct etMessage {
*/
void etMessage_init(etMessage* self);
+ET_EXTERN_C_END
+
#endif /* _ETMESSAGE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.h
index b320cca59..eb3727034 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageQueue.h
@@ -26,6 +26,8 @@
#include "messaging/etMessage.h"
#include <stddef.h>
+ET_EXTERN_C_BEGIN
+
/**
* a data structure for the queue statistics
*/
@@ -131,5 +133,6 @@ etInt16 etMessageQueue_getLowWaterMark(etMessageQueue* self);
*/
void etMessageQueue_resetLowWaterMark(etMessageQueue* self);
+ET_EXTERN_C_END
#endif /* _RMESSAGEQUEUE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageReceiver.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageReceiver.h
index 9f80de5f9..631f57663 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageReceiver.h
@@ -25,6 +25,8 @@
#include "messaging/etMessage.h"
+ET_EXTERN_C_BEGIN
+
/**
* method prototype that receives a message
*
@@ -48,4 +50,6 @@ typedef etBool (*etDispatcherReceiveMessage)(const etMessage* msg);
*/
typedef void (*etDispatcherExecute)(void);
+ET_EXTERN_C_END
+
#endif /* _ETMESSAGERECEIVER_H_ */
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 653eaf53e..1d52a5f3c 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
@@ -33,6 +33,8 @@
#include "osal/etSema.h"
#include "osal/etTimer.h"
+ET_EXTERN_C_BEGIN
+
/** the address of the message service */
#define MESSAGESERVICE_ADDRESS 1
/** the base address for other receivers */
@@ -221,4 +223,6 @@ etInt16 etMessageService_getMessagePoolLowWaterMark(etMessageService* self);
void etMessageService_registerHighPrioFunc(etMessageService* self, etHighPrioFunc* func);
void etMessageService_unregisterHighPrioFunc(etMessageService* self, etHighPrioFunc* func);
+ET_EXTERN_C_END
+
#endif /* RMESSAGESERVICE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etSystemProtocol.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etSystemProtocol.h
index 260e15608..398079be9 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etSystemProtocol.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etSystemProtocol.h
@@ -11,6 +11,8 @@
#include "etDatatypes.h"
#include "modelbase/etPort.h"
+ET_EXTERN_C_BEGIN
+
/* message IDs */
enum etSystemProtocol_msg_ids {
etSystemProtocol_MSG_MIN = 0,
@@ -46,6 +48,7 @@ etInt32 etSystemProtocolConjReplPort_getReplication(const etSystemProtocolConjRe
/* get message string for message id */
const char* etSystemProtocol_getMessageString(int msg_id);
+ET_EXTERN_C_END
#endif /* _ETSYSTEMPROTOCOL_H_ */

Back to the top