6100 ADCCP Programming Manual
Application Tasks
Writing Applications that Use ADCCP
4–12 069225 Tandem Computers Incorporated
Considerations in Opening a Line
You may want your application to issue multiple OPEN procedure calls, have the
capability to handle unsolicited messages, and have multiple processes open the same
line. For each case, there are specific considerations.
Multiple OPEN Calls. If an application uses multiple OPEN procedure calls, it can issue
separate AWAITIO calls to complete each set of requests or issue one AWAITIO call
passing a -1 instead of the file number. A -1 specifies that the call to AWAITIO applies
to the oldest incomplete operation pending on each file. If a request finishes with a
nonzero condition code, the FILEINFO call should use the file number returned by
AWAITIO.
Typically, the use of multiple file numbers is restricted to data transfer. Tasks like line
configuration, link startup and shutdown, and error recovery are normally
accomplished in the scope of one OPEN call.
Unsolicited Messages. To have your application capable of receiving unsolicited
messages (that is, asynchronous messages) from the protocol tasks, your application
must have an outstanding READ call and an outstanding OPEN call. (Every READ
call must have a corresponding OPEN call.) The only other procedure calls needed on
behalf of the OPEN call dedicated to asynchronous messages would be READ,
AWAITIO, and CLOSE. If the same file number used in the READ call also appears in
other requests (that is, if there is no OPEN call dedicated to the READ call), the
application issues SETMODE 30 to the same file number used in the READ.
Multiple Processes Opening the Same Line. If multiple processes open the same line, the
following tasks should either be undertaken by only one of them or carefully
coordinated among the openers because these tasks affect all the users of the line:
Only one process should set or change the line configuration.
Only one process should define the station list, or change the condition of a station
addressed by multiple openers. (For instance, a process shouldn’t put a station in
NOPOLL condition if another process must communicate with the remote station.)
Only one process should start up or shut down the link with a remote station. If
different processes communicate with different remote stations, each process may
manage the link with its own stations; thus, only one process should be able to
stop the line.
Only one process should perform modem-control functions.
Only one process should issue the READ call to accept asynchronous messages
from ADCCP.
Only one process should issue requests to receive data from the line.
Although many processes might have to retry requests after a failure, any changes
in the mode or state of a station or the state of a link should be carefully planned
with other users of the line.