mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-27 15:58:34 +03:00
filesystem: Introduce support for TLV parser
This adds an easy way for files to make use of the pySim.tlv parser. All a file has to do is to specify a _tlv member which points to either a TLV_IE or a TLV_IE_Collection instance. Change-Id: I59f456b4223ec88081e91cee168b654c69bcb5f4
This commit is contained in:
@@ -338,6 +338,8 @@ class TLV_IE_Collection(metaclass=TlvCollectionMeta):
|
||||
while len(remainder):
|
||||
# obtain the tag at the start of the remainder
|
||||
tag, r = first._parse_tag_raw(remainder)
|
||||
if tag == None:
|
||||
return res
|
||||
if tag in self.members_by_tag:
|
||||
cls = self.members_by_tag[tag]
|
||||
# create an instance and parse accordingly
|
||||
|
||||
Reference in New Issue
Block a user