set_spy ( : : Class, Value : )

Control of the HORUS Debugging Tools.

The operator set_spy is the HORUS debugging tool. This tool allows the flexible control of the input and output data of HORUS-procedures - in graphical as well as in textual form. The datacontrol is activated by using

set_spy(::'mode','on':),

and deactivated by using

set_spy(::'mode','off':).

The debugging tool can further be activated with the help of the environment variable HORUSSPY. The definition of this variable corresponds to calling up 'mode' and 'on'.

The following control modes can be tuned (in any desired combination of course) with the help of Class/Value:

  Class              Meaning / Value
  -----              -----------------

  'procedure'
                     When a routine is called, its name and the
		       names of its parameters will be given 
		       (in TRIAS notation). 
		       Value:   'on' or 'off'
		       default: 'off'

  'input_control'
                     When a routine is called, the names and values of the
		       input control parameters will be given.
		       Value:   'on' or 'off'
		       default: 'off'

  'output_control'
                     When a routine is called, the names and values of the
		       output control parameters will be given.
                 Value:   'on' or 'off'
		       default: 'off'

  'parameter_values'
                     Additional information on 'input_control' and 'output_control':
                 indicates how many values per parameter shall be displayed at most
                 (maximum tuplet length of the output).
		       Value:   tuplet length (integer)
		       default: 4
  'db'
                     Information concerning the 4 relations in the 
		       HORUS-database. This is especially valuable
		       in looking for forgotten clear.
		       Value:   'on' or 'off'
                 default: 'off'

  'input_grey_window'
                     Any reading access of the gray-value component of an 
                     (input) image object will cause the gray-value component
                     to be shown in the indicated window (Window-ID; 'none'
                     will deactivate this control).
                     Value:   Window-ID (integer) or 'none'
                     default: 'none'

  'output_grey_window'
                     As soon as the gray-value component of an (output) image object
                     is set, spy will show this gray-value component in the indicated
                     window (Window-ID; 'none' will deactivate this control).
                     Value:   Window-ID (integer) or 'none'
                     default: 'none'

  'input_region_window'
                     Any reading access of the region of an (input) iconic object 
                     will cause this region to be shown in the indicated (Window-ID; 'none'
                     will deactivate this control ).
                     Value:   Window-ID (integer) or 'none'
                     default: 'none'

  'output_region_window'
             	     As soon as the region of an (output) iconic object ist set,
                     spy will show this region in the indicated window       
                     (Window-ID; 'none' will deactivate this control ).
                     Value:   Window-ID (integer) or 'none'
                     default: 'none'

  'time'
                     Processing time of the operator		  
                     Value:   'on' or 'off'
                     default: 'off'

  'halt'
                     Determines whether there is a halt after every individual action
                     ('multiple') or only at the end of each procedure ('single').
                     The parameter is only effective if the halt has been activated
                     by 'timeout' or 'button_window'.                      
                     Value:   'single' or 'multiple'
                     default: 'multiple'

  'timeout'
                     After every output there will be a halt of the indicated number of 
                     seconds.
                     Value:   seconds (real)
                     default  0.0

  'button_window'
                     Alternative to 'timeout': after every output spy waits until the cursor
                     indicates ('button_click' = 'false') or clicks into
                     ('button_click' = 'true') the indicated window.
                     (Window-ID; 'none' will deactivate this control ).
                     Value:   Window-ID (integer) or 'none'
                     default: 'none'

  'button_click'
                     Additional option for 'button_window': determines whether or not a 
                     mouse-click has to be waited for after an output. 
                     Value:   'on' or 'off'
                     default: 'off'

  'button_notify'
                     If 'button_notify' is activated, spy generates a beep after every output.
                     This is useful in combination with 'button_window'.                      
                     Value:   'on' or 'off'
                     default: 'off'

  'log_file'
                     Spy can hereby divert the text output into a file having been opened
                     with open_file. If the output shall again be shown on screen, 
                     'standard_output' has to be entered for Value.
                     Value:   Filename
                     default: 'standard_output'
  'error'
                     If 'error' is activated and an internal error occurs, 
                     spy will show the procedures (file/line) concerned.
                     Value:   'on' or 'off'
                     default: 'off'
  'internal'
                     If 'internal' is activated, spy will indicate the procedure and 
                     its parameters (file/line) before an internal HORUS-procedure 
                     is called up.
                     Value:   'on' or 'off'
                     default: 'off'


Parameters

Class (input_control)
string -> string
Control mode
Default value: 'mode'
List of values: 'mode', 'procedure', 'input_control', 'output_control', 'parameter_values', 'input_grey_window', 'db', 'time', 'output_grey_window', 'output_region_window', 'input_region_window', 'halt', 'timeout', 'button_window', 'button_click', 'button_notify', 'log_file', 'error', 'internal'

Value (input_control)
string -> string / integer / real
State of the control mode to be set.
Default value: 'on'
Suggested values: 'on', 'off', 1, 2, 3, 4, 5, 10, 50, 0.0, 1.0, 2.0, 5.0, 10.0


Example
/* init spy: Setting of the wished control modi */
set_spy("mode","on");
set_spy("procedure","on");
set_spy("input_control","on");
set_spy("output_control","on");
/* calling of program section, what will be examined */
set_spy("mode","off");  

Result

The operator set_spy returns the value TRUE if the parameters are correct. Otherwise an exception is raised.


Possible Predecessors

init_horus


See also

get_spy, query_spy



Copyright © 1996-1997 MVTec Software GmbH