Ligne 263 : |
Ligne 263 : |
| Pour pouvoir stocker un message NDEF dans une carte Mifare Classic, le message doit être inclus (englobé) dans un bloc TLV. Les fondements de la structure d'un bloc '''TLV''' est décrit ci-dessous. | | Pour pouvoir stocker un message NDEF dans une carte Mifare Classic, le message doit être inclus (englobé) dans un bloc TLV. Les fondements de la structure d'un bloc '''TLV''' est décrit ci-dessous. |
| | | |
− | == TLV Blocks == | + | == Les blocs TLV == |
− | TLV is an abbreviation for three different fields: T for Tag Field, L for Length Field and V for Value Field. A TLV Block consist of one or more bytes, depending on which of these three fields is present. Note that the TLV Block will always be at least one byte since the T Field is mandatory in every case. | + | TLV est l'abréviation correspondant à 3 champs différents: |
| + | * '''T''' pour le champ Tag, |
| + | * '''L''' pour la longueur du champ, |
| + | * '''V''' pour le champ valeur. |
| | | |
− | === Tag Field === | + | Un bloc TLV est constitué d'un ou plusieurs octets/bytes, en fonction de ces trois champs présents.<br />Note que le bloc TLV aura toujours au moins un byte/octet étant donné que le champ T est obligatoire dans tous les cas. |
− | The Tag Field (or T Field) is the only mandatory field, and uses a single-byte to identify the type of TLV block accordingly to a pre-determined table of values:
| + | |
| + | === Le champ Tag === |
| + | Le champ Tag (ou champ T) est le seul champ obligatoire et utilise un seul octet pour identifier le bloc TLV. La valeur de T est prédéterminé, voyez la table ci-dessous pour les différentes valeurs disponibles: |
| | | |
| <nowiki>TLV Block Types | | <nowiki>TLV Block Types |
| | | |
− | Block Type Value Description | + | Type de bloc Valeur Description |
− | ------------- ----- -------------------------------------- | + | ------------- ----- -------------------------------------- |
− | NULL 0x00 These blocks should be ignored | + | NULL 0x00 Ces blocs devraient être ignorés |
− | NDEF Message 0x03 Block contains an NDEF message | + | NDEF Message 0x03 Le bloc contient un message NDEF |
− | Proprietary 0xFD Block contains proprietary information | + | Proprietary 0xFD Le bloc contient des information propriétaires |
− | Terminator 0xFE Last TLV block in the data area</nowiki> | + | Terminator 0xFE Dernier bloc TLV dans cette zone de donnée</nowiki> |
| | | |
− | === Length Field === | + | === Le champ longueur === |
− | The Length Field (or L Field) contains the size (in bytes) of the value field. The Length Field can be organised in two different ways, using either one or three bytes.
| + | Le champ longueur (''Length'' en anglais --ou-- champ L) contient la taille du champ valeur, taille exprimée en octets/bytes. Le champs longueur est organisé de deux façons différentes, en utilisant soit un ou 3 octets. |
| | | |
− | The one byte format simple contains a single byte value from 0x00..0xFF.
| + | Le format '''un octet''' contient une simple valeur entre 0x00 et 0xFE (soit pour une valeur 0 et 254 exprimé en base 10). |
| | | |
− | The three byte format consists of the following format:
| + | Le format '''trois octets''' est constitué du format suivant: |
− | <nowiki> Byte 0: Always 0xFF to indicate that we are using the three byte format | + | <nowiki> Octet 0: Always 0xFF to indicate that we are using the three byte format |
− | Byte 1..2: Can be a value between 0x00FF and 0xFFFE</nowiki>
| + | Octet 1..2: Peut être une valeur entre 0x00FF et 0xFFFE (soit entre 0 et 65534)</nowiki> |
| | | |
− | Both the one byte and three byte format must be supported for NFC Forum and NDEF compatability.
| + | Les deux formats (1 et 3 octets) doivent supporter la compatibilité pour NDEF et NFC Forum. |
| | | |
| === Value Field === | | === Value Field === |
| + | {{traduction}} |
| + | |
| The Value Field (or V Field) is only present if the Length Field (described above) is present and not equal to 0x00. If the Length Field is not equal to 0, the Value Fields will contain N bytes of data in the format indicated by the T Field above. | | The Value Field (or V Field) is only present if the Length Field (described above) is present and not equal to 0x00. If the Length Field is not equal to 0, the Value Fields will contain N bytes of data in the format indicated by the T Field above. |
| | | |