For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=543>
Summary: Unable to do self-transition in state machine
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Real-Time Toolkit (RTT)
AssignedTo: orocos-dev at lists [dot] mech [dot] kuleuven [dot] be
ReportedBy: kiwi.net at mac [dot] com
CC: orocos-dev at lists [dot] mech [dot] kuleuven [dot] be
Estimated Hours: 0.0
The following doesn't do the self transition, or is it that state machines
don't exit and then re-enter the state on a self-transition?
state JJ_POINT2POINT
{
entry
{
do nAxesGeneratorPos.start()
do Robot.requestPositionControl()
do nAxesGeneratorPos.moveTo(jjPoint2Point_pose,
jjPoint2Point_time)
}
exit
{
do nAxesGeneratorPos.stop()
}
transition requestSafe() select SAFE
// can run PTP's back to back
transition requestJJPoint2Point(
jjPoint2Point_pose, jjPoint2Point_time) select JJ_POINT2POINT
}

[Bug 543] Unable to do self-transition in state machine
For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=543>
Peter Soetens <peter.soetens at fmtc [dot] be> changed:
What |Removed |Added -------------------------------------------------------------------------- CC| |peter.soetens@fmtc.be--- Comment #1 from Peter Soetens <peter.soetens at fmtc [dot] be> 2008-05-09 23:30:21 ---(In reply to comment #0)
> The following doesn't do the self transition, or is it that state machines
> don't exit and then re-enter the state on a self-transition?
They don't, and it's documented as such. Still I wonder if UML/Standards-wise,
it makes more sense to execute exit and entry upon a self transition. That's
because a self transition otherwise doesn't do much, if it wasn't for executing
the associated transition program, which might rely on the fact that exit and
entry are not executed.
I've once had this discussion with another SW engineer, and their solution was
eventually to distinguish between both cases using a special notation.
In UML this can be easily solved by writing entry and exit programs in a parent
state and the self transition in a child state. As the child re-enters, the
parent's exit and entry programs remain untouched, and the child's transition
program is solely executed. In the other case, if the event transition is
notated on the parent, entry and exit are executed, together with the
transition program...
Any remarks ?
Peter