diff --git a/102232-1/LI-PS-PDU.asn b/102232-1/LI-PS-PDU.asn index 7d187add68e1eef79466a269fc683024d15952f0..8d5a89de74f0395cf7a0f6670834d14b7a80907a 100644 --- a/102232-1/LI-PS-PDU.asn +++ b/102232-1/LI-PS-PDU.asn @@ -386,12 +386,73 @@ IRIPayload ::= SEQUENCE -- If the sessionDirection field is to be used for a given service then -- the exact meaning and use of the field will be described in the -- relevant service-specific details - payloadDirection [6] PayloadDirection OPTIONAL + payloadDirection [6] PayloadDirection OPTIONAL, -- If the payloadDirection field is to be used for a given service then -- the exact meaning and use of the field will be described in the -- relevant service-specific details + locations [7] Locations OPTIONAL, --Choose either this or the next one + nonSourceOption [8] AltOption OPTIONAL } +Locations ::= SEQUENCE +{ + networkProvidedLocations [1] LocationList OPTIONAL, + cPEProvidedLocation [2] LocationList OPTIONAL, + otherLocations [3] LocationList OPTIONAL +} + +LocationList ::= CHOICE --Only one of these would survive. These are simply alternatives. +{ + usingLocation [1] SEQUENCE OF Location, + usingNewLocation [2] NewLocation +} + +--========================================================================== +--NewLocation format option + +NewLocation ::= SEQUENCE (SIZE(1..MAX)) OF NewLocationFormat + +NewLocationFormat ::= SEQUENCE +{ + location [1] NewLocations--, + -- locationProvenance [2] LocationProvenance +} + +NewLocations ::= CHOICE +{ + umtsHI2Location [0] UmtsHI2Operations.Location, + epsLocation [1] EpsHI2Operations.EPSLocation, + wlanLocationAttributes [2] WlanLocationAttributes, + eTSI671HI2Location [3] HI2Operations.Location, + threeGPP33128UserLocation [4] TS33128Payloads.UserLocation, + wGS84CoordinateDecimal [5] Common-Parameters.WGS84CoordinateDecimal, + pIDF-LO [6] XMLType +} + +--=============================================================================== + +--======================================================================== +--NonSource OPTION alt + +AltOption ::= SEQUENCE (SIZE(1..MAX)) OF AltLocationFormat + +AltLocationFormat ::= SEQUENCE +{ + location [1] NewLocations, + source [2] LocationSource + -- locationProvenance [3] LocationProvenance +} + +LocationSource ::= ENUMERATED +{ + other(1), + unknown(2), + cPEOrClient(3), + network(4) +} + +--============================================================================ + IRIType ::= ENUMERATED { iRI-Begin(1), @@ -685,7 +746,9 @@ Location ::= SEQUENCE wlanLocationAttributes [2] WlanLocationAttributes OPTIONAL, eTSI671HI2Location [3] HI2Operations.Location OPTIONAL, threeGPP33128UserLocation [4] TS33128Payloads.UserLocation OPTIONAL, - cPEProvidedLocationAttributes [5] CPEProvidedLocationAttributes OPTIONAL + cPEProvidedLocationAttributes [5] CPEProvidedLocationAttributes OPTIONAL, + wGS84CoordinateDecimal [6] Common-Parameters.WGS84CoordinateDecimal OPTIONAL, + pIDF-LO [7] XMLType OPTIONAL } WlanLocationAttributes ::= SEQUENCE @@ -758,5 +821,14 @@ LawfulInterceptionIdentifier ::= Common-Parameters.LIID -- It is redefined as LawfulInterceptionIdentifier in this -- module to preserve the original type name during the -- removal of imports from ETSI TS 101 671 [4]. +XMLType ::= SEQUENCE +{ + xMLNamespace [1] XMLNamespace, + xMLValue [2] XMLValue +} + +XMLNamespace ::= UTF8String + +XMLValue ::= UTF8String END -- end of LI-PS-PDU diff --git a/testing/asn_process.py b/testing/asn_process.py index 5ca7aa5bf880d352c0ef9de3b7a3181fd0c680b5..ed88294f6c408c9ee0f860aab6dd7bd507b81912 100644 --- a/testing/asn_process.py +++ b/testing/asn_process.py @@ -1,5 +1,6 @@ import logging import json +import re from pathlib import Path from subprocess import run from shutil import which @@ -81,8 +82,10 @@ duplicateObjects = { def fixDuplicateObjects(filename): stringContent = filename.read_text() for object in duplicateObjects[filename.as_posix()]: - stringContent = stringContent.replace(f'{object} ::=', f'Native{object} ::=', 1) - stringContent = stringContent.replace(f'SEQUENCE OF {object}', f'SEQUENCE OF Native{object}') + #stringContent = stringContent.replace(f'{object} ::=', f'Native{object} ::=', 1) + stringContent = re.sub(f"^({object} ::=)", 'Native\\1', stringContent, flags=re.MULTILINE) + #stringContent = stringContent.replace(f'SEQUENCE OF {object}', f'SEQUENCE OF Native{object}') + stringContent = re.sub(f"^SEQUENCE (\(SIZE\(\d+\.\.(\d+|MAX)\)\) )*OF ({object})", 'SEQUENCE \\1OF Native\\2', stringContent, flags=re.MULTILINE) #stringContent = sub(f"]\\w{object}", f"] Native{object}", stringContent) Path('temp.asn').write_text(stringContent)