User Tools

Site Tools


jvs:cigal:manual:chapter2:watch

CIGAL Reference Manual, Chapter 2 (Commands): WATCH

WATCH -- Display a data variable on the screen with continuous updating

usage: watch varbname [flag fmt xpos ypos nx ny dx dy attrb] ; set watch
or: watch varbname 0 ; delete watch
or: watch 0 ; delete all watches
or: watch maxwatches ; set max # of watches
or: watch ; update watches

WATCH allows for continuous monitoring of data variable contents. To set a watch, you specify the variable and where it is to appear on the screen. Then, specify the format in which it is to be displayed. Once set, a watch will be checked between every interactive command and the display altered if the variable's value changed. If you wish to watch values change during the execution of macro or menu commands the processor flag PFLAGS can be set to update watches between non-interactive commands also (see PFLAGS(4)).

The WATCH command with no arguments can be called at any time to update the display of all active watches. If no watches are active this command has no effect.

Setting a Watch:

FLAG Value
The FLAG argument can be used to control various options available when setting a watch on a variable. The meanings of the FLAG bits are:

        VALUE (octal)  MEANING
          1      1     Display data values in text mode (not graphics)
          2      2     Display data as graphics pixels
          4      4     Display data as interleaved graphics (see [BITPLANES][1])
          8     10o
         16     20o
         32     40o
         64    100o

If you do not specify a value for FLAG

Display Position
When setting a watch, specify the variable its display location. The position can either be entered explicitly (by specifying values for XPOS, YPOS, NX, and NY) or by using the cursor to click on the upper left and lower right corners of a display box. XPOS and YPOS should be specified as character coordinates (0,0 is upper left corner) and indicate the upper left corner of the display region. NX, NY, DX, and DY are only needed if the variable has many elements. In that case NX and NY are the width and height of the entire display region and DX and DY are the character offsets between successive display locations. When setting a watch, the FLAG parameter controls various options, as described below under Moving and Modifying a Watch Variable.

Display Format
Specify the format for displaying the data. If the variable is not displayed as graphics data, the FMT argument is a character string indicating the display format. The syntax of the FMT string is described for the FORMAT command (see FORMAT(3) or FTYPE(2)). A reasonable default format string is assumed if FMT is not specified. If the variable displays as graphics, then FMT is a number indicating a scaling factor such that 1 out of every FMT pixel is displayed; for example, if FMT is 3 the display would be scaled down by a factor of 3 in each direction.

Examples

    1. To set a watch interactively, simply enter:
                 watch varbname
       (where VARBNAME is the name of the variable to watch).  You will then be
       prompted to move the cursor to select where to position the display.  The
       format and flags will be set to default values depending on the type of
       variable and the current display mode.
    2. To display the current date and time, enter:
                 watch day -

Clearing a Watch:

Watches can be cleared either individually for each variable (VNAME):

                            watch vname 0

or all at once:

                            watch 0

If alongside the watch are positioning bars, clear it by double clicking the cursor in the upper left corner of the display. Clearing the watch clears the display. To clear the watch without erasing the display, use:

                            watch vname -1

Moving Within a Watch Variable:

If the variable being watched has more values than can be displayed within the display window, you can shift the variable within the window by clicking on the positioning bars along the margins. Control this feature with the FLAG parameter.

Modifying a Watch Variable:

Number of Simultaneous Watches:

By default, 20 different watches can be set simultaneously. This number can be changed if the very first call to WATCH is of the form:

                    watch maxwatches

where MAXWATCHES is a positive number. Attempts to change the maximum number of watches at any other time are ignored.

Display Warning:

Because watches are always displayed at a fixed position on the screen, the display becomes garbled if a watch is set within a scrolling portion of the screen. To avoid this ensure the screen windows are set to scroll only in part of the screen before calling WATCH (see WINDOWS(1)). Be aware that the WFLAGS parameter allows commands to print their output in screen window 1, so that a watch set in that window may be occasionally erased unless you first clear WFLAGS (see WFLAGS(4)).

See Also:
BITPLANES(1), FTYPE(2), PFLAGS(4), WFLAGS(4), WINDOWS(1)

CIGAL Home, CIGAL Manual, Commands List, Manual Help

jvs/cigal/manual/chapter2/watch.txt · Last modified: 2023/02/23 18:43 (external edit)