A
RCHITECTURE
write()
E
355/
E
265 U
SER
AND
B
EST
P
RACTICES
G
UIDE
21
write()
This copies the given data to system transmit buffers for transmission over the
communication port. The function may return before the data is actually sent. In
e355, the
write()
function works differently than a standard serial port. The
driver assumes that each write contains a whole packet and that a request/reply
type of protocol is running on the link that limits the number of outstanding
transmit packets in the buffers. Usually, a device port will have, at most, one
outstanding packet in the buffers. No packet is sent until a response is received.
There are a total of 7 transmit buffers shared among all channels. If a
communication protocol attempts to write when there are no buffers, the error
ENOSPC
is returned. Each buffer allows up to 1024 bytes for iOS devices and
2048 bytes for Android and Windows devices.
Prototype
int write(int handle, const char *buffer, int count);
Parameters
Return Values
Returns the number of bytes sent, or -1 if an error occurred.
Reset_port_error()
Resets all error flags for the given communication channel.
Prototype
int reset_port_error(int handle);
Parameters
Return Values
Returns 0 if successful, 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 number of bytes to send.
handle
The handle returned for the device by the
open()
call.
Содержание e265
Страница 1: ...Verifone Part Number DOC087 080 EN A Revision A e355 e265 User and Best Practices Guide...
Страница 6: ...CONTENTS 6 E355 E265 USER AND BEST PRACTICES GUIDE...
Страница 10: ...PREFACE Conventions and Acronyms 10 E355 E265 USER AND BEST PRACTICES GUIDE...
Страница 64: ...SYSTEM MODE VTM Software Versions 64 E355 E265 USER AND BEST PRACTICES GUIDE...
Страница 70: ...LOGGING OPTIONS logdump 70 E355 E265 USER AND BEST PRACTICES GUIDE...
Страница 74: ...SOFTWARE PACKAGE Downloading 74 E355 E265 USER AND BEST PRACTICES GUIDE...
Страница 76: ...CONTROL AND BARCODE APPLICATIONS Pipe Interface 76 E355 E265 USER AND BEST PRACTICES GUIDE...