跳到主要内容

附录 H. 示例:消息与未知长度

H.4 消息​

本节给出几个完整消息的示例,并展示重新发布一条消息的结果。(见第 3.2.2 节。)

下面的示例消息,其发起者是 Stevens,接收者是 Johnson。该消息于 1980 年 8 月 14 日美国东部夏令时上午 10 点发出。消息主题是 "Project Deadline"(项目截止日期),内容是提醒截止日期就在次日,并要求 Johnson 负责的那部分项目报告当天下午 3 点前交给 Stevens。

  Message       Length         Type
+--------+--------+--------+--------+
|01001101| 8 1 | B 4 | 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 5 | 0 2 |00101000| 1 2 |
+--------+--------+--------+--------+--------+

ASCII Length
+--------+--------+---- ----+
|00000010| 1 0 |19800814-1000EDT|
+--------+--------+---- ----+

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   8 |  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   5 |  0   2 |00101000|  1   2 |
+--------+--------+--------+--------+--------+

            ASCII   Length
         +--------+--------+----        ----+
         |00000010|  1   0 |19800814-1030EDT|
         +--------+--------+----        ----+

  Field    Length    FID      ASCII   Length
+--------+--------+--------+--------+--------+
|01001100|  1   0 |  2   5 |00000010|  0   D |
+--------+--------+--------+--------+--------+

         +----     ----+
         |Redistributed|
         +----     ----+

 Message       Length         Type
+--------+--------+--------+--------+
|01001101|  8   1 |  B   4 |  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   5 |  0   2 |00101000|  1   2 |
+--------+--------+--------+--------+--------+

           ASCII    Length
         +--------+--------+----        ----+
         |00000010|  1   0 |19800814-1000EDT|
         +--------+--------+----        ----+

  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.|
                ----+

H.5 未知长度​

本节给出两个长度未知的数据元素的示例。这两个示例已在 H.2 和 H.4 节中给出过,只是当时用的是已知长度而非未知长度。

包含两个 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 5 | 0 2 |00101000| 1 2 |
+--------+--------+--------+--------+--------+

ASCII Length
+--------+--------+---- ----+
|00000010| 1 0 |19800814-1000EDT|
+--------+--------+---- ----+

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|
+--------+--------+