Loading 102232-2/EmailPDU.asn +2 −2 Original line number Diff line number Diff line Loading @@ -488,8 +488,8 @@ Messaging-Property ::= CHOICE requested-reports [10] Messaging-Property-Requested-Reports, expires [11] GeneralizedTime, message-date [12] GeneralizedTime, server-octets-sent [13] INTEGER (0..18446744073709551615) OPTIONAL, client-octets-sent [14] INTEGER (0..18446744073709551615) OPTIONAL server-octets-sent [13] INTEGER (0..18446744073709551615), client-octets-sent [14] INTEGER (0..18446744073709551615) } Messaging-Property-Priority ::= ENUMERATED Loading testing/asn_process.py +8 −6 Original line number Diff line number Diff line Loading @@ -7,13 +7,14 @@ from re import sub from pycrate_asn1c.asnproc import * def reconstrainInteger (filename): Path('temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536")) return 'temp.asn' Path(filename + '_bigint_temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536")) return filename + '_bigint_temp.asn' filesWithBigInts = [ '102232-1/LI-PS-PDU.asn', '102232-3/IPAccessPDU.asn', '102232-4/L2AccessPDU.asn' '102232-4/L2AccessPDU.asn', '102232-2/EmailPDU.asn' ] def syntaxCheckASN (fileList): Loading Loading @@ -68,6 +69,7 @@ duplicateObjects = { 'ClashField' ] } def fixDuplicateObjects(filename): stringContent = filename.read_text() for object in duplicateObjects[filename.as_posix()]: Loading @@ -75,8 +77,8 @@ def fixDuplicateObjects(filename): stringContent = stringContent.replace(f'SEQUENCE OF {object}', f'SEQUENCE OF Native{object}') #stringContent = sub(f"]\\w{object}", f"] Native{object}", stringContent) Path('temp.asn').write_text(stringContent) return 'temp.asn' Path(str(filename) + '_temp.asn').write_text(stringContent) return str(filename) + '_temp.asn' def compileAllTargets (compileTargets): Loading Loading @@ -110,7 +112,7 @@ def compileAllTargets (compileTargets): if pFile.as_posix() in duplicateObjects: tmpFile = Path(fixDuplicateObjects(pFile)) fileTexts.append(tmpFile.read_text()) #tmpFile.unlink() tmpFile.unlink() else: fileTexts.append(pFile.read_text()) fileNames.append(filename) Loading Loading
102232-2/EmailPDU.asn +2 −2 Original line number Diff line number Diff line Loading @@ -488,8 +488,8 @@ Messaging-Property ::= CHOICE requested-reports [10] Messaging-Property-Requested-Reports, expires [11] GeneralizedTime, message-date [12] GeneralizedTime, server-octets-sent [13] INTEGER (0..18446744073709551615) OPTIONAL, client-octets-sent [14] INTEGER (0..18446744073709551615) OPTIONAL server-octets-sent [13] INTEGER (0..18446744073709551615), client-octets-sent [14] INTEGER (0..18446744073709551615) } Messaging-Property-Priority ::= ENUMERATED Loading
testing/asn_process.py +8 −6 Original line number Diff line number Diff line Loading @@ -7,13 +7,14 @@ from re import sub from pycrate_asn1c.asnproc import * def reconstrainInteger (filename): Path('temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536")) return 'temp.asn' Path(filename + '_bigint_temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536")) return filename + '_bigint_temp.asn' filesWithBigInts = [ '102232-1/LI-PS-PDU.asn', '102232-3/IPAccessPDU.asn', '102232-4/L2AccessPDU.asn' '102232-4/L2AccessPDU.asn', '102232-2/EmailPDU.asn' ] def syntaxCheckASN (fileList): Loading Loading @@ -68,6 +69,7 @@ duplicateObjects = { 'ClashField' ] } def fixDuplicateObjects(filename): stringContent = filename.read_text() for object in duplicateObjects[filename.as_posix()]: Loading @@ -75,8 +77,8 @@ def fixDuplicateObjects(filename): stringContent = stringContent.replace(f'SEQUENCE OF {object}', f'SEQUENCE OF Native{object}') #stringContent = sub(f"]\\w{object}", f"] Native{object}", stringContent) Path('temp.asn').write_text(stringContent) return 'temp.asn' Path(str(filename) + '_temp.asn').write_text(stringContent) return str(filename) + '_temp.asn' def compileAllTargets (compileTargets): Loading Loading @@ -110,7 +112,7 @@ def compileAllTargets (compileTargets): if pFile.as_posix() in duplicateObjects: tmpFile = Path(fixDuplicateObjects(pFile)) fileTexts.append(tmpFile.read_text()) #tmpFile.unlink() tmpFile.unlink() else: fileTexts.append(pFile.read_text()) fileNames.append(filename) Loading