![]() |
![]() |
![]() |
![]() |
![]() |
More Tracing and Viewing Possibilities
In this exercise, we will take a look at some of the additional tracing and viewing possibilities of the SDL Explorer.
What You Will Learn
- To print a complete trace from the start state
- To use the view commands
- To use the MSC trace facility
- To go to a state by using the path commands
Using the View Commands
- Make sure you are still in the same state as after the last step in the previous exercise.
- On the input line of the Explorer UI, enter the command pr-tr 9 (you can use any large number). The trace is printed in the text area of the main window. This trace gives an overview of what has happened in the SDL system so far.
- The SDL Explorer supports the same viewing possibilities as the SDL Simulator. Click the Timer List button in the View module to list the active timer set by the Demon process.
- Examine the GameP variable in the Main process by first setting the scope to the Main process (click the Set Scope button and select the Main process), and then clicking the Variable button and selecting the GameP variable.
Using MSC Trace
In addition to textual and graphical traces, the SDL Explorer can also perform an MSC trace.
- First, turn off SDL trace by selecting Toggle SDL Trace from the Commands menu. Then, turn on MSC trace from the same menu. An MSC Editor is opened, showing a Message Sequence Chart for the trace from the start state to the current state.
- When the MSC appears, execute, with a double-click, one of the signal transitions in the Navigator, e.g. Probe. The message is appended to the MSC (but it is not yet consumed).
- Go up a few levels in the Navigator.
- Go down again, but select a different path than before, i.e., send one of the other signals.
- Toggle MSC trace off in the Commands menu. Unless other MSC diagrams were opened, the MSC Editor is closed.
Going to a State Using Path Commands
You can use the commands Print-Path and Goto-Path to return to a state where you have been before.
- Execute the command Print-Path from the input line. The output represents the path taken in the behavior tree from the start state to the current state.
Command : print-path1 1 1 1 1 3 0
- The numbers in the path are the same as the transition numbers in the Navigator, and the arrow numbers shown in Figure 133.
- Go up a few levels in the Navigator.
- In the text area, locate the path printed by the Print-Path command above (you may have to scroll the text area). On UNIX, select the numbers in the path with the mouse by dragging the mouse to the end of the line. Make sure you select the final zero.
- In the input line, enter goto-path and the path printed by the Print-Path command. On UNIX, paste in the path numbers by positioning the mouse pointer at the end of the entered text and clicking the middle mouse button.
- Hit <Return> to execute the command. You now end up in the previous state.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |