X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-23
Subdevice States
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.
Subdevice States
A subdevice can be characterized by its physical state, which depends on what the
subdevice is doing. Only certain buffer formats can be written for each of these states.
Table 3-8 list these formats. In general, if the appropriate buffers are written in the
correct order, there will be no problem. Writing an invalid buffer format results in error
160 (request invalid for line state). The packet formatted from the buffer contents will
not be transmitted.
The Two-Step Read
The two-step read operation was used when insufficient pool space was a problem.
This operation is no longer required but you may find it in already-existing applications.
New applications do not require this procedure, and should not use it.
The two-step read is not allowed with data-exchange mode 0. This operation can be
used with PTP modes 1, 2, and 3.
The two-step read allows you to determine how much data PTP has for you before you
determine the size of your application buffer. The first step of the two-step read, a
WRITEREAD, determines the size of the application buffer required for the data. The
second step is the actual reading of the data. Your application should post a
WRITEREAD statement with the appropriate WRITE COUNT, READ COUNT, and
MCW for the data-exchange mode currently in effect.
Table 3-9 on page 3-24 shows these parameters.
Table 3-8. Subdevice States and Valid Packet Types
Valid WRITE Buffer Formats
Subdevice State Call Call Accept Data Interrupt Clear Reset
Ready (P1) Yes
Calling (P2) Yes
Called (P3) Yes Yes
Data Transfer (D1) Yes Yes Yes Yes
Interrupt (J2) Yes Yes Yes
Clearing (P6)
Cleared (P7)
Reset (D3) Yes Yes
Resetting (D2) Yes Yes