Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » getting incoming/outcoming events of a protocol object in Papyrus-RT
getting incoming/outcoming events of a protocol object in Papyrus-RT [message #1743279] Tue, 13 September 2016 19:37 Go to next message
reza ahmadi is currently offline reza ahmadiFriend
Messages: 45
Registered: September 2016
Member
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 12:48 Go to previous message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1176
Registered: July 2009
Location: Canada
Senior Member

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
Previous Topic:Create RTMessageSet?
Next Topic:UML2 class of a capsule
Goto Forum:
  


Current Time: Mon Nov 19 08:13:12 GMT 2018

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

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

Back to the top