Passa al contenuto principale

Appendice H: esempi (data element)

Questa appendice presenta almeno un esempio per ciascuno dei data element definiti in questa specifica del formato dei messaggi. In questi esempi, gli ottetti identificatori sono rappresentati in forma binaria. Tutti gli altri numeri sono presentati in esadecimale. Le stringhe ASCII sono mostrate come caratteri anziché con la loro rappresentazione numerica. Sebbene questa specifica non definisca la sintassi di nomi e indirizzi, gli originatori e i destinatari dei messaggi sono identificati dal loro nome. Ciò non implica nulla su come l'assegnazione dei nomi e l'indirizzamento possano o debbano essere realizzati; è semplicemente un modo comodo per identificare gli originatori e i destinatari dei messaggi in questi esempi.

H.1 Data element primitivi​

Questa sezione contiene un esempio per ciascuno dei data element primitivi. Ogni esempio contiene una breve spiegazione e una serie di ottetti.

Data element No-Op:

+--------+--------+
|00000000|00000000|
+--------+--------+

Data element End-of-Constructor:

+--------+--------+
|00000001|00000000|
+--------+--------+

Data element Boolean il cui valore è vero:

+--------+--------+--------+
|00001000|00000001|11111111|
+--------+--------+--------+

Data element Integer contenente cinque ottetti di dati. Il suo valore è 4.294.967.296 (decimale):

+--------+--------+--------+--------+--------+
|00100000| 0 5 | 0 1 0 0 0 0
+--------+--------+--------+--------+--------+

+--------+--------+
0 0 0 0 |
+--------+--------+

Data element Padding contenente tre ottetti di riempimento. I valori di quei tre ottetti sono privi di significato:

+--------+--------+--------+--------+--------+
|00100001| 0 3 | F F F F F F |
+--------+--------+--------+--------+--------+

Data element ASCII-String contenente nove caratteri. Il suo valore è "Hi There.":

+--------+--------+---- ----+
|00000010| 0 9 |Hi There.|
+--------+--------+---- ----+

Data element Bit-String contenente 44 bit di dati (((7-1) x 8) - 4). Per contenere quei 44 bit sono usati sei ottetti. Gli ultimi 4 bit dell'ottetto finale sono di riempimento e vengono quindi ignorati.

Bit-String  Length   Spare
+--------+--------+--------+--------+--------+
|01000011| 0 7 | 0 4 | 0 A 3 B
+--------+--------+--------+--------+--------+

+--------+--------+--------+--------+
5 F 2 9 1 C D 0 |
+--------+--------+--------+--------+

H.2 Data element costruttori​

Questa sezione contiene un esempio per ciascuno dei data element costruttori. Ogni esempio contiene una breve spiegazione e poi una serie annotata dei data element che compongono il costruttore.

Data element Property-List contenente un data element Property. La proprietà è Printing-Name e il suo valore è "Distribution":

Prop-List  Length  Property  Length    PID
+--------+--------+--------+--------+--------+
|00100100| 1 1 |01000101| 0 F | 0 2 |
+--------+--------+--------+--------+--------+

ASCII Length
+--------+--------+---- ----+
|00000010| 0 C |Distribution|
+--------+--------+---- ----+

Property Printing-Name. Il valore del Printing-Name è "Distribution":

 Property  Length    PID     ASCII    Length
+--------+--------+--------+--------+--------+
|01000101| 0 F | 0 2 |00000010| 0 C |
+--------+--------+--------+--------+--------+

+---- ----+
|Distribution|
+---- ----+

Data element Compressed. Il suo contenuto è stato compresso con un algoritmo di compressione dei dati non specificato. I dati compressi si trovano in un bit-string lungo 56 bit, che riempie completamente 7 ottetti:

Compressed  Length   CID   Bit-String  Length
+--------+--------+--------+--------+--------+
|01000110| 0 B | 0 0 |01000011| 0 8 |
+--------+--------+--------+--------+--------+

Spare
+--------+--------+--------+--------+
| 0 0 | 1 C 5 F 2 D
+--------+--------+--------+--------+

+--------+--------+--------+--------+
7 7 B A F 6 2 9 |
+--------+--------+--------+--------+

Data element Encrypted. Il metodo di cifratura usato per cifrare il suo contenuto è stato intenzionalmente lasciato non specificato. Questo elemento contiene un Bit-String che contiene 22 bit (((4-1) x 8) - 2) di dati. Questi 22 bit sono rappresentati in ottetti; gli ultimi 2 bit dell'ottetto finale sono di riempimento e vengono quindi ignorati:

Encrypted   Length   EID   Bit-String  Length
+--------+--------+--------+--------+--------+
|01000111| 0 7 | 0 0 |01000011| 0 4 |
+--------+--------+--------+--------+--------+

Spare
+--------+--------+--------+--------+
| 0 2 | A 3 7 8 1 C |
+--------+--------+--------+--------+

Data element Date. Questo esempio include una data ma non un'ora. La data mostrata in questo esempio è il 15 agosto 1980:

  Date     Length   ASCII    Length
+--------+--------+--------+--------+--- ---+
|00101000| 0 A |00000010| 0 8 |19800815|
+--------+--------+--------+--------+--- ---+

Data element Unique-ID, rappresentato come data element Integer il cui valore è 129 (decimale).

Unique-ID  Length   Integer  Length
+--------+--------+--------+--------+--------+--------+
|00001001| 0 4 |00100000| 0 2 | 0 0 8 1 |
+--------+--------+--------+--------+--------+--------+

Data element Sequence contenente due data element ASCII-String. La prima ASCII-String è "This is" mentre la seconda stringa è " a list":

 Sequence  Length   ASCII    Length
+--------+--------+--------+--------+--- ---+
|00001010| 1 2 |00000010| 0 7 |This is|
+--------+--------+--------+--------+--- ---+

ASCII Length
+--------+--------+--- ---+
|00000010| 0 7 | a list|
+--------+--------+--- ---+

Data element Set contenente due data element Integer. Il primo intero ha valore 519 (decimale) mentre il valore del secondo è 71 (decimale). (Questi due valori non hanno alcun ordinamento perché appartengono a un insieme.)

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

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

Data element Field. Il campo specifico mostrato è il campo Text con il contenuto "I will see you at lunch.":

  Field    Length    FID      ASCII   Length
+--------+--------+--------+--------+--------+
|01001100| 1 B | 0 4 |00000010| 1 8 |
+--------+--------+--------+--------+--------+

+---- ----+
|I will see you at lunch.|
+---- ----+

Message contenente quattro campi: Posted-Date, From, Text e To. È stato inviato il 4 luglio 1980 alle 18:00, ora legale della costa orientale (eastern daylight time). Proviene da una persona di nome Smith. Il testo del messaggio è una domanda che chiede al destinatario "Are you going to watch the fireworks?". Il messaggio è inviato a Jones:

 Message   Length    Type    Field    Length
+--------+--------+--------+--------+--------+
|01001101| 5 A | 0 1 |01001100| 1 9 |
+--------+--------+--------+--------+--------+

FID Date Length ASCII
+--------+--------+--------+--------+
| 0 2 |00101000| 1 6 |00000010|
+--------+--------+--------+--------+

Length
+--------+---- ----+
| 1 4 |19800704-180000-0400|
+--------+---- ----+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 8 | 0 1 |00000010|
+--------+--------+--------+--------+

Length
+--------+-- --+
| 0 5 |Smith|
+--------+-- --+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 2 8 | 0 4 |00000010|
+--------+--------+--------+--------+

Length
+--------+
| 2 5 |
+--------+

+---- ----+
|Are you going to watch the fireworks?|
+---- ----+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 8 | 0 5 |00000010|
+--------+--------+--------+--------+

Length
+--------+-- --+
| 0 5 |Jones|
+--------+-- --+

H.3 Data element che estendono questa specifica​

Questa sezione contiene esempi di data element usati per estendere questa specifica. Questi data element possono essere primitivi o costruttori, a seconda dell'estensione.

Data element Extension contenente un length code e 3 ottetti. L'ottetto che segue immediatamente il length code lo identifica come Extension Data Element 7. Il Data Element Contents sono gli ultimi due ottetti. L'interpretazione del Data Element Contents sarebbe definita in un'estensione o in un successore di questa specifica del formato dei messaggi. [Nota: questo è un esempio. Qualsiasi effettivo extension data element 7 (se mai fosse usato) sarebbe completamente diverso da quanto fatto qui.]:

Extension  Length
+--------+--------+--------+--------+--------+
|01111110| 0 3 | 0 7 | 4 A E 9 |
+--------+--------+--------+--------+--------+

Data element Vendor-Defined contenente un length code e 3 ottetti. Il primo ottetto lo identifica come data element definito dal fornitore numero 114 (decimale), che questo particolare fornitore ha definito per contenere tre caratteri ASCII stampabili in due ottetti. (Il data element 114 (decimale) di un altro utente sarebbe completamente diverso. Ad esempio, potrebbe contenere un numero a virgola mobile.):

   User    Length
+--------+--------+--------+--------+--------+
|01111111| 0 3 | 7 2 | P O E |
+--------+--------+--------+--------+--------+