Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Define a trigger which its signal is set to all incoming messages(Define a trigger which its signal is set to all incoming messages)
Define a trigger which its signal is set to all incoming messages [message #1765034] Mon, 05 June 2017 21:21 Go to next message
Mojtaba Bagherzadeh is currently offline Mojtaba BagherzadehFriend
Messages: 36
Registered: April 2016
Member
Hi,

Currently, there is a way to define a trigger which its signal is any message of a specific protocol.

Is there any way to define a trigger which its signal is set to any message from any protocol (i.e., all incoming messages)?

Thanks
Mojtaba

[Updated on: Tue, 06 June 2017 13:16]

Report message to a moderator

Re: Define a trigger which its signal is set to all incoming messages [message #1765125 is a reply to message #1765034] Tue, 06 June 2017 20:48 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 359
Registered: March 2011
Senior Member
When you create a trigger, you can specify multiple ports. The trigger dialog should show all the capsule ports on the left, with checkboxes. You can check on all of them, and then on the right-pane check * (AnyEvent). This will listen to any event on any of the selected ports.

See the attached example.
  • Attachment: AnyEvent.zip
    (Size: 8.65KB, Downloaded 53 times)
Re: Define a trigger which its signal is set to all incoming messages [message #1765136 is a reply to message #1765125] Tue, 06 June 2017 22:19 Go to previous messageGo to next message
Mojtaba Bagherzadeh is currently offline Mojtaba BagherzadehFriend
Messages: 36
Registered: April 2016
Member
Thanks a lot, Ernesto.
That would be great if we could set "*" at the port level too. it is more user-friendly and I think It can decrease the generated code size.
My issue is that I am trying to defer all messages in some states programmatically, so having "*" at port level can save me some time and make my implementation much easier.
Anyway, for now, I will do what you suggest, but I think it is a good feature to be added. If you agree I can submit a bug.

Thanks
Mojtaba
Re: Define a trigger which its signal is set to all incoming messages [message #1765139 is a reply to message #1765136] Tue, 06 June 2017 23:51 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 359
Registered: March 2011
Senior Member
I'm not sure what you mean by "That would be great if we could set "*" at the port level too. " You can do exactly that when you create a trigger. If you select a port, "*" is the first option. It's the same whereas it's one port or many.

Since its one trigger with one or more ports on the same transition and a transition has only one action, the action is the same for all of these events, and the function generated is one and has UMLRTMessage * msg as parameter to you can do

msg->defer();


Re: Define a trigger which its signal is set to all incoming messages [message #1765141 is a reply to message #1765139] Wed, 07 June 2017 02:23 Go to previous message
Mojtaba Bagherzadeh is currently offline Mojtaba BagherzadehFriend
Messages: 36
Registered: April 2016
Member
I mean to select * for the port. Now we only can select * fro the message. The following figure is what we have now:

index.php/fa/29573/0/

and I mean the following figure which we can set * for port


index.php/fa/29574/0/

[Updated on: Wed, 07 June 2017 02:32]

Report message to a moderator

Previous Topic:Deep copy of the passed message to the action code
Next Topic:setting * as the message of the trigger does not work properly (v0.9)
Goto Forum:
  


Current Time: Wed Nov 14 09:41:37 GMT 2018

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

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

Back to the top