A
RCHITECTURE
set_event_bit()
E
355/
E
265 U
SER
AND
B
EST
P
RACTICES
G
UIDE
23
set_event_bit()
Allows the application to select one of the event bits that would otherwise be
unused, and assigns it to a communication port.
By default, the communication ports do not generate events. This function allows
the communication ports to generate events when data is received. This
mechanism is provided when almost all the bits in the event mask have already
been allocated. However, in a specific terminal installation, many of the predefined
event bits are not used.
Prototype
int set_event_bit(int handle, long bitmask);
Parameters
Return Values
Returns 0 if successful. If an error occurs this function returns -1.
Only one event bit may be selected for a given device. The following event bits
must not be assigned:
EVT_USER, EVT_SHUTDOWN
and
EVT_SYSTEM
.
Any attempt to violate these rules will result in
set_event_bit()
returning -1
and
errno
being set to
EINVAL
. If the command fails, the event bit setting will not
be changed.
get_event_bit()
Allows the application to find out what event, if any, will be generated by the given
device. The mask returned will have one bit set that corresponds to the event bit
generated by the device.
Prototype
long get_event_bit(int handle);
Parameters
Return Values
Returns 0 if no event is to be generated or a mask with one bit set, if an event is to
be generated. -1 if the device does not support soft events.
handle
The handle returned for the device by the
open()
call.
bitmask
A mask with 1 or 0 bits set corresponding to the event bit.
handle
The handle returned for the device by the
open()
call.
bitmask
A mask with 1 or 0 bits set corresponding to the event bit.
Summary of Contents for e265
Page 1: ...Verifone Part Number DOC087 080 EN A Revision A e355 e265 User and Best Practices Guide...
Page 6: ...CONTENTS 6 E355 E265 USER AND BEST PRACTICES GUIDE...
Page 10: ...PREFACE Conventions and Acronyms 10 E355 E265 USER AND BEST PRACTICES GUIDE...
Page 64: ...SYSTEM MODE VTM Software Versions 64 E355 E265 USER AND BEST PRACTICES GUIDE...
Page 70: ...LOGGING OPTIONS logdump 70 E355 E265 USER AND BEST PRACTICES GUIDE...
Page 74: ...SOFTWARE PACKAGE Downloading 74 E355 E265 USER AND BEST PRACTICES GUIDE...
Page 76: ...CONTROL AND BARCODE APPLICATIONS Pipe Interface 76 E355 E265 USER AND BEST PRACTICES GUIDE...