Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pqsks3(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

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

NAME

INQUIRE STROKE DEVICE STATE 3− inquire state of a stroke device

SYNOPSIS

C Syntax

void
pinqstrokest3 ( ws, dev, type, size, error_ind, buffer, total_size, state )
Pintws;workstation identifier
Pintdev;stroke device number
Pinqtypetype;type of returned value
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
Pstrokest3∗state;OUT stroke device state

FORTRAN Syntax

SUBROUTINE pqsks3 ( WKID, SKDNR, TYPE, N, MLDR, ERRIND, MODE, ESW, IVIEWI, NP,
    IPXA, IPYA, IPZA, PET, EVOL, BUFLEN, LDR, DATREC )
INTEGERWKIDworkstation identifier
INTEGERSKDNRstroke device number
INTEGERTYPEtype of returned values (PSET, PREALI)
INTEGERNmaximum number of points
INTEGERMLDRdimension of data record array
INTEGERERRINDOUT error indicator
INTEGERMODEOUT operating mode (PREQU, PSAMPL, PEVENT)
INTEGERESWOUT echo switch (PNECHO, PECHO)
INTEGERIVIEWIOUT initial view index
INTEGERNPOUT number of points
REALIPXA(N), IPYA(N), IPZA(N) OUT initial points in stroke in world
coordinates
INTEGERPETOUT prompt/echo type
REALEVOL(6)OUT echo volume in device coordinates
INTEGERBUFLENOUT input buffer size
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 STROKE DEVICE STATE 3 to determine the current state of the specified stroke 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 prompt/echo type and the echo volume.  Error PEBUFSPAC (2200) is returned if size is too small, but not if it is zero. 

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

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

typeAn enumerated value specifying whether the inquired values are to be returned as the values originally specified by the application (SET), or as the values actually being used by the workstation if any of the application-specified values had to be mapped to ones available on the workstation (REALIZED).  Valid values are defined in phigs.h as:

PSET(return application-specified value)
PREALIZED(return value available on the workstation)

A value of PSET is currently ignored. 

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 Pstrokest3 structure containing the current state of the specified stroke device.  Pstrokest3 is defined in phigs.h as follows:

typedef struct {
Pimodemode;/∗ operating mode ∗/
Peswesw;/∗ echo switch ∗/
Pstroke3stroke;/∗ initial stroke ∗/
Pintpet;/∗ prompt/echo type ∗/
Plimit3e_volume;/∗ echo volume ∗/
Pstrokerecrecord;/∗ data record ∗/
} Pstrokest3;

FORTRAN Input Parameters

Applications using the FORTRAN binding must supply a CHARACTER array to this function, into which the system will place 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 stroke, initial view index, 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. 

SKDNR
The device number of the STROKE device.  See the Available Devices section of INITIALIZE STROKE 3 for a description of the available devices. 

TYPEAn enumerated value specifying whether the inquired values are to be returned as the values originally specified by the application (SET), or as the values actually being used by the workstation if any of the application-specified values had to be mapped to ones available on the workstation (REALIZED).  Valid values are defined in phigs77.h as:

PSET(return application-specified value)
PREALI(return value available on the workstation)

A value of PSET is currently ignored. 

NThe maximum number of initial points to return.  The initial points arrays should be at least this size. 

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. 

VIEWI
The initial view index.

NPThe number of initial stroke points. 

IPXA, IPYA, IPZA
The arrays in which to store the initial stroke points.

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

Sun Release 4.0  —  Last change: 1 August 1989

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