1lwm2m_senml = [1* record]
2
3record = {
4	? bn => tstr,        ; Base Name
5	? bt => numeric,     ; Base Time
6	? n => tstr,        ; Name
7	? t => numeric,     ; Time
8	? ( v => numeric // ; Numeric Value
9		vs => tstr //   ; String Value
10		vb => bool //   ; Boolean Value
11		vd => bstr ), ; Data Value
12	* key-value-pair
13}
14
15; now define the generic versions
16key-value-pair = ( label => value )
17
18label = non-b-label / b-label
19non-b-label = tstr / uint
20b-label = tstr / nint
21
22value = tstr / bstr / numeric / bool
23
24; numeric = number / decfrac
25numeric = int
26
27
28bver = -1  n  = 0   s  = 5
29bn  = -2   u  = 1   t  = 6
30bt  = -3   v  = 2   ut = 7
31bu  = -4   vs = 3   vd = 8
32bv  = -5   vb = 4
33bs  = -6
34