Move struct output generation into Gcd class.
This commit is contained in:
@ -14,5 +14,4 @@ print("Opening {}".format(FILE))
|
|||||||
|
|
||||||
gcd = Gcd(FILE)
|
gcd = Gcd(FILE)
|
||||||
|
|
||||||
for i, tlv in enumerate(gcd.struct):
|
gcd.print_struct()
|
||||||
print("#{:03d}: {}".format(i, tlv))
|
|
||||||
|
@ -196,3 +196,9 @@ class Gcd:
|
|||||||
elif tlv.type_id == 0x0007:
|
elif tlv.type_id == 0x0007:
|
||||||
tlv.set_tlv6(last_tlv6)
|
tlv.set_tlv6(last_tlv6)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
def print_struct(self):
|
||||||
|
last_tlv = 0xffff
|
||||||
|
tlv_count = 0
|
||||||
|
for i, tlv in enumerate(self.struct):
|
||||||
|
print("#{:03d}: {}".format(i, tlv))
|
||||||
|
Reference in New Issue
Block a user