26
QTERM-IV/P40 User's Manual
Beijer Electronics Fax 801-466-8792 Web www.beijerelectronicsinc.com Phone 801-466-8770
The QTERM automatically sends the EOP Terminator at
the end of all Response Packets it returns to the host.
RESPONSE PACKET
A Data Packet automatically returned by the QTERM after
it receives a complete transmission from the host. The
Response Packet's data portion can consist of nothing (a
NULL packet), data returned in response to a query com-
mand or an acknowledgment byte. The Response Packet is
always terminated with an EOP Terminator.
IDLE MODE
The operating mode of the QTERM anytime it is neither
processing strings nor receiving data from the host.
EDIT MODE
The operating mode in which string data is entered into an
LCD buffer and edited prior to transmission to host.
4.3.1
Receiving Data from the Host
If the QTERM is in IDLE, and the host begins a transmis-
sion, the QTERM will only process data coming from the
host until the EOP Terminator is received; keystrokes will
be buffered but not processed. While receiving the incom-
ing packet from the host, the incoming data is displayed
and incoming commands are executed as they are received.
Upon receiving the EOP Terminator from the host, the
QTERM will send a response packet, process any buffered
keystrokes, and revert to IDLE to await the next event.
4.3.2
Response Packets
The QTERM always returns a response packet after receiv-
ing a host packet (unless ACK/NAK responses are dis-
abled; see below). The data portion of the response packet
will always consist of one of the following: nothing (a Null
Packet), query data (in answer to a query command sent by
the host), or either an ACK (ASCII 06h) or NAK (ASCII
15h) character. Response packets are always automatically
terminated by the EOP character.
Null Packets are only returned in response to a Query
Buffer command; this command is not useful in Block
Mode since the EDIT Buffer never needs to be queried.
Other types of query commands sent by the host will cause
the QTERM to return data.
If the QTERM receives a command from the host which
requires that the QTERM return data to the host, i.e. a
Query Cursor Position command etc., the requested data
will be sent in lieu of any acknowledgment byte.
Acknowledgment bytes are only returned if nothing in the
incoming host packet requires the QTERM to return query
data. For example, if the host sends a packet containing
only display data to the QTERM, the data portion of the
QTERM response packet will contain only an ASCII ACK
or NAK acknowledgement byte. If instead, the host sends
display data and a Query Cursor Position command, the
QTERM response packet will contain the current cursor
position only without an acknowledgement byte.
The only acknowledgement bytes are ACK (ASCII 06h) or
NAK (ASCII 15h) character to indicate that the QTERM
received the host's transmission without error or that the
QTERM was busy and ignored the host transmission,
respectively. Automatic transmission of response packets
containing acknowledgement bytes may be disabled, if nec-
essary, by the [MD/Block response mode] field in the
QDATA file.
4.3.3
Transmitting Data to the Host and the Opera-
tion of EDIT Mode
The host data portion of a string is not sent immediately to
the host when the string is executed. Instead, host data is
buffered on the display in a special area called the EDIT
buffer. The EDIT buffer position is variable and is reset
each time the QTERM receives a packet from the host. At
the termination of an incoming packet, the start of the EDIT
buffer is relocated to the last cursor position. The EDIT
buffer always extends to the end of the same line on which
it started.
If a key is pressed while the QTERM is in IDLE, or if there
are buffered keystrokes waiting to be handled after the
QTERM received a packet, or some other string has been
triggered (i.e. Timeout string, Autoexec string etc.) the
QTERM enters EDIT mode.
While in EDIT mode, the host data portion of executed
strings will be entered into the EDIT buffer up to the end of
the buffer. Keys may be defined using certain commands as
edit keys (described below) with which to modify the data
in the EDIT buffer prior to transmission. While in EDIT
mode, incoming packets from the host will not be pro-
cessed (with a few exceptions noted below) but will gener-
ate a response packet containing a NAK acknowledgement
indicating to the host that the packet was not processed.
Keystrings will continue to be appended to the EDIT buffer
until the EOP Terminator is encountered in the current
string definition or until the user hits a key defined with the
EOP character. When the EOP character is encountered, the
entire EDIT buffer is sent to the host, the cursor is returned
to the start of the EDIT buffer, EDIT mode is terminated
and the QTERM returns to IDLE. Because of this, you must