Chapter 5 - Input 97 0 EINDNOEX [80] Input device does not exist EINDINIT [81] Input device not initialized. S.S. Miscellaneous Input Functions The functions described in this section can be used with several of the input dev- ice management techniques described in the previous sections. For example, sample_input can be used when a device is in either RESPOND_EVENT or QUEUE_EVENT state. Likewise, disable_events can be used in either of these states.
Sample Input Cerror sample_input(devclass, devnum, valid, sample) Cdevoff devclass; /* device type*/ Cint devnum; /* device number*/ Clogical *valid; /* device status*/ Cinrep *sample; /* device value*/ sarnple_input reports the current measure of the specified input device in the returned argument sample. The returned argument valid reports whether the device is initialized and prepared to receive an input. The current measure of the device may be set by a queued event, a requested event, or a device initialization depending on the state of the input device and the most recent trigger activation(s).
See the introduction of this chapter for an explanation of the rela- tionship between the measure of an input device and the state of an input dev- ice. If the appropriate field of the sample argument is a pointer, it must be set to an application program allocated area. 0 Errors ENOTVSAC [4] CGI not in proper state: CGI shall be in state VSAC. EINDNOEX [80] Input device does not exist EINDINIT [81] Input device not initialized.
Get Last Requested Input Cerror get_last_requested_input(devclass, devnum, valid, sample) Cdevoff devclass; /* device type*/ Cint devnum; /* device number*/ Clogical *valid; /* device status*/ Cinrep *sample; /* device value*/ get_ last_ requested_ input returns the contents of the request register. get_last_requested_input is usually used with initiate_request, but request_input also changes. the contents of the request register. The returned argument valid indicates whether the device exists and is initialized. The returned argument sample reports the event in the request register. If no event is in the request register, the initial device value is reported.
If the appropriate field of the sample argument is a pointer, it must be set to an application program allocated area. Errors ENOTVSAC [4] CGI not in proper state: CGI shall be in state VSAC. 0 EINDNOEX [80] Input device does not exist Version C of 17 Man:h 1986