semi合集-English.pdf - 第1588页
SEMI E37-0303 © SEMI 1995, 2003 10 Table 5 SType Value Description 0 Data Message 1 Select.req 2 Select.rsp 3 Deselect.req 4 Deselect.rsp 5 Linktest.req 6 Linktest.rsp 7 Reject.req 8 (not used) 9 Separate.req 10 (not use…

SEMI E37-0303 © SEM 1995, 2003 9
8.1 General Message Format
8.1.1 Byte Structure — Within HSMS, a byte contains
eight (8) bits. The bits in a byte are numbered from Bit
7 (most significant) to Bit 0 (least significant).
8.1.2 Message Format — An HSMS Message is
transmitted as a single contiguous stream of bytes in the
following order:
Table 2 HSMS Message Format
Number
of Bytes
Description
4 Bytes Message Length. MSB First. Specifies the
number of bytes in the Message Header plus the
Message Text.
10 Bytes Message Header.
0–n Bytes Message Text. Format is further specified by
PType field of message header.
8.1.3 Message Length — Message Length is a four-
byte unsigned integer value which specifies the length
in bytes of the Message Header plus the Message Text.
Message Length is transmitted most significant byte
(MSB) first and least significant byte (LSB) last.
The minimum possible Message Length is 10 (Header
only). The maximum possible Message Length is
implementation-specific.
8.1.4 Message Header — The Message Header is a ten-
byte field. The bytes in the header are numbered from
byte 0 (first byte transmitted) to byte 9 (last byte
transmitted). The format of the Message Header is as
follows:
Table 3 HSMS Message Header
Bytes Description
0–1 Session ID (Device ID)
2 Header Byte 2
3 Header Byte 3
4 PType
5 SType
6–9 System Bytes
The physical byte order is designed to correspond as
closely as possible to the SECS-I header.
8.1.4.1 Session ID — Session ID is a 16-bit unsigned
integer value, which occupies bytes 0 and 1 of the
header (byte 0 is MSB, 1 is LSB). Its purpose is to
provide an association by reference between control
messages (particularly Select and Deselect) and
subsequent data messages. It is the role of HSMS
subsidiary standards to specify this association further.
8.1.4.2 Header Byte 2 — This header byte is used in
different ways for different HSMS messages. For
Control Messages (see SType, below) it contains zero
or a status code. For a Data Message whose PType (see
below) = 0, it contains the W-Bit and SECS Stream.
For a Data Message with PType not equal to 0, see
“Special Considerations.”
8.1.4.3 Header Byte 3 — This header byte is used in
different ways for different HSMS messages. For
Control Messages, it contains zero or a status code. For
a Data Message whose PType (see below) = 0, it
contains the SECS Function. For a Data Message with
PType not equal to 0, see “Special Considerations.”
8.1.4.4 PType — PType (Presentation Type) is an 8-bit
unsigned integer value which occupies byte 4 of the
header. PType is intended as an enumerated type
defining the presentation layer message type: how the
Message Header and Message Text are encoded. Only
PType = 0 is defined by HSMS to mean SECS-II
message encoding. For non-zero PType values, see
“Special Considerations.”
Table 4 PType
Value Description
0 SECS-II Encoding
1–127 Reserved for subsidiary standards
128–255 Reserved, not used
8.1.4.5 SType — SType (Session Type) is a one-byte
unsigned integer value which occupies header byte 5.
SType is an enumerated type identifying whether this
message is an HSMS Data Message (value = 0) or one
of the HSMS Control Messages (other). Those values
not explicitly defined in the table are addressed in
“Special Considerations.”

SEMI E37-0303 © SEMI 1995, 2003 10
Table 5 SType
Value Description
0 Data Message
1 Select.req
2 Select.rsp
3 Deselect.req
4 Deselect.rsp
5 Linktest.req
6 Linktest.rsp
7 Reject.req
8 (not used)
9 Separate.req
10 (not used)
11–127 Reserved for subsidiary standards
128–255 Reserved, not used
8.1.4.6 System Bytes — System Bytes is a four-byte field occupying header bytes 6-9. System Bytes is used to
identify a transaction uniquely among the set of open transactions.
Uniqueness — The System Bytes of a Primary Data Message, Select.req, Deselect.req, or Linktest.req message must
be unique from those of all other currently open transactions initiated from the same end of the connection. They
must also be unique from those of the most recently completed transaction.
Reply Message — The System Bytes of a Reply Data Message must be the same as those of the corresponding
Primary Message. The System Bytes of a Select.rsp, Deselect.rsp, or Linktest.rsp must be the same as those of the
respective “.req” message.
8.2 HSMS Message Formats by Type — The specific interpretation of the header bytes in an HSMS message is
dependent on the specific HSMS message type as defined by the value of the SType field. The complete set of
messages defined is summarized in the table below, shown for PType = 0 (SECS-II message format).
Table 6 HSMS Message Format Summary
Message Header
Message Type
Bytes 0-1
SessionID
Byte 2
Byte 3
Byte 4
PType
Byte 5
SType
Bytes 6–9 System Bytes
Message Text
Data Message * W-bit and
SECS Stream
SECS
Function
0 0 Primary: UniqueReply:
Same as primary
Text
Select.req * 0 0 0 1 Unique none
Select.rsp Same as .req 0 Select
Status
0 2 Same as .req none
Deselect.req * 0 0 0 3 Unique none
Deselect.rsp Same as .req 0 Deselect
Status
0 4 Same as .req none
Linktest.req 0xFFFF 0 0 0 5 Unique none
Linktest.rsp 0xFFFF 0 0 0 6 Same as .req none
Reject.req same as message
being rejected
PType or
SType of
message
being rejected
Reason
Code
0 7 Same as message being
rejected
none
Separate.req * 0 0 0 9 Unique none
* Indicates further specification by subsidiary standards.

SEMI E37-0303 © SEM 1995, 2003 11
8.2.1 SType=0: Data Message — An HSMS message
with SType = 0 is used by the HSMS Data procedure to
send a Data message, either Primary or Reply. The
message format is as follows:
HSMS Message Length is always 10 (the length of the
header alone) or greater.
The HSMS Message Header is as follows:
Session ID — As described above. Specific value
subject to subsidiary standards.
Header Byte 2 — For messages with PType value =
0 (SECS-II), header byte 2 is formatted as shown
below.
7 6 0
W-Bit Stream
The most significant bit (bit 7) of Header Byte 2 is
the W-Bit. In a Primary Message, the W-Bit
indicates whether the Primary Message expects a
Reply message. A Primary Message which expects
a Reply should set the W-Bit to 1. A Primary
Message which does not expect a Reply should set
the W-Bit to 0. A Reply Message should always set
the W-Bit to 0. The low-order 7 bits (bits 6-0) of
Header Byte 2 contain the SECS Stream for the
message. The Stream is a 7-bit unsigned integer
value, which identifies a major topic of the
message, and its use is defined within SEMI E5
(SECS-II).
Header Byte 3 — For messages whose PType
value=0, header Byte 3 contains the SECS
Function for the message. The Function is an 8-bit
unsigned integer value which identifies a minor
topic of the message (within the Stream), and its
use is defined within SEMI E5 (SECS-II). The
least significant bit (bit 0) of the Function defines
whether the Data Message is Primary or Reply; the
value 1 indicates Primary and the value 0 indicates
Reply.
PType — Set PType = 0 for SECS-II messages.
SType = 0
System Bytes — For PType=0 (SECS-II), the
following definition applies. For a Primary
Message, System Bytes contain a value uniquely
identifying this transaction from all other open
transactions initiated from the same end of the
Connection. For a Reply Message, System Bytes
contain the same value as the corresponding
Primary Message.
The HSMS Message Text contains the text of the Data
Message (if any), formatted as specified by the PType
field. For PType = 0, the text will be formatted as
SECS-II messages.
NOTE 4: Some Data Messages consist of header only, with
no text.
8.2.2 SType=1: Select.req — An HSMS message with
SType 1 is a “Select Request” Control Message, which
is used by the initiator of the procedure for establishing
HSMS communications. The message format is as
follows:
Message Length is always 10 (Header only).
The HSMS Message Header is as follows:
SessionID — As described above. Specific value
subject to subsidiary standards.
Header Byte 2 = 0
Header Byte 3 = 0
PType = 0.
SType = 1
System Bytes — A unique value among open
transactions.
8.2.3 SType=2: Select.rsp — An HSMS message with
SType 2 is a “Select Response” Control Message, used
as the response to a Select.req Control message in the
procedure for establishing HSMS communications.
The message format is as follows:
Message Length is always 10 (Header only).
The HSMS Message Header is as follows:
SessionID — must be equal to the value of the
session ID in the corresponding Select.req.
Header Byte 2 =0
Header Byte 3 — SelectStatus. A code of zero
indicates success of the Select operation. A non-
zero code indicates failure.
Table 7 SelectStatus
Value Description
0 Communication Established. Select was successfully
completed.
1 Communication Already Active. A previous select has
already established communications to the entity being
selected in this select.
2 Connection Not Ready. The Connection is not yet
ready to accept select requests.
3 Connect Exhaust. The connection was accepted, but
the entity is already servicing a separate TCP/IP
connection and is unable to service more than one at
any given time.