< service request >
< send status byte >
WRITE
communication packet
ACK
data packet
< serial poll enable> (030)
< talk host 1 > (101)
< untalk > (137)
< serial poll disable> (031)
< talk host 1 >
--->
< untalk >
< listen host 1 >
ACK YES
<---(137) (041)
Iresponse packet \
< unlisten >
< talk host 1 >
--->
< untalk >
< listen host 1 >
<---
ACK< unlisten >
YES
(077 ) (101)
(137) (041)
( 077)
Communicating with the 10M 6 - 37
10M Software Reference Manual version 1.4 Britton-Lee Inc.
6.4.3.
If transmission errors occur over the communication line causing the loss of synchronization in the communica-tion protocol, IFC (Interface Clear) will be issued by the 10M. Following every resynchronization, the startup proto-col is performed, and the host must send an IDENTIFY packet.
This action may take place as a result of repeated negative acknowledgements (NACKs) from the host, when an acknowledge-ment byte is not recognizable, or when synchronization is
lost for any reason.
Loss of synchronization may occur dur ing a host-10M communication sequence, or outside of such a sequence. The host must always respond to IFC by performing the startup protocol. IFC indicates to the host that: synchronization was lost between the IDM and the host, synchronization was lost between the IDM and another host on the bus, or the 10M is returning after a fai lure. Therefore, upon rece iving IFC, the host must:
1. perform startup protocol 2. check response
if 10M failure occurred:
cancel all user programs waiting on IDM requests
if the host was in a host-10M communication sequence:
re-issue interrupted request
6.5. The Serial Interface
6.5.1. The ~R-232-C Interface
. - .- - -~- ._.-
--- --
---.-.---Ser ial I/O to the 10M is achieved through a standard RS-232-C Interface. rrhe character istics
2 of this standard are described in "EIA Standard RS-232-C" Communication is asynchronous using a full duplex character or iented proto-col. The data transmitted consists of 8 bit binary with no parity and one stop bit. The baud rates supported by the IDM are:
---::~---.---
~-.-2 "ETA Standard RS-232-C Interface Between Data Termi-nal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange", Electronic Industries Asso-ciation, August 1969.
Communicating with the 10M 6 - 38
TDM Software Reference Manual Version 1.4
The communication protocol descr ibed in the previous section can be easily achieved for the SERIAL interface. rather than acknowledgement bytes. This condition is easily detected. The host always reads one byte after sending a condition, sends the appropriate acknowledgement and, at a later time, resends the communication packet that was
TOM Software Reference Manual Version 1.4 Britton-Lee Tnc.
Standard). This will reset the protocol between the TOM and the host. Following this BREAK, the TOM is ready to accept a communication packet from the host.
To aid in the resynchronization process, when the TOM is expecting to read a communication packet from the host, it will ignore all characters until it reads a HEADER byte.
Tf it is not possible for the host to send a BREAK, it can attempt to resynchronize by simply sending a communication packet to the TOM. The TOM will always attempt to resyn-chronize when it receives characters at a time when charac-ters from the host are not expected. However, without using BREAK, resynchronization by sending a communication packet to the TOM is not always possible, since the TOM may be expecting data from the host.
Resynchronization is used when the program actually communicating with the TOM abnormally terminates, or when it is desirable to stop a communication protocol with the 10M.
An example of the latter case is when the host has issued a REAOW command and is waiting for the results to be returned.
If the host wishes to abort this request, it issues a BREAK and then the CANCEL communication packet to flush the results.
6 - 40 Communicating with the 10M
10M Software Reference Manual Version 1.4 Britton-Lee Inc.
7. 10M Command Set
This section presents the 10M command set. The 10M does not have a "machine language" in the normal sense. To
"program" the 10M it is necessary to send high level com-mands to it and interpret the results. Every command starts
\'li th a command "token" or op-code. Other tokens are used in the definition of parameters to the command. Throughout this document tokens are given in capital letters and are fully defined in Appendix B. Numbers to the immediate right of the token are one-byte length specifiers. This is sent after the token and is followed by that many bytes of data associated with that token.
As mentioned in Section 5, commands take several dif-ferent kinds of parameters. The most complex of these are the query trees. A discussion of the general syntax of the trees is given in Section 5. In this section we show the complete command list and associated query trees for the 10M. The trees are always sent to the 10M using a post-order traversal.
In the query tree examples with each command, the information below the token in parentheses is sent after the token. Some of the error messages which could be received are given with explanations after each command. The com-plete list of error messages is given in Appendix C.
Because it is difficult to understand the commands without glvlng query-language examples we define the query language IOL. 10M parse tree syntax is summarized in Appen-di.x E.
For each command we provide four things: the IOL syntax in a form similar to BNF, the octal command token value, a description of the command, and examples showing both the IDL form and the resulting 10M command. To facilitate presenting the IOL syntax we first define the meta-symbols which will be used in the command definitions.
7.1. IOL meta-symbol definitions
The following symbols are used in examples of 10M com-mands:
- Parentheses are necessary, and must appear literally in the command.
- Anything included in square braces is optional.
- A vertical bar indicates that a choice of words is presented.
- Curly braces indicate that the word may appear
IDM Software Reference Manual Version 1.4 Britton-Lee Inc.
<target list>: <target list element>
--r;
<target list element> }10M Software Reference Manual Version 1.7 Britton-Lee Inc.
commands to specify a target list element which is not to be returned to the host but is used in sorting the data.
<target list element>:
<name>
=
<expression>I
attributeI
<variable> . allTarget lists can be simple, as in the case above, where the target list was composed of a single relation variable and an attribute name. Arbitrary expressions, as defined below, can also be included in the target list. For example:
retrieve (e.name, wages
=
e.salary*
e.hours)ROOT ( 0 0 )
I \
I QLENO
RESOOM
I \
I VAR 5 RESOOM (3 name)
I \
TLENO \
MUL
I \
I \
VAR7 VAR6
(3 salary) (3 hours)
In the above query, the target list is composed of the attribute "e.name" and the expression
"e.salary
*
e.hours". The expression must be given a name in order to be displayed to the user;the name assigned in the above query is "wages". A RESATTR node must be sent instead of a RESOOM node if the 10M is to return the names of the columns in response to command-option 2 in the retrieve command:
10M Command Set Updated September 1984 7-3
IDM Software Reference Manual Version 1.6
ROOT ( 0 0 )
/ \
/ QLEND
RESDOM 5 (name)
/ \
/ VAR 5
RESATTR 5 (3 name) (wages)
/ TLEND
\ MUL
/ \
/ \
VAR 7 VAR 6 (3 salary) (3 hours)
Britton-Lee Inc.
The construct t <variable> . alIt is used to reference all attributes of a relation. This is
I
represented by an ATTRALL node. The form is only valid in the target list and is expanded by the IDM to the equivalent tree using RESATTR and VAR nodes.
7.3. QUALIFICATION
<qualification>: ( <qualification> ) not <qualification>
<qualification> and <qualification>
<qualification or <qualification>
<clause>
The qualification is the part of the database command that determines which objects are affected by the command. The command:
delete emp where emp.salary > 24000
deletes from the relation associated with the variable "empn all employees whose salary is over 24000. The clause "emp.salary > 24000 n is the qualification. The above command has no target list. The following tree would be used in this command:
I
7-4 Updated March 1984 IDM Command Set