6100 ADCCP Programming Manual

Application Tasks
Writing Applications that Use ADCCP
4–18 069225 Tandem Computers Incorporated
dPtr->text_out = textout;
dPtr->text_in = textin;
count = length;
c_code = WRITEREAD(rfnum,(short *)dPtr,length,count,&count_trans);
if (c_code != CCE) {
FILEINFO(rfnum,&error);
printf("Error %d occurred on WRITEREAD\n",error);
ABEND();
}
}
For an ABM link, the request provides the address of the local primary substation.
For a multipoint link, the request provides the following data for each station, which is
provide in the (69) DEFINELIST request (see the description of the (69) DEFINELIST
request in Section 6, “Requests and Responses”):
Station ID Identifies the station and is used in all subsequent requests for the
station.
Station type Specifies whether the local station is a primary or secondary station.
Condition Specifies the beginning condition of the station. The condition can be
one of the following: active, NOPOLL, RNR, or ERRORSTOP.
Address Specifies the address of the station.
If several applications use the line to communicate with different stations, each
application should define its own stations. Then the first opener can define a whole
list, giving dummy values (like NOPOLL) to stations that will be defined by other
applications. Subsequent openers can add to the list in their DEFINELIST requests;
however, the station ID in a subsequent (69) DEFINELIST request must match the ID
assigned to the station in the first (69) DEFINELIST request.
Note If the station ID in a subsequent DEFINELIST request does not match the ID assigned in the first
DEFINELIST request, the ADCCP protocol module will return a response indicating an illegal state.
If several applications use the same stations, they must carefully coordinate the station
definitions and any changes they make. To make changes, use the (70) CHANGELIST
request in your application.
To determine the order in which stations are polled, an application makes a
WRITEREAD call with the (71) SCAN LIST request. Otherwise, the ADCCP protocol
module polls stations in order by station ID. The polling order affects all users of the
line. Therefore, if multiple applications use the line, it is best for only one application
to define the scan list.
The DEFINELIST, SCAN LIST, and CHANGELIST requests are described in detail in
the Section 6,” Requests and Responses.”