X25AM Programming Manual
PTP Applications
X25AM Programming Manual—527201-001
3-4
Clearing a Call
The READ Procedure
The remote device can send data before your application issues a READ for it. Data 
can be queued by PTP until your application issues a READ, at which time the data is 
transferred to your application. PTP reads and queues from one to L3WINDOW data 
packets and one interrupt packet.
At no time is data sent from the remote device lost because the application did not 
issue a READ.
When a packet is received by PTP, an updated P(R) (expected sequence number) is 
returned with a data packet, or, if there is no data packet, with an RR packet. The 
SYSGEN option L3IMMEDIATERR determines when an RR packet is sent.
•
L3IMMEDIATERR = ON
An RR packet is sent immediately when a data packet is read.
•
L3IMMEDIATERR = OFF
An RR packet is sent every time the L3WINDOW becomes full.
Losing Data. If your application uses the CANCEL procedure to cancel a READ, data 
might be lost. Therefore, you should not use CANCEL to terminate outstanding READ 
requests.
PTP only queues data and interrupt packets. Under normal circumstances, packet 
contents are not lost. If something happens and the possibility of lost packets exists, 
then the READ procedure terminates with one of the following:
•
A Clear packet or error 140.
•
A Reset packet or error 122.
The WRITE Procedure
A write operation completes normally once the file-system buffer content has been 
written by PTP. This does not guarantee that the packets were received by the remote 
device.
Clearing a Call
Your application clears a call when it wants to stop the data exchange. A PVC does not 
require call disconnection. A virtual call requires a call disconnection for every call.
Your application clears a call with one of the following file-system procedures:
•
CONTROL 12. A Clear Request is sent, and a Clear Confirmation is received. If 
the CONTROL 12 completes normally, then the call has been disconnected. If it 
does not complete normally, the error returned indicates the cause of the failure. 
Your application can set the reason for call clearing (the cause and diagnostic 
bytes of a diagnostic packet) with the SETPARAM 2 procedure.










