SAMPLE CHOICE(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SAMPLE CHOICE − sample the current measure of a choice device
SYNOPSIS
C Syntax
void
psample_choice ( ws, dev, choice_in_status, choice )
Pintws;workstation identifier
Pintdev;choice device number
Pin_status∗choice_in_status;OUT choice input status
Pint∗choice;OUT choice
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
Use SAMPLE CHOICE to sample the current measure of the specified choice device without waiting for the device trigger to fire. The device must be in SAMPLE mode. See SET CHOICE MODE and INITIALIZE CHOICE for more information.
C Input Parameters
wsWorkstation identifier. An integer specifying the workstation with which the specified choice device is associated.
devThe device number of the choice device to be sampled. See the Available Devices section of INITIALIZE CHOICE for a description of the available devices.
C Output Parameter
choice_in_status
A pointer to a location to store the status of the sample. Pin_status is defined in phigs.h as:
typedef enum {
PIN_STATUS_NONE,
PIN_STATUS_OK,
PIN_STATUS_NO_IN
} Pin_status;
choiceA pointer to a location to store the results of the choice.
Execution
SAMPLE CHOICE samples the specified choice device. The device must be in SAMPLE mode. See SET CHOICE MODE and INITIALIZE CHOICE for more information.
When a device is set to SAMPLE mode, a measure process is created for the device and the device is activated. When SAMPLE CHOICE is called, the current value of the measure process for the specified device is retrieved without waiting for the device’s trigger to fire.
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
252Ignoring function, the function requires the input device to be in SAMPLE mode
SEE ALSO
SET CHOICE MODE (3P)
INITIALIZE CHOICE 3 (3P)
REQUEST CHOICE (3P)
GET CHOICE (3P)
INQUIRE CHOICE DEVICE STATE (3P)
September 02, 1992