Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsself transitions
https://www.eclipse.org/forums/index.php/mv/msg/452350/1006379/#msg_1006379
How do others implement self transitions? I would love to see even one small working example.
thanks,
-tim
]]>Tim Born2013-01-31T07:58:44-00:00Re: self transitions
https://www.eclipse.org/forums/index.php/mv/msg/452350/1006421/#msg_1006421
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
]]>Thomas Schuetz2013-01-31T10:28:51-00:00Re: self transitions
https://www.eclipse.org/forums/index.php/mv/msg/452350/1006566/#msg_1006566
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]]>Thomas Jung2013-01-31T19:07:54-00:00Re: self transitions
https://www.eclipse.org/forums/index.php/mv/msg/452350/1007647/#msg_1007647
best,
-tim]]>Tim Born2013-02-06T21:16:50-00:00