ItemValue
NameENUM (specification document BIND ENUM)
TAG ID0x0BDL
Codec ID0x00000BD0
Specification document0x00000000/codecs/0x00000BD0/ (DECLARE target 0BD0)
Section5 0101 (Edge statement), offset within section C = 29
KindEdge · family: statement, group: other
TAG WORD0000 1011 1101 LLLL (000K KKKC CCCC LLLL)
Index descriptionOne code value of a raw-value field. Field, code value
Hugo sideedge/enum.md

Fields (specification document)

The order of FIELDs in the document is the order of the Payload fields (Codec specification document). The Edge Id of an Edge is not declared as a FIELD.

OrderField (BIND)FIELDWidthAccepted form (CODEC)ENUM
1field#2record0050 LOCAL
2code#3remaining raw value (0xFFFF)

ENUM is a statement Edge that attaches a meaning to one code value of a raw-value field. Codec 0x0BDL.

Together with FIELD, it is the vocabulary for writing Codec specifications. The layout is built into the decoder (Codec specification document).

Layout

TAG WORD          0000 1011 1101 LLLL
[Length extension TAG]
Edge Id           LOCAL Reference record
Field             LOCAL Reference record pointing to a FIELD Edge
Code value        Raw value. The same number of WORDs as that FIELD's width

Interpretation and validity

  • The field must be a raw-value FIELD (width n ≥ 1). ENUM is not attached to a record field. The meaning of a record is stated by the Codec of that record.
  • The code value is exactly the width of that FIELD. The boundary is checked by the Length of the ENUM record.
  • The same code value is not declared twice for one field.
  • The name of a code value is bound to the ENUM Edge Id with BIND. All UTF8-TEXT attached to DECLARE, FIELD, ENUM, and CODEC is attached with BIND, never with another Edge such as LABEL.
  • An undeclared code value is not an error. A viewer shows it as the raw value. Whether to close the allowed values is up to the Codec specification, and the present vocabulary has no marker for closing.

Length

total = 1 + N_len + N_id + N_field + n WORD

Example (non-normative)

Declare code 0x0001 on the reason-category field (FIELD #4, raw value of 1 WORD) of the TOMBSTONE specification document. Edge Id 10. The name is bound separately with BIND. The reason-category code table is not yet defined, so the code value is an example.

  • TAG 1 + Edge Id 2 + field 2 + code value 1 = 6 WORDs, LLLL = 0101.
0BD5 0051 000A 0051 0004 0001

The TRIPLE specification document places three ENUMs (0, 1, 2) on the Rank field (FIELD #5) and BINDs them as normal, preferred, and deprecated respectively (TRIPLE).

Related pages

Specification document source

This is the specification document 0x00000000/codecs/0x00000BD0/latest.geul as read with geul show (hexadecimal in uppercase).

SPEC-VERSION 0x0001
DOC-ID 0x04260000000000000BD000000000
BODY
#1 DECLARE 0x0BD0
#2 FIELD #1 record
#3 FIELD #1 rest
#4 BIND #1 "ENUM"
#5 BIND #2 "field"
#6 BIND #3 "code"
#7 CODEC #2 0x0050