X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-60
Programming Example Written in TAL
6. WRITE invitation to clear.
!
!A Clear request is received.
!A Clear Confirmation is sent.
7. READ data.
!
!If the READ completes with an error 140, then the remote
!device has cleared the call. It wants to stop the data
!exchange.
!An error 140 is returned to the READ.
8. CLOSE the subdevice.
!
!Nothing is sent or received.
Programming Example Written in TAL
The following sample application is written in the TAL programming language for PTP
mode 0. To conform to standard TAL programming practices, the primary routine
appears after the various subroutines. It is labeled “Main Procedure.”
Those examples are written in a generic, or “pseudo-” code.
About The TAL Example
The following sample program demonstrates the CALL procedures OPEN and
CONTROL 17 or CONTROL 11 for PTP mode 0. This program is designed to run on
both the called system and the calling system.
Program Terminology
The program includes the following terms. For the purpose of this example, they are
defined as follows:
Note. To see non-TAL examples of how to program for the PTP protocol, refer to the two
preceding subsections.
Term Definition
TERM^FILE Local terminal or input device