Write(); Reset_Port_Error() - VeriFone e355 User And Best Practices Manual

Hide thumbs Also See for e355:
Table of Contents

Advertisement

write()

Prototype
Parameters
Return Values

Reset_port_error()

Prototype
Parameters
Return Values
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.
int write(int handle, const char *buffer, int count);
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.
Returns the number of bytes sent, or -1 if an error occurred.
Resets all error flags for the given communication channel.
int reset_port_error(int handle);
handle
The handle returned for the device by the open() call.
Returns 0 if successful, or -1 if an error occurred.
355/
265 U
B
P
E
E
SER AND
EST
A
RCHITECTURE
write()
21
G
RACTICES
UIDE

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

E265

Table of Contents