X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-22
Mode 3
READ Request
Your application posts a READ to a subdevice. When the READ completes, the first
word in the buffer is the MCW. Bit <13> indicates whether the rest of the buffer
contains a data block or data from one interrupt packet.
If the M bit equals 1, then the logical record consists of data from more than one block,
and the current block is not the final block. Continue posting READ statements until the
M bit equals 0, signifying that this data is from the final block.
An interrupt packet has priority over data packets in the X.25 network. Interrupt data
can appear in the buffer, interrupting a sequence of buffers containing data blocks.
When the request completes, COUNT READ will be equal to the MCW (two bytes) plus
the amount of data transferred to the application buffer.
If the length of the buffer (that is, the MCW plus the data or interrupt data) exceeds
READ COUNT, the extra data is lost. No error is returned.
WRITE Request
Your application posts a WRITE to a subdevice file. The first word in the buffer is the
MCW. Bit <13> indicates whether this is data for a data packet or an interrupt packet. If
this data is not for a final packet, then the M bit should be set to 1. If it is for the final
packet, then the M bit should be set to 0. When PTP packetizes the application data,
all data packets except the last will have the M bit set to 1. The last data packet will
have the M bit set to the value in the MCW.
When the M bit is set to 1, WRITE COUNT should be the MCW plus an integer number
of data packets. Some networks clear the M bit if a packet is not full.
Interrupt Packets
Buffer contents:
MCW
Data bytes
Table 3-7. Message Control Word (MCW) Used for Mode 3
Bit Number Bit Value Bit Name Meaning
<0:12> 0
<13> 0 This is data.
<13> 1 This is an interrupt packet.
<14> 0 Q bit This is really data (user-defined bit).
<14> 1 Q bit This is some other kind of information (user-defined
bit).
<15> 0 M bit This is a final data block.
<15> 1 M bit This is not a final data block.