Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » sending to an unconnected port
sending to an unconnected port [message #1782554] Mon, 26 February 2018 12:40 Go to next message
Juergen Dingel is currently offline Juergen DingelFriend
Messages: 42
Registered: January 2015
Member
Hi,

sending a message to a port that has no connectors should not result in code that seg faults, right?

Rather, the 'send' statement should return '0'. E.g.,

if ( pingPort.ping().send() ) {
log.log( "ping sent!");
} else {
log.log( "Error sending Ping!");
}


should print the error message.

Did I get this right?

Thanks!

Juergen
Re: sending to an unconnected port [message #1782576 is a reply to message #1782554] Mon, 26 February 2018 16:31 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Correct. Sending a message to an unconnected port should not result in a segfault.

See the attached model as an example. Running the model results in this trace:

[-bash|vagrant@precise32:src] > ./TopMain 
Controller "DefaultController" running.
[Capsule1](State1)
- error: message not sent


So no segfault.

If you are seeing a segfault, there might be a different problem with your model. Try doing a "make clean" and then remake to rule out any linkage issues.


Previous Topic:Thread Assignment
Next Topic:defer/recall
Goto Forum:
  


Current Time: Thu Apr 25 22:19:04 GMT 2024

Powered by FUDForum. Page generated in 0.02455 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top