123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?xml version="1.0" ?>
- <diagram author="Glenn De Jonghe" name="TestInstate">
- <description>
- Testing the INSTATE macro.
- </description>
- <outport name="test_output" />
- <class name="Class1" default="true">
- <scxml>
- <parallel id="parallel_1">
- <state id="orthogonal1" initial="state1">
- <state id="state1">
- <transition event="to_inner" target="../inner"/>
- </state>
- <state id="inner" initial="state2">
- <state id="state2">
- <transition event="to_state3" target="../state3"/>
- </state>
- <state id="state3"/>
- </state>
- </state>
- <state id="orthogonal2" initial="tester">
- <state id="tester">
- <transition cond="INSTATE('/parallel_1/orthogonal1/state1')" target=".">
- <raise port="test_output" event="check1"/>
- <raise event="to_inner"/>
- </transition>
- <transition cond="INSTATE('/parallel_1/orthogonal1/inner/state2')" target=".">
- <raise port="test_output" event="check2"/>
- <raise event="to_state3"/>
- </transition>
- <transition cond="INSTATE('/parallel_1/orthogonal1/inner/state3')" target="../stop">
- <raise port="test_output" event="check3"/>
- </transition>
- </state>
- <state id="stop"/>
- </state>
- </parallel>
- </scxml>
- </class>
- <test>
- <expected>
- <slot>
- <event name="check1" port="test_output"/>
- </slot>
- <slot>
- <event name="check2" port="test_output"/>
- </slot>
- <slot>
- <event name="check3" port="test_output"/>
- </slot>
- </expected>
- </test>
- </diagram>
|