GDSX Manual
Extended General Device Support (GDSX) Manual–134303
E-1
E
Intertask Communication Example
This appendix contains an example of sending and receiving ITC messages between two
DEVICE^HANDLER tasks. The example code, USAMPLE3, is used for both tasks and
illustrates the use of the following procedures:
GET^ITC^FCB
ITC^OPENX
^LISTEN
NOTIFY^IO^COMPLETIONX
^READUPDATEX
SEND^ITC^MSGX
Examples are given for the various steps required to compile, bind, configure, and start
the GDSX application.
Once the application is running, you can use a utility, such as FUP, to send data to one of
the tasks through $RECEIVE. The following steps list the processing flow and assume
you first send input data to TASK1:
1. TASK1 reads the input data from $RECEIVE.
2. TASK1 displays the input on the terminal it is configured for.
3. TASK1 sends the input data to TASK2 in an ITC message.
4. TASK2 displays the input from the ITC message on the terminal it is configured for.
5. TASK2 notifies TASK1 when it has completed processing the ITC message.
6. TASK1 checks $RECEIVE for more incoming data.
The processing flow is the same if you begin by sending data to TASK2.
Running the Example
USAMPLE3 is included with the GDSX software. Running it as a GDSX application
requires the usual steps of compilation, binding, configuration, and so on. If you want to
run USAMPLE3, you need to do these steps as shown by the following examples.
Substitute your volume and subvolumes names for the names shown in the examples.
Compiling USAMPLE3
The first step is compiling the user code USAMPLE3. The following commands are
entered in an OBEY file called COMP3:
CLEAR All
PARAM WORKFILE $CRASH
COMMENT Assign SSV0 to the volume and subvolume for
COMMENT the GDSX installation subvolume
ASSIGN SSV0, $SKY.LINZ