GDSX Manual

DEVICE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual134303
5-4
Task I/O Calls
The following is a list of pseudo Guardian, NonStop TS/MP, and TMF procedures that
must be used instead of their counterparts. (Many TSCODE-supported procedures do
Figure 5-2. DEVICE^HANDLER Example: Sending a Request to a Terminal
Data goes to the IOP
and is sent to the
terminal.
Application
GDS (TSCODE and USCODE)
A WRITEREAD with
data is sent to GDSX.
TSCODE checks $RECEIVE for input and identifies the
USCODE D^H task that is to handle the WRITEREAD.
TSCODE checks to see whether a ^READUPDATE on
the tasks pseudo-$RECEIVE has been issued by the
task. (Issuing ^READUPDATE makes it possible to
receive incoming messages.)
NO
TSCODE queues request. (D^H task receives
this message when it issues a ^READUPDATE.)
YES
The USCODE D^H task performs datastream conversion.
The D^H task issues a ^WRITEREAD to send the data
to the terminal.
TSCODE receives the ^WRITEREAD and sends a
Guardian WRITEREAD to the terminal.
The D^H task sends a response to the application by
calling ^REPLY.
Requester receives
response.
TSCODE receives the I/O completion message and
passes it to the D^H task for processing.
TSCODE notifies the D^H task of the pending message
by calling WAKE^TASK, and forwards the message to the
D^H task for processing.
While the IOP handles the data, the D^H task issues an
^AWAITIO, waiting for completion of the ^WRITEREAD.
IOP/Terminal
The I/O completion
message is sent.