Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend')
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
index 39a997cf6..2f450c62e 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
@@ -380,10 +380,13 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
if (getPeerAddress().isValid()) {
««« we have to use a dynamic cast here because we have a virtual base class
Message* buffer = dynamic_cast<IMessageService*>(getPeerMsgReceiver())->getMessageBuffer(sizeof(«messageType»));
+««« // TODO JB: Handle buffer == NULL
if (buffer) {
getPeerMsgReceiver()->receive(«message»);
}
-««« // TODO JB: Handle buffer == NULL
+ else {
+ std::cout << "The message buffer is too small for the message!" << std::endl;
+ }
}
}
'''

Back to the top