A
RCHITECTURE
read()
20
E
355/
E
265 U
SER
AND
B
EST
P
RACTICES
G
UIDE
read()
This copies message-based data (header, data, CRC) received from the
communication port to the given buffer. The actual number of bytes copied may be
less than the requested count. In e355, the receive data logic drops packets larger
than 1024 bytes for iOS devices and 2048 bytes for Android and Windows
devices.
The Rx message packets are first put into a FIFO of up to 7 message packets and
a kernel task routes the message packets to the correct device port buffers. It is
possible, but unlikely that the kernel task can't keep up with the incoming packets.
If the FIFO overflows, the entire message packet is dropped. When packets are
internally dropped, log messages are generated. The end-to-end request/
response handshaking normally prevents buffer overflows.
The read function returns a complete message that is aligned on packet
boundaries. The communication port driver does a CRC checksum on the data to
assure integrity, but, it does not guarantee delivery.
Prototype
int read(int handle, char *buffer, int count);
Parameters
Return Values
Returns the number of bytes read, or -1 if an error occurred.
handle
The handle returned for the device by the
open()
call.
buffer
The buffer from which to copy the data.
count
The maximum number of bytes requested.
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...