跳到主要内容

附录 H:示例(未知长度)

H.6 未知长度​

本节包含两个长度未知的数据元素示例。这两个示例已在 H.2 和 H.5 节中给出,但那里使用的是已知长度而不是未知长度。

包含两个 Integer 数据元素的未知长度 Set 数据元素。第一个整数的值为 519(十进制),第二个的值为 71(十进制)。(这两个值没有顺序,因为它们属于一个集合。)

   Set     Length   Integer  Length
+--------+--------+--------+--------+--------+--------+
|00001011| 8 0 |00100000| 0 2 | 0 2 0 7 |
+--------+--------+--------+--------+--------+--------+

Integer Length
+--------+--------+--------+--------+
|00100000| 0 2 | 0 0 4 7 |
+--------+--------+--------+--------+

End-of-Con Length
+--------+--------+
|00000000|00000000|
+--------+--------+

下面这条长度未知的示例报文,发端人是 Stevens,收件人是 Johnson。该报文于 1980 年 8 月 14 日美国东部夏令时上午 10 点发送。报文的主题是“Project Deadline”,内容是提醒截止日期在第二天,并且由 Johnson 负责的那个项目的报告部分应当在当天下午 3 点前交给 Stevens。

 Message   Length    Type
+--------+--------+--------+
|01001101| 8 0 | 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.|
----+

End-of-Con Length
+--------+--------+
|00000000|00000000|
+--------+--------+