附录 H:示例(字段、报文、未知长度)
H.4 字段
本节包含几种不同字段(Keywords、Text、Subject、Vendor-Defined)的 Field 数据元素构造器示例。
Keywords 字段的 Field 数据元素。该字段包含两个关键字 Message 和 Computer,各自用一个单独的 ASCII-string 数据元素表示。
Field Length Keywords ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 4 | 1 4 |00000010| 0 7 |
+--------+--------+--------+--------+--------+
+--- ---+
|Message|
+--- ---+
ASCII Length
+--------+--------+--- ---+
|00000010| 0 8 |Computer|
+--------+--------+--- ---+
带有附加评注的 Property-List 数据元素的 Text 字段的 Field 数据元素。Text 字段包含 ASCII-String 数据元素“Do you want lunch?”;Property-List 数据元素包含一个评注属性,该属性由包含“Now?”的 ASCII-string 数据元素构成:
Field Length Text Prop-List Length
+--------+--------+--------+--------+--------+
|11001100| 2 0 | 0 4 |00100100| 0 9 |
+--------+--------+--------+--------+--------+
Property Length PID ASCII
+--------+--------+--------+--------+
|01000101| 0 7 | 0 1 |00000010|
+--------+--------+--------+--------+
Length
+--------+- -+
| 0 4 |Now?|
+--------+- -+
ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |Do you want lunch?|
+--------+--------+---- ----+
Subject 字段的 Field 数据元素,包含一个 ASCII-String 数据元素(“Good restaurants in Detroit”后跟回车和换行)。(收件人会预期该报文包含一些有关底特律地区餐馆的信息。):
Field Length Subject ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 2 1 | 0 7 |00000010| 1 E |
+--------+--------+--------+--------+--------+
+---- ----+
|Good restaurants in Detroit.<cr><lf>|
+---- ----+
其形式和含义由供应商定义的 Field 数据元素。该供应商把供应商自定义字段 12(十进制)定义为一个打印名称为“Reply-by”、内容为日期的字段;此例中的日期是 1981 年 1 月 7 日。(供应商自定义字段 12 的含义仅对该供应商而言是唯一的;相同的字段编号对其他供应商会有不同的含义。):
Field Length Qualifier User number
+--------+--------+--------+--------+--------+
|11001100| 1 F | 8 2 | 0 0 0 C |
+--------+--------+--------+--------+--------+
Prop-List Length Property Length
+--------+--------+--------+--------+
|00100100| 0 E |01000101| 0 C |
+--------+--------+--------+--------+
PID ASCII Length
+--------+--------+--------+---- ----+
| 0 2 |00000010| 0 9 |Reply-By:|
+--------+--------+--------+---- ----+
Date Length ASCII Length
+--------+--------+--------+--------+
|00101000| 0 A |00000010| 0 8 |
+--------+--------+--------+--------+
+--- ---+
|19810107|
+--- ---+
H.5 报文
本节包含几个完整报文的示例,并展示了重新发布报文的结果。(见第 3.2.2 节。)
下面这条示例报文的发端人是 Stevens,收件人是 Johnson。该报文于 1980 年 8 月 14 日美国东部夏令时上午 10 点发送。报文的主题是“Project Deadline”,内容是提醒截止日期在第二天,并且由 Johnson 负责的那个项目的报告部分应当在当天下午 3 点前交给 Stevens。
Message Length Type
+--------+--------+--------+--------+
|01001101| 8 1 | B 6 | 0 1 |
+--------+--------+--------+--------+
Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 5 |00000010|
+--------+--------+--------+--------+
Length
+--------+--- ---+
| 0 7 |Johnson|
+--------+--- ---+
Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 1 |00000010|
+--------+--------+--------+--------+
Length
+--------+--- ---+
| 0 7 |Stevens|
+--------+--- ---+
Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 3 | 0 7 |00000010| 1 0 |
+--------+--------+--------+--------+--------+
+---- ----+
|Project Deadline|
+---- ----+
Field Length FID Date Length
+--------+--------+--------+--------+--------+
|01001100| 1 7 | 0 2 |00101000| 1 4 |
+--------+--------+--------+--------+--------+
ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |19800814-1000-0400|
+--------+--------+---- ----+
Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 6 D | 0 4 |00000010| 6 A |
+--------+--------+--------+--------+--------+
+----
|Don't forget the project report is
+----
due tomorrow. Please have<CrLf>
your section to me by three this
----+
afternoon.|
----+
下面的示例说明了重新发布本节第一条报文的结果。这条报文包含原始报文(作为一个 Message 数据元素)、To、From 和 Posted-Date 字段,以及一个值为 Redistributed 的 Reissue-Type 字段:
Message Length Type
+--------+--------+--------+--------+
|01001101| 8 1 | F C | 0 1 |
+--------+--------+--------+--------+
Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 9 | 0 5 |00000010|
+--------+--------+--------+--------+
Length
+--------+-- --+
| 0 6 |Cooper|
+--------+-- --+
Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 1 |00000010|
+--------+--------+--------+--------+
Length
+--------+--- ---+
| 0 7 |Johnson|
+--------+--- ---+
Field Length FID Date Length
+--------+--------+--------+--------+--------+
|01001100| 1 7 | 0 2 |00101000| 1 4 |
+--------+--------+--------+--------+--------+
ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |19800814-1030-0400|
+--------+--------+---- ----+
Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 0 | 2 5 |00000010| 0 D |
+--------+--------+--------+--------+--------+
+---- ----+
|Redistributed|
+---- ----+
Message Length Type
+--------+--------+--------+--------+
|01001101| 8 1 | B 6 | 0 1 |
+--------+--------+--------+--------+
Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 5 |00000010|
+--------+--------+--------+--------+
Length
+--------+--- ---+
| 0 7 |Johnson|
+--------+--- ---+
Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 1 |00000010|
+--------+--------+--------+--------+
Length
+--------+--- ---+
| 0 7 |Stevens|
+--------+--- ---+
Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 3 | 0 7 |00000010| 1 0 |
+--------+--------+--------+--------+--------+
+---- ----+
|Project Deadline|
+---- ----+
Field Length FID Date Length
+--------+--------+--------+--------+--------+
|01001100| 1 7 | 0 2 |00101000| 1 4 |
+--------+--------+--------+--------+--------+
ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |19800814-1000-0400|
+--------+--------+---- ----+
Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 6 D | 0 4 |00000010| 6 A |
+--------+--------+--------+--------+--------+
+----
|Don't forget the project report is
+----
due tomorrow. Please have<CrLf>
your section to me by three this
----+
afternoon.|
----+