X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-9
Mode 2
When the READ completes, COUNT READ will be equal to two (for the MCW) plus the
amount of data transferred to the application buffer.
If the length of the data (that is, the MCW plus the data or interrupt data) exceeds
READ COUNT, the extra data is lost. No error is returned.
An interrupt packet is given priority over data packets in the X.25 network. Interrupt
data can appear in the buffer, interrupting a sequence of buffers containing data from
data packets. PTP delivers interrupt packets before queued data packets.
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.
When the M bit equals 1, this is not the last packet of the logical record. WRITE
COUNT should equal packet size plus the MCW. Networks are allowed to reset the M
bit when a data packet is not full and the D bit is 0.
When the M bit equals 0, this is the last packet for the logical record. WRITE COUNT
can be less than or equal to packet size plus the MCW (two bytes).
WRITEREAD Request
A WRITEREAD is processed like a WRITE followed by a READ. When the WRITE
portion completes, the request is moved to the end of the READ queue.
Mode 2
Your application can process information for most of the packet types. Each packet
type has a corresponding buffer structure that is used to read or write packet
information. The task of deciding which packet type to send and when to send it is the
responsibility of your application. Your application is not responsible, however, for all
packets. Some are still the responsibility of PTP.
Mode 2 should be used in the following situations:
For call setup, to gain access to or to control the address, facilities, and call user
data fields (regardless of the fast select-option).
To initiate circuit resetting.
When the D bit is used, although this is not recommended because the facility is
not supported by all networks. It is expected that this facility will eventually be
eliminated.
When your application has completed call setup, you can change to another mode for
data transfer.
Table 3-4 on page 3-10 shows the packets that your application might see when mode
2 is used. The packet types might differ slightly, depending on whether the NonStop
system is acting as a DTE or a DCE (as it might in a private network).