6100 ADCCP Programming Manual
Application Tasks
Writing Applications that Use ADCCP
069225 Tandem Computers Incorporated 4–19
Preparing to Receive
Asynchronous Messages
To receive asynchronous line quality reports from the ADCCP protocol module, an
application must issue a nowaited READ call. If the application is responsible for
establishing the modem connection (see “Starting the Link,” below), the READ call
that will handle asynchronous messages should precede the modem connection task.
In cases where there is more than one application opening the line, any other
application not connecting to the modem should issue the READ call as early as
possible, so that it is in effect by the time the modem connection occurs.
If an application opens the line more than once, it still issues only one READ call.
Unless there is an OPEN call dedicated to that READ call, the application must also
issue a SETMODE 30 call to allow the READ to finish out of sequence with other
requests. If the READ finishes, your application should always issue another one
immediately.
If an application uses SETMODE 30, operations other than the READ call can also
finish out of sequence. Almost all requests are embedded in WRITEREAD calls, and
each has a unique request ID in the buffer of the WRITEREAD call. (The application
assigns the ID, as explained in the CP6100 I/O Process Programming Manual.) When the
call finishes, the request ID is in the response buffer; thus, you can always identify the
request that finished. CP6100 and ADCCP also support tags in WRITEREAD requests.
Note Only one application should issue the READ call to accept asynchronous messages.
Starting the Link Starting up the link requires three or four requests, depending on whether the line is
switched or leased. The required requests are:
START
MODEM CONTROL
MODE SET
RECEIVETEXT
START
An application makes a WRITEREAD call with the START request to cause the
ADCCP protocol module to initialize its driver and to establish the modem connection
if the line is leased.
Note The START request is unrelated to the CMI START command, but both are required for the link to be
active.
MODEM CONTROL
If the line is switched, the application makes a WRITEREAD call with the MODEM
CONTROL request, causing ADCCP to assert DTR; the appearance of DSR completes
the request.