![]() |
![]() |
![]() |
![]() |
![]() |
Tracing, Logging and Viewing Facilities
In the Explorer, the same kind of commands as in the Simulator are available for tracing the execution, logging the user interaction and examining the system. There are a few differences, described below.
Tracing the Execution
Textual Trace
In the Explorer, the same type of printed trace information is available for executed transitions as in the Simulator; see Textual Trace. Unlike the Simulator, however, there is no command to start continuously printing the textual trace; instead, a command must be explicitly used whenever a trace is wanted.
- To print a textual trace for the transitions leading to the current state, enter the command Print-Trace, followed by the number of transitions to trace. That is, Print-Trace 1 prints the trace for the latest transition. The same information as for a full trace during simulation is printed.
- By default, the command Print-Trace 1 is executed in the Command window of the Explorer UI, i.e., a continuous trace is in practice available in graphical mode.
Graphical SDL Trace
Graphical trace of SDL symbols in the source GR diagrams is available. The graphical trace in the Explorer selects all symbols that were executed in the transition leading to the current state. This is different from the Simulator, where GR trace selects the next symbol to be executed.
- To enable or disable continuous graphical trace, enter the command SDL-Trace. This command toggles the graphical trace; the current state of the trace is printed after the command is executed. When the trace first is enabled, an SDL Editor is opened as soon as the next transition is executed.
- In the Explorer UI, the graphical trace can be controlled from the Commands menu. The command Toggle SDL Trace toggles the trace between enabled and disabled.
MSC Trace
MSC trace enables tracing of executed events in an MSC Editor. When the trace first is enabled, an MSC Editor is opened, showing the events executed up until the current state, and the current path is set up. After that, the trace is continuously updated in the MSC Editor as transitions are executed. This means that events are added when you navigate down the behavior tree, the selected event is changed when you navigate up, and the MSC is redrawn when you move outside the current path.
- To enable or disable continuous MSC trace, enter the command MSC-Trace. This command toggles the trace; the current state of the trace is printed after the command is executed.
- In the Explorer UI, the MSC trace can be controlled from the Commands menu. The command Toggle MSC Trace toggles the trace between enabled and disabled.
The MSC trace from the current root to the current state can also be saved on a log file, which later may be opened from an MSC Editor. To save such an MSC log, enter the command MSC-Log-File, followed by the file name. The MSC log file should be given the file extension .mpr.
Before an MSC trace is started, you may define what types of events that will be traced. See MSC Trace Options for more information.
Logging the User Interaction
The interaction between the user and the Explorer can be logged on file in exactly the same way as in the Simulator. See Logging the User Interaction for more information.
Examining the System
The current state of the system can be examined in the same way as in the Simulator. The View commands available in the View module of the Explorer UI are generally the same ones as in the View module of the Simulator UI.
Current Process and Scope
Some of the commands used for examining the system operate on a specific process instance, the current process, identified by the current scope. A scope is a reference to a process instance, a reference to a service instance if the process contains services, and possibly a reference to a procedure instance called from this process/service (the current procedure).
The scope is automatically set by the explorer to the process instance that executed in the transition leading to the current system state. You may change the scope if you would like to examine another process, service or procedure instance.
- To print the current process/service scope, click the Scope button in the View module, or enter the command Scope.
- To set the current process/service scope:
- Click the Set Scope button in the View module, or enter the command Set-Scope. This command takes one parameter, a process instance, and optionally if the process contains services, a second parameter which specifies a service name.
- Select or enter the name of a process instance.
- If the process instance contains services, select or enter the name of a service instance.
- The scope is set to the specified process/service, at the bottom procedure call.
- To print the procedure call stack for the process/service instance defined by the current scope, click the Call Stack button in the View module, or enter the command Stack.
- To change the procedure scope within the current process/service scope, you can move the scope one step up or down in the procedure call stack. Click the Up or Down button in the View module, or enter the command Scope-Up or Scope-Down. Going up from a service leads to the process containing the service. To go down in a service within a process, select or enter the name of the service instance.
Commands to Examine the System
The available commands are shortly described below. See Examining the System for more information.
- To list the process instances in the ready queue, enter the command List-Ready-Queue, or click the Ready Q button.
- To print overview information about process instances, enter the command List-Process, or click the Process List button.
- To examine a process instance, enter the command Examine-PId, or click the Process button. The process instance must be specified as the first parameter.
- To list all signal instances in the input port of a process instance, enter the command List-Input-Port, or click the Input Port button. The process instance must be specified as the first parameter.
- To examine a signal in the input port of a process instance, enter the command Examine-Signal-Instance, or click the Signal button. The process instance must be specified as the first parameter.
- To list all currently active timers, enter the command List-Timer, or click the Timer List button.
- To examine a timer instance, enter the command
Examine-Timer-Instance, or click the Timer button.- To examine a variable of a process instance, enter the command
Examine-Variable, or click the Variable button. The process instance must be specified as the first parameter.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |