Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ set_string_mode(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET STRING MODE(3P)  —  SUNPHIGS LIBRARY

NAME

SET STRING MODE − set string device operating mode and echoing state

SYNOPSIS

C Syntax

void
psetstringmode ( ws, dev, mode, echo )
Pintws;workstation identifier
Pintdev;string device number
Pimodemode;operating mode
Peswecho;echo switch

FORTRAN Syntax

SUBROUTINE psstm ( WKID, STDNR, MODE, ESW )
INTEGERWKIDworkstation identifier
INTEGERSTDNRstring device number
INTEGERMODEoperating mode (PREQU, PSAMPL, PEVENT)
INTEGERESWecho switch (PNECHO, PECHO)

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

Use the SET STRING MODE subroutine to set the operating mode (REQUEST, SAMPLE, or EVENT) and the echo switch (ECHO, NOECHO) for a specified string device on a specified workstation. 

C Input Parameters

wsAn integer specifying the workstation on which the string device to be set is located. 

devThe device number of the string device to be set.  See the Available Devices section in INITIALIZE STRING 3 for a description of the available devices. 

modeSpecifies the operating mode for the specified string device. Pimode is an enumerated variable defined in phigs.h as follows:

typedef enum {

PREQUEST,
PSAMPLE,
PEVENT
} Pimode;

echoSets the echo switch for the specified string device. Pesw is an enumerated variable defined in phigs.h as follows:

typedef enum {

PES_ECHO,
PES_NOECHO
} Pesw;

FORTRAN Input Parameters

WKIDThe workstation identifier of the workstation associated with the device. 

STDNR
The device number of the string device to be set. See the Available Devices section in INITIALIZE STRING 3 for a description of the available devices. 

MODE
The desired mode of the device. Valid values as defined in phigs77.h are:


•  PREQU(REQUEST)
•  PSAMPL(SAMPLE)
•  PEVENT(EVENT)

ESWThe echo flag.  Valid values as defined in phigs77.h are:


•  PNECHO(NO ECHO)
•  PECHO(ECHO)

Execution

The SET STRING MODE sets the operating mode of the specified string device to REQUEST, SAMPLE, or EVENT, and the echo switch to ECHO or NOECHO. 

The operating mode controls how the input from the device is obtained. 

•If the operating mode is REQUEST, the subroutine REQUEST STRING, or REQUEST STRING 3 may be used to add the specified device number to the device trigger’s list of recipients and suspend PHIGS until the trigger fires or the operator executes a break. If the trigger fires, the REQUEST STRING subroutine returns the current input value of the device’s measure process, and the status OK. If a break occurs, the status NONE is returned. 

The measure of a STRING device is a character string entered at the keyboard, and the trigger is a carriage return. 

•If the operating mode is SAMPLE, the SAMPLE STRING or SAMPLE STRING 3 subroutine may be used to return the current input value of the device without waiting for the trigger to fire. The current input value is the current contents of the input buffer. 

•If the operating mode is EVENT, the input values generated by the device when its trigger fires are added as event reports to the event queue.  The subroutines AWAIT EVENT and/or GET STRING may then be used to read event reports from the queue. The event report for a STRING device includes a device identifier and a character string. 

The echo switch controls whether the echoing specified by the prompt/echo type for this device is performed as part of the measure process. The string device echo displays the currently input character string in the echo area or echo volume for the device. The echo area is a 2-D area specified with INITIALIZE STRING. An echo volume is a 3-D display volume specified by INITIALIZE STRING 3. 

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 STRING (3P)
REQUEST STRING (3P)
GET STRING (3P)
SAMPLE STRING (3P)
INQUIRE STRING DEVICE STATE (3P)

Sun Release 4.0  —  Last change: 10 July 1989

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