For more infomation about this bug, visit
Summary: Unable have event transition with no select statements
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Real-Time Toolkit (RTT)
AssignedTo: orocos-dev [..] ...
ReportedBy: kiwi [dot] net [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
This may not technically be legal ... Was playing with work-arounds for #543,
and found that the following was considered invalid. It's very similar to #178.
{{{
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
transition requestJJPoint2Point(
jjPoint2Point_pose, jjPoint2Point_time)
{
do nAxesGeneratorPos.moveTo(jjPoint2Point_pose,
jjPoint2Point_time)
}
}
}}}
The above produces "Syntactic error: 'select' statement required after event or
transition program" and indicates the second transition is the problem.
[Bug 544] Unable have event transition with no select statements
For more infomation about this bug, visit
Peter Soetens
<peter [dot] soetens [..] ...> changed:
What |Removed |Added
--------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.6.0
--- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-05-09 23:37:31 ---
Patch applied on trunk/rtt.
$ svn ci -m"Fix bug #544: Unable have event transition with no select
statements:
> Rewrote the transition parsing, added unit tests, updated documentation.
> "
Sending rtt/doc/xml/orocos-program-parser.xml
Sending rtt/src/scripting/StateGraphParser.cpp
Sending rtt/src/scripting/StateGraphParser.hpp
Sending rtt/tests/state_test.cpp
Sending rtt/tests/state_test.hpp
Transmitting file data .....
Committed revision 29269.
[Bug 544] Unable have event transition with no select statements
For more infomation about this bug, visit
Peter Soetens
<peter [dot] soetens [..] ...> changed:
What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|orocos- |peter [dot] soetens [..] ...
|dev [..] ... |
--- Comment #1 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-05-09 23:35:43 ---
Created an attachment (id=279)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=279)
Fixes the transitions notation and this bug
Being a paranormal open source case, I was already working on a patch for this.
I've updated the syntax such that it is now valid to write:
transitions {
select X
if c then select X
if c then { do nothing }
if c then { do nothing } select X
myEvent() select X
myEvent() if c then select X
myEvent() if c then {do nothing}
myEvent() if c then {do nothing} select X
}
An alternative notation is also accepted using the 'transition' keyword:
transition select X
transition if c then select X
transition myEvent() select X
etc...
The latter notation is used in the examples in the scripting manual.
Unit tested change.