X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-7
Mode 0
Mode 0
Your application processes a logical record in a single file-system operation. The
logical record always consists of data. PTP does the following:
Disassembles a logical record written by your application into one or more data
packets. The M bit is set to 1 in all except the last packet.
Assembles data from one or more packets into a logical record for your application
to read.
The logical record must fit in the file-system buffer. The maximum buffer size is
determined by MAXIOSIZE. Therefore, the maximum record size cannot exceed
MAXIOSIZE. Packet types and application buffer contents used for mode 0 are shown
below:
Acceptable packets: Data packets
Buffer contents: Data for or from all packets needed for a logical record
READ Request
Your application posts a READ to a subdevice. When the READ completes, the
filesystem buffer contains the data for an entire logical record that has been assembled
from one or more packets by PTP.
READ COUNT can vary for each logical record but cannot exceed MAXIOSIZE. When
the READ completes successfully, COUNT READ indicates how much data was read.
If the logical record length exceeds READ COUNT, the extra data (logical record length
minus READ COUNT) is discarded. No error is returned.
Data packets can have the Q bit set to 0 or 1. When the data is transferred to the
application (in the form of a logical record), the application has no way of knowing the
value of the Q bit.
WRITE Request
Your application posts a WRITE to a subdevice. When the WRITE begins, the
filesystem buffer must contain data for an entire logical record, which will be
disassembled into one or more packets by PTP. Each data packet will have the Q bit
set to 0. All data packets except the last one have the M bit set to 1.
WRITE COUNT can vary for each logical record but cannot exceed MAXIOSIZE.
WRITEREAD Request
Your application posts a WRITEREAD to a subdevice. The WRITEREAD is processed
as a WRITE followed by a READ. When the WRITE portion completes, the request is
moved to the end of the READ queue.