6100 ADCCP Programming Manual

Format of Requests and Responses
Writing Applications that Use ADCCP
4–26 069225 Tandem Computers Incorporated
Although the format of the buffer is the same for all requests and responses, the
meaning of the fields will vary depending on whether the data in the buffer is a
request, response, or an asynchronous response (that is, a response from the protocol
module for which there is no matching request from the application ).
Definitions of Fields in
Requests
The fields in the WRITEREAD request buffer are defined as follows:
Function A byte that contains a number representing one request function. For
example, the number 1 represents the SET CONFIGURATION function.
Modifier A byte that contains a number representing an option within a function.
For example, if the function is DEFINELIST, a 1 in this field calls for a
brand new station list, while a 0 calls for a change or addition to an
existing list.
Request ID A word that contains a value from 1 through 32767, which identifies this
request among pending requests for the line. Because this ID is echoed
in the response to the request, you can always tell which request
finished, even if SETMODE 30 applies. If multiple applications use the
same line, they should assign IDs in different ranges to avoid
duplication. The ADCCP protocol module accepts duplicated Request
IDs.
Text out A word that contains the length, in bytes, of the text field within this
request.
Text in A word that contains the length, in bytes, of the text field in the expected
response.
Text A string that contains additional data needed for the request. For
example, if the function is SENDTEXT, the string includes the station ID,
the setting for the poll/final bit, the type of frame to send, and the I-field
for the frame. The text out field contains the length of this field.
Definitions of Fields in
Responses
After a request finishes, data is returned to the WRITEREAD buffer as the response to
the request. The WRITEREAD buffer has the same structure as it did for the request;
however, some of the fields have different meanings:
Response A byte that contains the same number that denoted the function in the
request. For example, the number 1 occurs in the response to SET
CONFIGURATION.
Status A byte that contains a code representing normal completion or an error.
For example, the number 0 indicates normal completion; the number 70
means an invalid frame arrived on the line. Frames that have the poll bit
set are indicated in this field.
Request ID A word that contains the same number as in the corresponding request.
Thus you can tell which request finished because this number matches
the request ID of the request that caused the response message.
Reserved A reserved word; its contents mean nothing.