#
---

tlvTestVarList:
  _type: class
  _is_tlv_class : True
  # TODO tlvf currently requires type to be first field
  type:
    _type: uint8_t
    _value_const: 255
  # TODO tlvf currently requires length to be second field
  length: uint16_t
  var0: uint16_t

  # TODO tlvf currently doesn't support list length field of more than 1 byte
  simple_list_length: uint8_t
  simple_list:
    _type: uint16_t
    _length: [ simple_list_length ]
    _length_max: 8
  
  test_string_length: uint8_t
  test_string:
    _type: char
    _length: [ test_string_length ]
    _length_max: 8

  # TODO tlvf currently doesn't support list length field of more than 1 byte
  complex_list_length: uint8_t
  complex_list:
    _type: cInner
    _length: [ complex_list_length ]

  var1: cInner
  var3: cInner
  var2: uint32_t
  unknown_length_list:
    _type: cInner
    _length: []

cInner:
  _type: class
  _is_tlv_class: true
  type:
    _type: uint16_t
    _value_const: 1
  # TODO tlvf currently requires length to be second field
  length: uint16_t
  # TODO tlvf currently doesn't support list length field of more than 1 byte
  list_length: uint8_t
  list:
    _type: uint8_t
    _length: [ list_length ]
  var1: uint32_t
  unknown_length_list_inner:
    _type: char
    _length: []
