6100 BSC Programming Manual

Writing Applications that Use 6100 BSC
REQUESTS AND RESPONSES
The rest of this section describes the requests an application
can issue, and the responses BSC makes to the application.
You encode a request to BSC in the WRITEREAD buffer. Figure 3-9
depicts the buffer format. The fields are defined as follows:
Function. This byte contains a number representing one
request function. For example, the number 1
represents the SET CONFIGURATION function.
Modifier. This byte contains a number representing an option
within a function. For example, if the function is
CONTROL, a 5 in this field means "send a TTD
sequence," while a 6 means "send a WACK sequence."
Request ID. This word contains a value from 1 to 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 completed, even if SETMODE 30 applies. If
multiple applications use the same BSC line, they
must assign IDs in different ranges to avoid
duplication.
Text Out. This word contains the length, in bytes, of the
text field within this request.
Text In. This word contains the length, in bytes, of the
text field in the expected response. If the
request is a READ or WRITEREAD with variable length
input, the value is the maximum number of
characters expected. If the response has a fixed
length, as in a FETCH CONFIGURATION request, the
value of Text In is ignored and may be 0.
Text. This string contains additional data needed for the
request. For example, if the function is WRITE,
the string contains the output message or block.
It is this field whose length is noted in the
text out field.
The write count in the WRITEREAD call must be equal to the value
of Text Out plus 8. The extra eight characters accommodate the
other fields in the request. Likewise, the read count in the
WRITEREAD call must equal or exceed the value of Text In plus 8.
3-23