Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pinqchoicest3(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE CHOICE DEVICE STATE 3(3P)  —  SUNPHIGS LIBRARY

NAME

INQUIRE CHOICE DEVICE STATE 3 − inquire state of a choice device

SYNOPSIS

C Syntax

void
pinqchoicest3 ( ws, dev, size, error_ind, buffer, total_size, state )
Pintws;workstation identifier
Pintdev;choice 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
Pchoicest3∗state;OUT choice device state

FORTRAN Syntax

SUBROUTINE pqchs3 ( WKID, CHDNR, MLDR, ERRIND, MODE, ESW, ISTAT, ICHNR, PET,
    EVOL, LDR, DATREC )
INTEGERWKIDworkstation identifier
INTEGERCHDNRchoice device number
INTEGERMLDRdimension of data record array
INTEGERERRINDOUT error indicator
INTEGERMODEOUT operating mode (PREQU, PSAMPL, PEVENT)
INTEGERESWOUT echo switch (PNECHO, PECHO)
INTEGERISTATOUT initial status (POK, PNCHOI)
INTEGERICHNROUT initial choice number
INTEGERPETOUT prompt/echo type
REALEVOL(6)OUT echo volume in device coordinates
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 CHOICE DEVICE STATE 3 to determine the current state of the specified choice 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 in some cases it 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 choice, the prompt/echo type and the echo volume.  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 choice device is associated. 

devThe device number of the choice device.  See the Available Devices section of INITIALIZE CHOICE 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 Pchoicest3 structure containing the current state of the specified choice device.  Pchoicest3 is defined in phigs.h as follows:

typedef struct {
Pimodemode;/∗ operating mode ∗/
Peswesw;/∗ echo switch ∗/
Pchoicechoice;/∗ initial choice number and status ∗/
Pintpet;/∗ prompt/echo type ∗/
Plimit3e_volume;/∗ echo volume ∗/
Pchoicerecrecord;/∗ data record ∗/
} Pchoicest3;

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 choice status and number, the prompt/echo type and the echo volume. 

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. 

CHDNR
The device number of the CHOICE device.  See the Available Devices section of INITIALIZE CHOICE 3 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. 

ISTATThe initial choice status. 

ICHNR
The initial choice number.

PETThe prompt/echo type. 

EVOLAn array containing the limits of the echo volume, XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX. 

LDRThe required dimension of the data record array, DATREC. 

DATREC
The data record array.

Execution

INQUIRE CHOICE DEVICE STATE 3 returns the current state of the specified choice 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 choice, prompt/echo type, echo volume and data record.  See SET CHOICE MODE for a description of the operating mode and the echo switch and how to set these values.  See INITIALIZE CHOICE 3 for a description of the initial choice, prompt/echo type, echo volume 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

2200C: Buffer overflow in input or inquiry function

2001FORTRAN: Ignoring function, output parameter size insufficient -- a FORTRAN array or string being passed as an output parameter is too small to contain the returned value.

SEE ALSO

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

Sun Release 4.0  —  Last change: 2 August 1989

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