REQUEST PICK(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
REQUEST PICK − request an operator interaction with a pick device
SYNOPSIS
C Syntax
void
preq_pick ( ws, dev, depth, in_status, rpick )
Pintws;workstation identifier
Pintdev;pick device number
Pintdepth;max. depth of returned path
Pin_status∗in_status;OUT input status
Ppick_path∗rpick;OUT pick
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
Use REQUEST PICK to request an operator interaction with a specified pick device. The device must be in request mode. See SET PICK MODE and INITIALIZE PICK for more information. See the Available Devices section of INITIALIZE PICK for a description of the available pick devices.
The request suspends PHIGS until the specified device is triggered, or the operator performs a BREAK. A BREAK is performed by typing the CONTROL and D keys simultaneously (^D).
C Input Parameters
wsWorkstation identifier. An integer specifying the workstation with which the requested pick device is associated.
devThe device number of the requested pick device.
depthThe maximum depth of the pick path to return.
C Output Parameters
in_status
A pointer to the location to store the status of the request. Pin_status is defined in phigs.h as follows:
typedef enum {
PIN_STATUS_NONE,
PIN_STATUS_OK,
PIN_STATUS_NO_IN
} Pin_status;
rpickA pointer to a Ppick_path structure in which the system stores the pick path.
Ppick_path is defined in phigs.h as:
typedef struct {
Pintdepth;/∗ pick path depth ∗/
Ppick_path_elem∗path_list; /∗ pick path list ∗/
} Ppick_path;
depth indicates the number of elements in the measure’s path. This is the depth value contained in the device’s current measure. It is not affected by the maximum depth to return parameter. Thus, the number of elements returned in path_list may be less than depth.
path_list is the array of path elements defining the location of the picked primitive in the Central Structure Store (CSS). This array must be allocated by the calling program and the array pointer assigned to this field before calling this function. The array must be at least of length maximum depth to return. Ppick_path_elem is defined in phigs.h as:
typedef struct {
Pintstruct_id;/∗ structure identifier ∗/
Pintpick_id;/∗ pick identifier ∗/
Pintelem_pos;/∗ element number ∗/
} Ppick_path_elem;
struct_id, pick_id, and elem_pos are the structure identifier, pick identifier, and element number, respectively, of each element in the path.
Execution
REQUEST PICK requests a logical input value from the specified pick device. The specified device must be in request mode. See SET PICK MODE for more information.
REQUEST PICK creates a measure process for the specified device and suspends PHIGS until the device is triggered or the operator issues a BREAK. A BREAK is generated by the operator by depressing the CONTROL and D keys simultaneously (^D).
If the pick device is triggered and a pick has not been made, the status is returned as PIN_STATUS_NONE, and no pick data is returned. If the pick device is triggered and a pick has been made, the status is returned as PIN_STATUS_OK, and the pick data is available in the output parameters. If a BREAK occurs, the status is returned as PIN_STATUS_NO_IN, and no pick value is returned.
In all cases, when the device is triggered or a BREAK is issued, the current measure process is terminated and PHIGS processing resumes.
See INITIALIZE PICK 3 for a description of the available PICK devices and how their measure values are determined.
ERRORS
003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)
054Ignoring function, the specified workstation is not open
060Ignoring function, specified workstation is not of category OUTIN
250Ignoring function, the specified device is not available on the specified workstation
251Ignoring function, the function requires the input device to be in REQUEST mode
SEE ALSO
INITIALIZE PICK 3 (3P)
SET PICK FILTER (3P)
SET PICK IDENTIFIER (3P)
SET PICK MODE (3P)
September 02, 1992