Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » eTrice » self transitions
self transitions [message #1006379] Thu, 31 January 2013 07:58 Go to next message
Tim Born is currently offline Tim BornFriend
Messages: 15
Registered: October 2012
Junior Member
I've been having a look in the documentation and examples, I can't seem to work out how one would implement a self transition. As shown in the MSC below, sometimes you want to send a message to yourself. I've tried internal ports and interface ports, but it behaves as if the loopback wiring is missing.

How do others implement self transitions? I would love to see even one small working example.

thanks,
-tim
  • Attachment: shot1.png
    (Size: 22.56KB, Downloaded 496 times)
Re: self transitions [message #1006421 is a reply to message #1006379] Thu, 31 January 2013 10:28 Go to previous messageGo to next message
Thomas Schuetz is currently offline Thomas SchuetzFriend
Messages: 31
Registered: January 2010
Member
Hello Tim,
I understand the problem, but imho in most cases you can avoid the problem. The solution would be an internal loop back binding (connecting two internal ports) which would keep it an implementation detail of the actor.
This is not so hard to implement, but we would like to avoid that if possible:
With this feature you can make while loops on Statemachine/Messaging level. You could do something similar by either looping (blocking!) in the detail code (e.g. entry code) or with a timer service to avoid the blocking of other messages. The timer approach also needs much less performance and gives you a call with always the same timebase. The loop back solution would also kill the responsiveness of the thread, since all free cpu power would go into sending and receiving the same message (like a while loop).
You can find the timer service in org.eclipse.etrice.modellib.java/models/TimingService.room and the tutorial here: http://eclipse.org/etrice/documentation/doc/etrice.html#ImporttheTimingService

If you still need this feature, please let us know, since it is not so hard to implement. We just want to keep conceptual integrity.
Also let us know how urgent it is.

- Thomas
Re: self transitions [message #1006566 is a reply to message #1006421] Thu, 31 January 2013 19:07 Go to previous messageGo to next message
Thomas Jung is currently offline Thomas JungFriend
Messages: 12
Registered: February 2011
Junior Member
Hi Tim,

i know this feature from OT. In OT you can do both, internal and external loop back binding. I used this feature very seldom.

In eTrice you can at least create an Actor which simply mirrors a message. You can connect this Actor to an internal (or external) port to generate a message to your own FSM.

The disadvantage of this solution is that you need a few more recources (performance, code). So, if this is acceptable for you, you can take this as a workaround.

All the logical aspects (kill the responsiveness of the thread) are the same as with a loop back binding.

Best Regards
Thomas
Re: self transitions [message #1007647 is a reply to message #1006566] Wed, 06 February 2013 21:16 Go to previous message
Tim Born is currently offline Tim BornFriend
Messages: 15
Registered: October 2012
Junior Member
Thanks Thomas. It's nice to know my "little Mr. Echo" actor work-around is a known idiom. That makes me feel a little better anyway. Also knowing I can stop looking helps too.

best,
-tim
Previous Topic:Customized Code Generation
Next Topic:generating code for Keil compiler
Goto Forum:
  


Current Time: Sat Apr 20 03:29:13 GMT 2024

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

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

Back to the top