Newer
Older
# this is a sample record of a TS 133 128 "IRIPayload" embedded inside of a PS-PDU
# it seems, that the python asn1tools doesnt support the "EXTENSIBILITY IMPLIED" feature that
# is used in the 33-128.asn definition - so this record is not decoded when using version 16 of 33-128.asn unless you manually modify the schema.
# asn1c seems to have the same issues. This means, the implementations are not forward compatible :-(
generated = generateIRIPayload()
print(compiler.decode('IRIPayload', generated))
#pspdu = foo.decode('PS-PDU', modified_data)
#print(pspdu)
# is there a way to enable the automatic decoding of the attributes of content type ocetet string but have a "containing" constraint?
#print("\n\n***manually decoded 33128 iri***")
# FOOIRIPayload is used because of naming clashes and i couldn't get "fixDottedReference" to do the right thing
# deps/33128/... was modified for this to work
# iri33128 = foo.decode('FOOIRIPayload', pspdu['payload'][1][0]['iRIContents'][1])
# print(pspdu['payload'][1][0]['iRIContents'][1].hex())