Commit fa5b71d5 authored by Mark Canterbury's avatar Mark Canterbury
Browse files

Removing OPTIONAL from new CHOICE

parent ec801847
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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

temp.asn

deleted100644 → 0
+0 −740

File deleted.

Preview size limit exceeded, changes collapsed.

+6 −5
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@ 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',
@@ -69,6 +69,7 @@ duplicateObjects = {
        'ClashField'
    ]
}

def fixDuplicateObjects(filename):
    stringContent = filename.read_text()
    for object in duplicateObjects[filename.as_posix()]:
@@ -76,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):
@@ -111,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)