INQUIRE DEFAULT VALUATOR DEVICE DATA 3(3P) — Kubota Pacfic Computer Inc. (16 August 1991)
NAME
INQUIRE DEFAULT VALUATOR DEVICE DATA 3 − inquire the predefined valuator data
SYNOPSIS
C Syntax
void
pinq_def_val_data3 ( type, device, store, error_ind, def_value, pets, echo_vol,
val_data )
Pinttype;workstation type
Pintdevice;logical input device number
Pstorestore;handle to Store object
Pint∗error_ind;OUT error indicator
Pfloat∗def_value;OUT default initial value
Pint_list∗∗pets;OUT list of prompt and echo types
Plimit3∗echo_vol;OUT default echo volume
Pval_data3∗∗val_data;OUT pointer to default data record
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use INQUIRE DEFAULT VALUATOR DEVICE DATA 3 to determine the following information for a VALUATOR input device associated with a given workstation type:
• Number and list of available prompt/echo types • Default echo volume • Default input data record • Default initial valuator value
Since the default prompt/echo type for all input devices is 1, the default input data record is for that prompt/echo type. There are no default input data records for prompt/echo types other than 1.
C Input Parameters
Applications using the C binding must create a buffer to be used by this function as memory space for storing portions of the device data. This buffer is passed as the store argument.
The store buffer is a data area managed by PHIGS. While the application is responsible for creating the initial buffer through a call to CREATE STORE, PHIGS manages this area such that there is sufficient memory for the specific inquiry. The valuator device data record within the store buffer is accessed via the pointer returned in val_data.
typeThe workstation type with which the device is associated.
deviceThe device number of the valuator device. See the Available Devices section of INITIALIZE VALUATOR 3 for a description of the available devices.
storeThe memory buffer PHIGS is to use for storing the information returned for the Pval_data3 structure. This memory is not used for the data returned in the Pint_list structure. This buffer must exist prior to calling this function (see CREATE STORE (3P)).
C Output Parameters
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.
def_value
Default initial valuator value.
petsA pointer to available prompt/echo types. Pint_list is defined in phigs.h as follows:
typedef struct {
Pintnum_ints;/∗ number of Pints in list ∗/
Pint∗ints;/∗ list of integers ∗/
} Pint_list;
The num_ints component specifies the number of elements in the list. The ints component is a pointer to a list num_ints long.
The application must allocate memory for len elements in the list of ints.
echo_vol
A pointer to a Plimit3 structure defining the x, y, and z components of the echo volume, in Device Coordinates. Plimit3 is defined in phigs.h as follows:
typedef struct {
Pfloatx_min;/∗ minimum x coordinate value ∗/
Pfloatx_max;/∗ maximum x coordinate value ∗/
Pfloaty_min;/∗ minimum y coordinate value ∗/
Pfloaty_max;/∗ maximum y coordinate value ∗/
Pfloatz_min;/∗ minimum z coordinate value ∗/
Pfloatz_max;/∗ maximum z coordinate value ∗/
} Plimit3;
val_data
A pointer to a Pval_data3 pointer. PHIGS will assign this pointer to the location in the Pstore structure that contains the device’s data record contents. Pval_data3 is defined in phigs.h as follows:
typedef struct {
Pfloatlow;/∗ low range limit ∗/
Pfloathigh;/∗ high range limit ∗/
union {
struct {
Pintunused;
} pet_r1;
struct {
char∗label;
char∗format;
char∗low_label;
char∗high_label;
} pet_u1;
} pets;
} Pval_data3;
Execution
INQUIRE DEFAULT VALUATOR DEVICE DATA 3 returns the default data of the specified valuator device. This data is stored in the workstation description table associated with the workstation type. See INITIALIZE VALUATOR 3 for a description of the prompt/echo types, echo volume, and data record contents, and how to set these values.
In the event of an error, the error indicator indicates the error number of the error detected, and no other output data is returned. If no error is detected, the error indicator is 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
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
052Ignoring function, workstation type not recognized by the implementation
051Ignoring function, this information is not yet available for this workstation type; open a workstation of this type and use the specific workstation type
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 VALUATOR 3 (3P)
INQUIRE DEFAULT VALUATOR DEVICE DATA (3P)
CREATE STORE (3P)
DELETE STORE (3P)
September 02, 1992