Envoy Application Programming Manual

Table Of Contents
Asynchronous Line Supervisor Protocol
Envoy Application Programming Manual427159-001
10-11
Message Formats
WRITE
Transmits data to a terminal. The call to WRITE causes Envoy to transmit a
message on the line to the terminal. (This call cannot be used by read-only lines.)
WRITEREAD
Performs a WRITE sequence on the line followed by a READ sequence. (The
READ accepts a response.) This procedure allows an application process to perform
polls and selects to a terminal network. (This call cannot be used by read-only lines.)
Message Formats
A message is defined as the information transmitted over a communications line as a
result of a single call to the READ or the WRITE procedure.
The information read to or written from the line-buffer area of the application process
consists of two parts: a one-word message control word (MCW) and the message.
line buffer[0] = MCW
line buffer[1:ms - 1] = message
where ms is the message size in words (message length in bytes plus one, divided by
two).
The form of the message control word is
The message control word is not transmitted over the communications line. The
message control word is reflected in the count read or written:
count read or written = 2 + message length
^
|
(message control word in bytes)
When a message is received, all characters in the message are returned to the buffer of
the application process. Envoy optionally strips certain characters, but does not detect
any control characters in the data stream except for the termination characters that were
specified when issuing the ADD DEVICE command.
Messages must be formatted prior to transmission. All control characters for a particular
message type (such as poll or select) must be placed in the message by the application
process. In the Asynchronous line supervisor protocol Envoy does not generate any
control characters for the line, nor does it perform any block checking.
MCW.<0:7> = 0
MCW.<8:15> = receive number
The receive number is a binary number, equivalent to 0 to 377
octal, of the block received from the line. The number resets to 0
after 377 octal. The receive number allows the application
process to keep track of the variable sized data blocks returned
from a READ.