X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-5
PTP Data-Exchange Modes
WRITEREAD. It writes the Clear Request and reads the Clear Confirmation (see
PTP mode 2 subsection for detail). If the WRITEREAD completes normally and
reads a Clear Confirmation, then the call has been disconnected. It can also
complete normally and read the cause of the failure.
WRITE. It writes the Clear Request (see PTP mode 2 subsection for detail). If the
WRITE completes normally, then the call has been disconnected.
Your application is responsible for determining how the outcome of a procedure call
should be processed.
Solving the Clear Packet Problem
Clear packets take priority over data packets in most networks. If your application
clears a call immediately after writing the last data packet, it is very likely that the Clear
packet will overtake the data packet and arrive at the remote DTE first. The remote
DTE will engage in the clearing process, disconnecting the call. The data packet is lost.
The solution is to send an Invitation To Clear data packet immediately after the last real
data packet. This packet is a data packet and has the same priority as other data
packets. All of the data packets arrive at the remote DTE and are handled in the
correct order. The remote DTE then clears the call.
The coding of an Invitation To Clear data packet is application- dependent. Both parties
must agree on what information is put into a data packet to indicate the Invitation To
Clear. Often a data packet with the Q bit set to 1 is used to indicate Invitation To Clear.
PTP Data-Exchange Modes
Your application exchanges logical records with the remote device. A logical record is
an entire message consisting of data from one or more data packets. You can
subdivide logical records into the following parts:
Data Block: Part of an entire message consisting of data from one or more data
packets.
Packet Data: The smallest part of a message that can be transferred, consisting of
the data from a single packet.
How logical records are subdivided and how the exchange of data occurs are the basis
for the various modes of data exchange. PTP has four modes: 0, 1, 2, and 3. The
default is mode 0. A SETMODE 31 issued by your application can change the mode.
Modes 1, 2, and 3 use a Message Control Word (MCW) in the file-system buffer to
communicate with PTP.