Synchronous send() in UML-RT/Papyrus-RT [message #1782978] |
Mon, 05 March 2018 20:21  |
Eclipse User |
|
|
|
Hi,
Is there an alternate function for "send()" which is synchronous in nature. If there is, could you please share the document that explains how to use this function in Papyrus?
Thank you!
Thanks,
Karthik
|
|
|
Re: Synchronous send() in UML-RT/Papyrus-RT [message #1783179 is a reply to message #1782978] |
Thu, 08 March 2018 15:30   |
Eclipse User |
|
|
|
Hi. I'm assuming that you are talking about Papyrus-RT (this forum), rather than plain Papyrus (which you mention in your message).
There is. It's called "invoke". But unfortunately the RTS doesn't implement it yet. You can find its declaration in the header file "umlrtoutsignal.hh", but it has no implementation in umlrtoutsignal.cc. So it is in the roadmap to eventually add it, but for now, you'll have to emulate synchronous communication with asynchronous messages. In the relevant protocol, define an "acknowledgement" message. In the sender, put the send action in a transition, and from the target state of that transition, create another transition that listens for the "acknowledgement" message. On the receiver, in the transition that accepts the original message, add a send of the acknowledgement to the sender, in the actions of that transition. This is close to emulating a synchronous send (an invoke), but not entirely, as an invoke is executed in a single run-to-completion step, whereas the pattern above divides it into two steps; the sending and the waiting for acknowledgement. There are other semantic differences, but this pattern is common to emulate synchronous message passing.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02566 seconds