getting incoming/outcoming events of a protocol object in Papyrus-RT [message #1743279] |
Tue, 13 September 2016 15:37  |
Eclipse User |
|
|
|
Hi,
Do you have any idea how to get incoming/outcoming events (or signals) of a protocol object in Papyrus-RT?
for instance, in RSA-RTE we do the following:
Collection<RTInheritableEvent> events;
events = port.getProtocol().getAllOutEvents();
events = port.getProtocol().getAllInEvents();
to get in/out signals.
we can reach protocol of a port in Papyrus-RT using:
Protocol protocol = port.getType();
but protocol object does not have anything meaningful to what I need.
Thanks for any idea.
|
|
|
Re: getting incoming/outcoming events of a protocol object in Papyrus-RT [message #1743751 is a reply to message #1743279] |
Mon, 19 September 2016 08:48  |
Eclipse User |
|
|
|
Hi,
Have a look at the ProtocolUtils and MessageUtils classes in the org.eclipse.papyrusrt.umlrt.core.utils package.
You can use ProtocolUtils::getRTMessages(...) to get all of the in, out, or inout (note this third direction kind in Papyrus-RT) messages of a protocol. Then MessageUtils::getCallEvent(...) to get the call event that can be used, for example, to trigger a state transition on any of these messages.
HTH,
Christian
|
|
|
Powered by
FUDForum. Page generated in 0.14210 seconds