![]() |
![]() |
![]() |
![]() |
![]() |
Issuing Monitor Commands
Whenever the interactive monitor system becomes active, commands are accepted from the user. When running the simulator in stand-alone mode, commands can only be entered textually from a command prompt. When running the simulator in graphical mode, commands may be issued both textually and through the use of menus and buttons.
Activating the Monitor
The simulator's monitor system becomes active when the simulator is started, when the execution has reached a stop condition or a breakpoint, when the system is completely idle, when a semantic error occurs, or when the execution is manually stopped.
These conditions are listed in greater detail in Activating the Monitor.
The Textual Interface
The commands to the monitor system consist of a command name and possibly one or more parameters to the command, separated by spaces or carriage return. The following general rules apply:
- All command names and parameter values are case insensitive. They may also be abbreviated, as long as they are unique. For instance, the command List-Ready-Queue can be entered in any of the following ways:
List-Ready-Queuelist-readyl-r-q- If not all parameters to a command are given on the command line, the missing parameters will be prompted for. A parameter may be optional, in which case a default value always exists. Default values may also exist for required parameters.
- If you enter an unallowed value for a parameter, an error message is printed and the command is not executed. This is the only way to cancel a command that has been entered.
Getting Command Help
To get a simple list of all possible command names, enter a `?' at the command prompt. A command can then be entered after the list.
To get a list of all commands, grouped into different categories, use the command Help without parameters.
To get a list of all possible commands starting with a certain string, enter the string and hit <Return>. Unless the string was a complete command, all command names starting with the entered string are listed. The following example shows how to list all output commands:
Command : outCommand was ambiguous, it might be an abbreviation of:Output-To Output-Via Output-None Output-InternalTo get short help on a specific command, use the Help command and specify the command in question as a parameter, e.g.
Command : help helpHelp <Optional command name>Issuing the help command will print all the available commands. If help is entered with a command name, this command will be explained.Entering Parameters
To get a list of possible parameter values, enter a `?' on the command line or when prompted for a missing parameter.
To specify a default value for a parameter, enter a `-' on the command line or when prompted for a missing parameter.
If a default value exists for a parameter, you may also hit <Return> when prompted for the parameter to accept the default value. However, if no default value exists, this will list the possible values and prompt for the parameter again.
The Graphical Interface
The graphical Simulator UI is illustrated in the figure below:
All input and output texts to and from the simulator monitor is displayed in the text area to the right.
Entering Commands Textually
To enter monitor commands textually:
- Place and click the mouse pointer inside the Command: input field at the bottom right, below the text area.
- Enter the command on the input line. The same syntax is used as when running in stand-alone mode; see The Textual Interface. However, prompting for missing parameters are done by issuing dialogs, where the parameter value can be entered or selected from a list of possible values. See Selecting Parameters.
Monitor commands entered textually are saved in a history list. To re-execute a command in the history list:
- Place the mouse pointer inside the input field.
- Use the arrow keys <Up> and <Down> to display the commands that have been entered earlier.
- Hit <Return> on the command line to re-execute the displayed command. You may edit the command before executing it.
Issuing Commands Using Buttons
The preferred way to issue monitor commands is by using the command buttons in the left area of the Simulator UI, or by using menu choices in the menu bar. Each button or menu choice correspond to a certain monitor command. The buttons are grouped into modules, corresponding to different categories and uses of the commands. The groups are similar to those listed when using the Help command in the textual interface.
To "preview" the command associated with a button or menu choice, without executing it:
- Place the mouse pointer on the button or menu choice and press the mouse button. The name of the monitor command is displayed in the Status Bar at the very bottom of the Simulator UI.
- Move the mouse pointer outside the button or menu and release the mouse button.
To execute a command, simply click on a button.
Selecting Parameters
Parameters to monitor commands are prompted for in dialogs (unless they have been specified on the command input line). If a parameter has a set of possible values, the list of values is presented from which you may select a value:
In this dialog, the values can be sorted alphabetically by clicking the Sort button. After having entered an initial string, you can also press <Space> to select the first value starting with this string, or press `?' to select the first value containing this string. Additional <Space> or `?' characters will select the next value, etc. When there are no more matches, a real space or `?' character will be added after the string you initially entered.
File parameters are prompted for in File Selection Dialogs. Other parameters, like integers, are prompted for in a simple text input dialog.
- To accept a selected or entered value, click OK in the dialog.
- To enter a "null" value for the parameter in the input field, click Default value (only available for some parameter types).
- To specify a possible default value, click OK without having selected or entered any value, or enter a `-' in the dialog's text input field.
- To cancel a command, click Cancel in any of the parameter dialogs, or enter an unallowed value in the dialog's text input field.
Selecting Signal Parameters
If a command parameter is an output signal and you select a signal which in turn have parameters, the signal parameters are asked for in a separate dialog. In this dialog, all parameters are listed with their default ("null") values:
To edit a signal parameter, you select the parameter and then edit the value displayed in the input field. If the parameter is of an enumerated type, the possible values can also be selected from the option menu just above the input field. By clicking Default value, the "null" value will be inserted in the input field. A changed parameter value is not updated in the parameter list until a parameter is selected in the list.
Click OK to accept all parameter values, and Cancel to abort the monitor command. The validity of the parameter values is not tested until you click the OK button.
Undo/Redo Commands
To undo a previous command, click the Undo quick button in the tool bar, or select Undo in the popup menu that is available in the text area. Then you get a dialog with all commands you have given so far. All commands are shown, even the ones entered using buttons or menu choices.
Initially all commands except the last is selected. If you click OK the simulation is restarted and all the selected commands will be re-executed. By clicking on the commands in the dialog you can decide which commands you want to be re-executed in the restarted simulation.
The Undo function cannot handle to undo commands for setting or removing graphical breakpoints.
To redo a command in the current simulation, select Command in the popup menu in the text area. Then you also get a dialog with all commands you have given so far, in the same way as for Undo.
After selecting one of the commands and clicking OK the command is executed. You can also change the command on the command line before clicking OK.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |