![]() |
![]() |
![]() |
![]() |
![]() |
Modifying the System
The are a number of commands that change the behavior of the simulated system. These commands are useful to make debugging easier. They can, for example, be used to recover from logical errors, or to put the system in a state that could be difficult to achieve otherwise.
Some of these commands operate on the current process. For more information on the current process, see Current Process and Scope.
Sending an Internal Signal
To simulate the sending of an internal signal between two process instances:
- Enter the command Output-Internal. This command takes the following parameters: the name of the signal, values of any signal parameters, receiver process instance, and sender process instance.
- Select or enter the name of the signal to send.
- If the signal has parameters, set the values of the parameters in the dialog that is opened. Select a parameter in the list, enter/edit its value using the input line, or the option menu containing possible values (for enumeration type parameters). Click the Default value button to get a "null" value for the parameter.
- Select or enter the receiver process instance. Note that "env" may be entered for the environment process.
- Select or enter the sender process instance. Note that "env" may be entered for the environment process.
The signal is put in the input port of the receiver process, if it is in the valid input signal set; otherwise, it is discarded. No checks are made whether a path exists between the sender and the receiver.
Changing the Process State
To change the state of the current process, service, or procedure:
- Choose State in the Change menu, or enter the command Nextstate. This command takes one parameter: the name of the new state.
- Select or enter the name of the state to go to.
Creating and Stopping Processes
To create a new process instance:
- Choose Create Process in the Change menu, or enter the command Create. This command takes the following parameters: the process to create, the parent process instance, and any process parameters.
- Select or enter the name of the process to create a new instance for.
- Select or enter the parent process instance. "env" may be entered for the environment process, and "null" may also be entered.
- If the process has parameters, enter the values of the parameters one by one.
- Enter `y' or `Y' to create; all other answers cancels the create.
To stop a running process instance:
- Choose Stop Process in the Change menu, or enter the command Stop. This command takes one parameter, the process instance to stop.
- Select or enter the name of the process instance to stop.
Setting and Resetting Timers
To set a timer in the current process:
- Choose Set Timer in the Change menu, or enter the command Set-Timer. This command takes the following parameters: the name of the timer, any timer parameters, and a time value.
- Select or enter the name of a timer in the current process.
- If the timer has parameters, enter the values of the parameters one by one.
- Enter a time value when the timer is to expire, either an absolute value (without sign) or a value relative to Now (with a `+' sign). That is, "7.5" is an absolute time value, whereas "+7.5" is the time value Now+7.5.
To reset a timer in the current process:
- Choose Reset Timer in the Change menu, or enter the command Reset-Timer. This command takes the following parameters: the name of the timer, and any timer parameters.
- Select or enter the name of a timer in the current process.
- If the timer has parameters, enter the values of the parameters one by one.
Changing a Variable
To change the value of a variable in the current process:
- Choose Variable in the Change menu, or enter the command Assign-Value. This command takes the following parameters, the name of the variable, an optional specification of a variable component, and the new value.
- Select or enter the name of a variable, possibly abbreviated.
- If a variable has several components (e.g. an array, struct or string) and it is specified without a component, the values of all components of the variable have to be specified (e.g. the complete array). To assign a component only, the same rules as for examining a variable apply (see Examining Variables):
- To assign only a certain component, specify the component after the variable name. (In the Simulator UI, this must be done on the text input line in the dialog, after a variable name has been selected.)
- To get a list of the possible components of a variable, enter a `?' after the variable name. (In the Simulator UI, this must be done on the text input line in the dialog, after a variable name has been selected; another dialog is then opened, in which the component can be selected.)
- More information on the input and output of SDL data types can be found in Input and Output of Data Types.
Changing the Input Port
To remove a signal instance in the input port of the current process:
- Enter the command Remove-Signal-Instance. This command takes one parameter, an entry number in the input port.
- Enter an entry number. To see what entry number is associated with the signal instance, list the input port as described in Examining Signal Instances.
Entry numbers are just positions in the input port. The removal of a signal changes the entry numbers of the remaining signals.
To change the placing of a signal instance in the input port of the current process:
- Choose Input Port in the Change menu, or enter the command Rearrange-Input-Port. This command takes two parameters, the current and new entry number in the input port.
- Enter the current entry number of the signal instance. To see what entry number is associated with the signal instance, list the input port as described in Examining Signal Instances.
- Enter the new entry number of the signal instance. The current signal instance at this position will be moved down in the queue.
Rearranging the Ready Queue
You can change the order of process instances in the ready queue, i.e. the execution order of processes.
To change the placing of a process instance in the ready queue:
- Choose Ready Q in the Change menu, or enter the command Rearrange-Ready-Queue. This command takes two parameters, the current and new entry number in the ready queue.
- Enter the current entry number of the process instance. To see what entry number is associated with the process instance, list the ready queue as described in Printing the Process Ready Queue.
- Enter the new entry number of the process instance. The current process instance at this position will be moved down in the queue.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |