Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inquire_valuator_device_state(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE VALUATOR DEVICE STATE(3P)  —  SUNPHIGS LIBRARY

NAME

INQUIRE VALUATOR DEVICE STATE− inquire state of a valuator device

SYNOPSIS

C Syntax

void
pinqvalst ( ws, dev, size, error_ind, buffer, total_size, state )
Pintws;workstation identifier
Pintdev;valuator device number
Pintsize;size of application buffer
Pint∗error_ind;OUT error indicator
Pchar∗buffer;OUT pointer to buffer
Pint∗total_size;OUT actual size of buffer
Pvalst∗state;OUT valuator device state

FORTRAN Syntax

SUBROUTINE pqvls ( WKID, VLDNR, MLDR, ERRIND, MODE, ESW, IVAL, PET, EAREA, LOVAL,
    HIVAL, LDR, DATREC )
INTEGERWKIDworkstation identifier
INTEGERVLDNRvaluator device number
INTEGERMLDRdimension of data record array
INTEGERERRINDOUT error indicator
INTEGERMODEOUT operating mode (PREQU, PSAMPL, PEVENT)
INTEGERESWOUT echo switch (PNECHO, PECHO)
REALIVALOUT initial value
INTEGERPETOUT prompt/echo type
REALEAREA(4)OUT echo area in device coordinates
REALLOVAL, HIVALOUT minimal and maximal value
INTEGERLDROUT number of array elements used
in data record
CHARACTER∗80DATREC(MLDR) OUT data record

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

Use INQUIRE VALUATOR DEVICE STATE to determine the current state of the specified valuator device. 

C Input Parameters

Applications using the C binding must allocate a buffer to be used by this function as memory space for storing data associated with the device state.  This buffer is passed as the buffer argument.  The size of the buffer, in bytes, must be passed in the size argument.  The required size is returned in the argument total_size.  The caller can determine the required size by calling this function with size set to zero, in which case PHIGS will return the size needed in total_size.  The size in general will not be zero but may be, depending on the device state. 

Even if the buffer size specified is too small, including the case of its being zero, some values will be returned.  These are the total_size, the operating mode, the echo switch, the initial value, the prompt/echo type and the echo area.  Error PEBUFSPAC (2200) is returned if size is too small, but not if it’s zero. 

wsWorkstation identifier. An integer specifying the workstation with which the specified valuator device is associated. 

devThe device number of the valuator device.  See the Available Devices section of INITIALIZE VALUATOR for a description of the available devices. 

sizeThe size, in bytes, of buffer. 

error_ind
The error indicator.  See the Execution section below for a description of its use.  See the Errors section below for the possible values it may return. 

bufferA pointer to the buffer, allocated by the application, to be used by PHIGS to store portions of the returned data. 

total_size
A pointer to an integer in which PHIGS returns the size of the buffer needed, in bytes, to return all the information. 

stateA pointer to a Pvalst structure containing the current state of the specified valuator device.  Pvalst is defined in phigs.h as follows:

typedef struct {
Pimodemode;/∗ operating mode ∗/
Peswesw;/∗ echo switch ∗/
Pfloatval;/∗ initial value ∗/
Pintpet;/∗ prompt/echo type ∗/
Plimite_area;/∗ echo area ∗/
Pvalrecrecord;/∗ data record ∗/
} Pvalst;

FORTRAN Input Parameters

Applications using the FORTRAN binding must supply a CHARACTER array to this function, into which will be placed the contents of the device’s input data record.  The contents of the data record are subsequently extracted by the application with the function UNPACK DATA RECORD.  The allocated dimension of the character array is passed in the MLDR argument.  The dimension needed is returned in the LDR argument.  The caller can determine the required dimension by calling this function with MLDR set to zero, in which case PHIGS will return the dimension needed in LDR. 

Even if the dimension specified in MLDR is too small, including the case of its being zero, some values will be returned.  These are LDR, the operating mode, the echo switch, the initial value, the valuator range limits, the prompt/echo type, and the echo area. 

Error 2001 is returned if MLDR is too small, but not if it’s zero. 

WKIDThe workstation identifier of the workstation associated with the device. 

STDNR
The device number of the VALUATOR device.  See the Available Devices section of INITIALIZE VALUATOR for a description of the available devices. 

MLDR
The dimension of the data record array, DATREC. 

ERRIND
The error indicator.  See the Execution section below for a description of its use.  See the Errors section below for the possible values it may return. 

MODE
The operating mode.

ESWThe echo switch. 

VALThe initial value. 

PETThe prompt/echo type. 

EAREA
An array containing the limits of the echo area, XMIN, XMAX, YMIN, YMAX, in Device Coordinates. 

LOVAL, HIVAL
The valuator range limits.

LDRThe required dimension of the data record array, DATREC. 

DATREC
The data record array.

Execution

INQUIRE VALUATOR DEVICE STATE returns the current state of the specified valuator device, which is stored in the workstation state list of the workstation associated with the device.  The current state includes the operating mode, echo switch, initial value, prompt/echo type, echo area, and data record.  See SET VALUATOR MODE for a description of the operating mode and the echo switch and how to set these values.  See INITIALIZE VALUATOR for a description of the initial valuator, prompt/echo type, echo area and data record contents and how to set these values. 

Except in the cases mentioned in the C and FORTRAN Parameters sections above, if an error is detected by this function the error indicator will indicate the error number of the error detected and no other output data will be returned.  If no error is detected, the error indicator will be set to zero and the inquired information will be available in the output parameters.  Since this is an inquiry function, ERROR HANDLING is not invoked when an error is detected by this function. 

ERRORS

003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)

054Ignoring function, the specified workstation is not open

061Ignoring function, specified workstation is neither of category INPUT nor of category OUTIN

250Ignoring function, the specified device is not available on the specified workstation

SEE ALSO

INITIALIZE VALUATOR (3P)
SET VALUATOR MODE (3P)
INQUIRE VALUATOR DEVICE STATE 3 (3P)

Sun Release 4.0  —  Last change: 1 August 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026