Hide thumbs Also See for e355:
Table of Contents

Advertisement

A
RCHITECTURE

read()

read()
Prototype
Parameters
Return Values
20
355/
265 U
E
E
SER AND
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.
int read(int handle, char *buffer, int count);
handle
buffer
count
Returns the number of bytes read, or -1 if an error occurred.
B
P
G
EST
RACTICES
UIDE
The handle returned for the device by the open() call.
The buffer from which to copy the data.
The maximum number of bytes requested.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

E265

Table of Contents