unpackValues method

void unpackValues(
  1. Map<String, ValuePackager> codec, {
  2. bool rebuildHierarchy = true,
})

Implementation

void unpackValues(Map<String, ValuePackager> codec, {bool rebuildHierarchy = true}) {
  if (rebuildHierarchy) rebuildTagsHierarchy();
  for (final TlvMsg item in tags) {
    final Object? value = item.value;
    if (value is TlvList) {
      value.unpackValues(codec, rebuildHierarchy: false);
    } else {
      final ValuePackager? packager = codec[item.completeTagString];
      if (packager != null) {
        final Uint8List bytes = item.asBytes!;
        item.value = packager.unpack(IsoBuffer.wrap(bytes), bytes.length);
      }
    }
  }
}