SNAX/APN Application Programming Manual

The SNALU Interface
SNAX/APN Application Programming Manual420111-001
4-7
Two-Step Read Operations (QRI Usage)
The following WRITEREAD call initiates a read operation that accepts up to 250
bytes into the application I/O buffer named APPLBUF:
The WRITEREAD call completes when SNAX/APN accepts or rejects the read
operation. The corresponding AWAITIO call completes when an inbound BIU has
been received and placed in the buffer.
3. Initiating A Write Operation, Followed by a Read Operation
The following WRITEREAD call initiates two consecutive operations—a write
operation followed by a read operation:
The write operation transmits 100 bytes from the application I/O buffer named
APPLBUF. The read operation then accepts up to 250 bytes into the same I/O
buffer. The WRITEREAD call completes when SNAX/APN accepts or rejects the
write, or write followed by read, operation. The associated AWAITIO completes
when an inbound BIU has been received and placed in the buffer.
Two-Step Read Operations (QRI Usage)
The Queue Request Indicator (QRI) in byte 0 of the SNAX header provides a
mechanism whereby an application can make the most efficient use of available buffer
space. Its purpose and usage is analogous to the two-step read operation employed by
other Tandem products.
If the QRI control bit is set by the PLU or SLU in an outbound SNAX header, the
associated read operation completes with only a byte count in the data portion of the
application I/O buffer. The PLU or SLU then initiates a second read operation to obtain
the incoming data.
When setting the QRI control bit, the WRITEREAD call must include:
write-count must be at least 6, with the write buffer containing at least the first
6 bytes of the SNAX header.
read-count must be at least 12 (9-byte SNAX header, 1-byte filler, and 2-byte
count).
The QRI control bit can be set as part of any WRITEREAD call (even one that is
transmitting a BIU), but there can be only one outstanding QRI request at any given
time.
If the application issues a QRI request without transmitting any data, then the
WRITEREAD call must include the following:
write-count must equal 6
the QRI bit in the first byte of the outbound SNAX header must be set to 1
WRITEREAD (filenum, APPLBUF, 0, 250)
CALL WRITEREAD (filenum, APPLBUF, 100, 250)