next up previous contents 5
Next: Scripted Device Family Relationships Up: General DCS Scripting Commands Previous: Starting an operation   Contents


Obtaining operation results

The start_waitable_operation command returns a unique operation handle, which can be passed to the following command to obtain the results of the operation:

wait_for_operation operationHandle

This function will return the results of the operation in the following formatted string:

status returnValue1 [returnValue2 [returnValue3 [...]]]

The status field will contain one of the following:

It is not necessary to worry about the exact timing of the wait_for_operation command. If the wait_for_operation command is issued after the operation has already completed, the results of the operation will be returned by the scripting engine immediately. If the command is issued before the operation is completed, the script will hang until the operation is completed or the operation sends an update message.

Example: Waiting for the results of the optimize operation

	set opHandle [start_waitable_operation optimize table_vert i2 20 0.05 0.1] 
	set result [wait_for_operation $opHandle]
	log_note $result
output: normal 30.774772


next up previous contents 5
Next: Scripted Device Family Relationships Up: General DCS Scripting Commands Previous: Starting an operation   Contents
Scott McPhillips 2011-07-06