GDSX Manual
Design and Development
Extended General Device Support (GDSX) Manual–134303
2-99
The DEVICE^HANDLER Procedure
The DEVICE^HANDLER Procedure
The DEVICE^HANDLER procedure included in USAMPLE is usable either with the
LINE^HANDLER or in environments that are not Envoy environments. The procedure
body is a state machine having the same basic design as the machine employed in the
LINE^HANDLER. Seventeen device states are defined, as follows:
Device actions defined are as follows:
Device State Description
0 - d^null Task has no I/O operations outstanding.
1 - d^idle READUPDATE posted on $RECEIVE; waiting on request from
requester process.
2 - d^request A new request has been received from the external opener. No I/O
operations outstanding.
3 - d^write WRITE operation in process to terminal.
4 - d^read READUPDATE posted on $RECEIVE.
5 - d^read1 READ operation in process on terminal; READUPDATE posted on
$RECEIVE.
6 - d^setmode SETMODENOWAIT in process to terminal.
7 - d^control CONTROL in process to terminal.
8 - d^writeread READUPDATE posted on $RECEIVE.
9 - d^writeread1 WRITEREAD operation in process on terminal; READUPDATE posted
on $RECEIVE.
10 - d^preread READUPDATE posted on $RECEIVE.
11 - d^preread1 CONTROL 22 posted on terminal; READUPDATE posted on
$RECEIVE.
12 - d^preread2 READ posted on terminal; READUPDATE posted on $RECEIVE.
13 - d^preread3 READ posted on terminal; READUPDATE posted on $RECEIVE.
14 - d^reset1 A -20 system message has been received. A SETMODENOWAIT is in
process to set the access mode for the terminal to break access.
15 - d^reset2 A zero-length write is in process to position the cursor to column 1 of
the next row on the terminal.
16 - d^reset3 A SETMODENOWAIT is in process to set the terminal mode and
access to normal.
Device Action Description
1 - da^null Do nothing.
2 - da^read^receive Post ^READUPDATE on $RECEIVE.
3 - da^read Initiate READ on terminal.
4 - da^write Initiate WRITE to terminal.
5 - da^setmode Initiate SETMODENOWAIT to terminal.