initiate_request(3G)
NAME
initiate_request − start request process without waiting for result
SYNOPSIS
C Syntax:
void initiate_request ( fildes, class, ordinal, valid );
int fildes, class, ordinal, *valid;
FORTRAN77 Syntax:
subroutine initiate_request ( fildes, class, ordinal, valid )
integer*4 fildes, class, ordinal, valid
Pascal Syntax:
procedure initiate_request ( fildes, class, ordinal:integer;
var valid:integer );
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
class One of the following device classes: LOCATOR or CHOICE. The integer values assigned for these class designators are found in the Starbase include file used with your program.
ordinal Logical device number ranging from 1 to the number of devices in this class.
Output Parameters
valid If the device is not initialized or requests are not supported on a specific device, valid is set to FALSE (0). Otherwise it is set to TRUE (1). When Pascal is used, 0 and 1 are returned because TRUE and FALSE are reserved words in that programming language.
Discussion
If the device is supported, initiate_request posts a request against it. The request is completed when the device is triggered (in a device-dependent manner) or when the request is canceled by receipt of a corresponding request_choice or request_locator call that times out.
A request can be performed on an input device while it is enabled for event generation. The events-enabled mode is saved by the device and restored after the request has been executed.
Request data is not sent to the event queue, but is placed instead in a separate virtual register. Inquire_request_status can be used to determine whether any request data is present. Request data can be read by using request_choice or request_locator (request_choice and request_locator do not require an earlier call to initiate_request before they can be used).
Initiate_request provides a means for better utilizing devices that support asynchronous sampling during a pending request. Thus, a program can initiate a request then continue other operations without waiting for its completion.
SEE ALSO
inquire_request_status(3G), request_choice(3G), request_locator(3G).
Hewlett-Packard Company — November 03, 1994