| /****************************************************************************** |
| * Copyright (c) 2000-2019 Ericsson AB |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| * |
| * Contributors: |
| * Gabor Szalai - initial implementation and initial documentation |
| ******************************************************************************/ |
| // |
| // File: TS29512_Npcf_SMPolicyControl.ttcn |
| // Description: Type definitions for 3GPP TS29512 |
| /////////////////////////////////////////////// |
| module TS29512_Npcf_SMPolicyControl { |
| |
| import from TS29571_CommonData all |
| import from TS29512_CommonData all |
| import from TS29519_Policy_Data all |
| import from TS29514_Npcf_PolicyAuthorization all |
| import from TS32291_Nchf_ConvergedCharging all |
| |
| external function f_enc_SmPolicyContextData(in SmPolicyContextData pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_SmPolicyContextData(in octetstring stream, out SmPolicyContextData pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| external function f_enc_SmPolicyDecision(in SmPolicyDecision pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_SmPolicyDecision(in octetstring stream, out SmPolicyDecision pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| external function f_enc_SmPolicyNotification(in SmPolicyNotification pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_SmPolicyNotification(in octetstring stream, out SmPolicyNotification pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| external function f_enc_UeCampingRep(in UeCampingRep pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_UeCampingRep(in octetstring stream, out UeCampingRep pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| external function f_enc_RuleReport(in RuleReport pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_RuleReport(in octetstring stream, out RuleReport pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| external function f_enc_TerminationNotification(in TerminationNotification pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_TerminationNotification(in octetstring stream, out TerminationNotification pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| external function f_enc_SmPolicyControl(in SmPolicyControl pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_SmPolicyControl(in octetstring stream, out SmPolicyControl pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| external function f_enc_SmPolicyUpdateContextData(in SmPolicyUpdateContextData pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_SmPolicyUpdateContextData(in octetstring stream, out SmPolicyUpdateContextData pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| external function f_enc_SmPolicyDeleteData(in SmPolicyDeleteData pdu) return octetstring |
| with { extension "prototype(convert) encode(JSON)" } |
| |
| external function f_dec_SmPolicyDeleteData(in octetstring stream, out SmPolicyDeleteData pdu) return integer |
| with { extension "prototype(backtrack) decode(JSON)" } |
| |
| |
| type set SmPolicyControl { |
| SmPolicyContextData context, |
| SmPolicyDecision policy |
| } |
| |
| type set SmPolicyContextData { |
| AccNetChId accNetChId optional, |
| TS29571_CommonData.Gpsi gpsi optional, |
| TS29571_CommonData.Supi supi, |
| TS29571_CommonData.PduSessionId pduSessionId, |
| TS29571_CommonData.PduSessionId pduSessionType optional, |
| charstring chargingcharacteristics optional, |
| TS29571_CommonData.Dnn dnn, |
| TS29571_CommonData.Uri notificationUri, |
| TS29571_CommonData.AccessType accessType optional, |
| TS29571_CommonData.RatType ratType optional, |
| TS29571_CommonData.NetworkId servingNetwork optional, |
| TS29571_CommonData.UserLocation userLocationInfo optional, |
| TS29571_CommonData.TimeZone ueTimeZone optional, |
| TS29571_CommonData.Pei pei optional, |
| TS29571_CommonData.Ipv4Addr ipv4Address optional, |
| TS29571_CommonData.Ipv6Prefix ipv6AddressPrefix optional, |
| charstring ipDomain optional, |
| TS29571_CommonData.Ambr subSessAmbr optional, |
| TS29571_CommonData.DefaultQosInformation subsDefQos optional, |
| boolean online optional, |
| boolean offline optional, |
| boolean threegppPsDataOffStatus optional, |
| boolean refQosIndication optional, |
| TS29571_CommonData.TraceData traceReq optional, |
| TS29571_CommonData.Snssai sliceInfo, |
| TS29571_CommonData.SupportedFeatures suppFeat optional |
| } with { |
| variant (threegppPsDataOffStatus) "name as '3gppPsDataOffStatus'" |
| } |
| |
| type set SmPolicyDecision { |
| set of record { |
| universal charstring key, |
| SessionRule additionalProperties |
| } sessRules optional, |
| set of record { |
| universal charstring key, |
| PccRule additionalProperties |
| } pccRules optional, |
| boolean pcscfRestIndication optional, |
| set of record { |
| universal charstring key, |
| QoSData additionalProperties |
| } qosDecs optional, |
| set of record { |
| universal charstring key, |
| ChargingData additionalProperties |
| } ChgDecs optional, |
| ChargingInformation chargingInfo optional, |
| set of record { |
| universal charstring key, |
| TrafficControlData additionalProperties |
| } traffContDecs optional, |
| set of record { |
| universal charstring key, |
| UsageMonitoringData additionalProperties |
| } umDecs optional, |
| set of record { |
| universal charstring key, |
| QosCharacteristics additionalProperties |
| } qosChars optional, |
| TS29571_CommonData.DurationSec reflectiveQoSTimer optional, |
| set of record { |
| universal charstring key, |
| ConditionData additionalProperties |
| } conds optional, |
| TS29571_CommonData.DateTime revalidationTime optional, |
| boolean offline optional, |
| boolean online optional, |
| set of PolicyControlRequestTrigger policyCtrlReqTriggers optional, |
| set of RequestedRuleData lastReqRuleData optional, |
| RequestedUsageData lastReqUsageData optional, |
| set of record { |
| universal charstring key, |
| TS29571_CommonData.PresenceInfo additionalProperties |
| } praInfos optional, |
| TS29519_Policy_Data.IpIndex ipv4Index optional, |
| TS29519_Policy_Data.IpIndex ipv6Index optional, |
| TS29571_CommonData.SupportedFeatures suppFeat optional |
| } with { |
| variant (sessRules) "as map" |
| variant (pccRules) "as map" |
| variant (ChgDecs) "as map" |
| variant (traffContDecs) "as map" |
| variant (umDecs) "as map" |
| variant (qosChars) "as map" |
| variant (conds) "as map" |
| variant (praInfos) "as map" |
| } |
| |
| type set SmPolicyNotification { |
| TS29571_CommonData.Uri resourceUri optional, |
| SmPolicyDecision smPolicyDecision optional |
| } |
| |
| type set PccRule { |
| set of FlowInformation flowInfos optional, |
| charstring appId optional, |
| TS29514_Npcf_PolicyAuthorization.ContentVersion contVer optional, |
| charstring pccRuleId, |
| integer precedence optional, |
| AfSigProtocol afSigProtocol optional, |
| boolean appReloc optional, |
| set of charstring refQosData optional, |
| set of charstring refTcData optional, |
| set of charstring refChgData optional, |
| set of charstring refUmData optional, |
| charstring refCondData optional |
| } |
| |
| type set SessionRule { |
| TS29571_CommonData.Ambr authSessAmbr optional, |
| TS29571_CommonData.DefaultQosInformation authDefaultQos optional, |
| charstring sessRuleId, |
| charstring refUmData optional, |
| charstring refCondData optional |
| } |
| |
| type set QoSData { |
| charstring qosId, |
| integer fiveqi, |
| TS29571_CommonData.BitRate maxbrUl optional, |
| TS29571_CommonData.BitRate maxbrDl optional, |
| TS29571_CommonData.BitRate gbrUl optional, |
| TS29571_CommonData.BitRate gbrDL optional, |
| TS29571_CommonData.Arp arp, |
| boolean qnc optional, |
| TS29571_CommonData.FiveQiPriorityLevel priorityLevel optional, |
| TS29571_CommonData.AverWindow averWindow optional, |
| TS29571_CommonData.MaxDataBurstVol maxDataBurstVol optional, |
| boolean reflectiveQos optional, |
| TS29571_CommonData.PacketLossRate maxPacketLossRate optional, |
| TS29571_CommonData.PacketLossRate maxPacketLossRateUl optional, |
| boolean defQosFlowIndication optional |
| } |
| |
| type set ConditionData { |
| charstring condId, |
| TS29571_CommonData.DateTime activationTime optional, |
| TS29571_CommonData.DateTime deactivationTime optional |
| } |
| |
| type set TrafficControlData { |
| charstring tcId, |
| TS29514_Npcf_PolicyAuthorization.FlowStatus flowStatus optional, |
| RedirectInformation redirectInfo optional, |
| boolean muteNotif optional, |
| charstring trafficSteeringPolIdDl optional, |
| charstring trafficSteeringPolIdUl optional, |
| set of TS29571_CommonData.RouteToLocation routeToLocs optional, |
| DnaiReport dnaiReport optional |
| } |
| |
| type set ChargingData { |
| charstring chgId, |
| MeteringMethod meteringMethod optional, |
| boolean offline optional, |
| boolean online optional, |
| charstring ratingGroup optional, |
| ReportingLevel reportingLevel optional, |
| charstring serviceId optional, |
| charstring sponsorId optional, |
| charstring appSvcProvId optional, |
| charstring afChargingIdentifier optional |
| } |
| |
| type set UsageMonitoringData { |
| charstring umId, |
| Volume volumeThreshold optional, |
| Volume volumeThresholdUplink optional, |
| Volume volumeThresholdDownlink optional, |
| TS29571_CommonData.DurationSec timeThreshold optional, |
| TS29571_CommonData.DateTime monitoringTime optional, |
| Volume nextVolThreshold optional, |
| Volume nextVolThresholdUplink optional, |
| Volume nextVolThresholdDownlink optional, |
| TS29571_CommonData.DurationSec nextTimeThreshold optional, |
| TS29571_CommonData.DurationSec inactivityTime optional, |
| set of charstring exUsagePccRuleIds optional |
| } |
| |
| type set RedirectInformation { |
| boolean redirectSupport, |
| FlowDirection redirectAddressType optional, |
| charstring redirectServerAddress optional |
| } |
| |
| type set FlowInformation { |
| FlowDescription flowDescription optional, |
| TS29514_Npcf_PolicyAuthorization.EthFlowDescription ethFlowDescription optional, |
| boolean packetFilterUsage optional, |
| charstring tosTrafficClass optional, |
| charstring spi optional, |
| charstring flowLabel optional, |
| FlowDirection flowDirection optional |
| } |
| |
| type set SmPolicyDeleteData { |
| TS29571_CommonData.UserLocation userLocationInfo optional, |
| TS29571_CommonData.TimeZone ueTimeZone optional, |
| TS29571_CommonData.NetworkId servingNetwork optional, |
| TS29571_CommonData.DateTime userLocationInfoTime optional, |
| set of RanNasRelCause ranNasRelCauses optional, |
| set of AccuUsageReport accuUsageReports optional |
| } |
| |
| type set QosCharacteristics { |
| integer fiveqI, |
| TS29571_CommonData.QosResourceType resourceType, |
| TS29571_CommonData.FiveQiPriorityLevel priorityLevel, |
| TS29571_CommonData.PacketDelBudget packetDelayBudget, |
| TS29571_CommonData.PacketErrRate packetErrorRate, |
| TS29571_CommonData.AverWindow averagingWindow optional, |
| TS29571_CommonData.MaxDataBurstVol maximumDataBurstVolume optional |
| } with { |
| variant (fiveqI) "name as '5qI'" |
| } |
| |
| // The TS29519_Policy_Data use this type |
| // moved to TS29512_CommonData to prevent circular import |
| type TS29512_CommonData.ChargingInformation ChargingInformation |
| |
| type set AccuUsageReport { |
| charstring refUmIds, |
| Volume volUsage optional, |
| Volume volUsageUplink optional, |
| Volume volUsageDownlink optional, |
| TS29571_CommonData.DurationSec timeUsage optional, |
| Volume nextVolUsage optional, |
| Volume nextVolUsageUplink optional, |
| Volume nextVolUsageDownlink optional, |
| TS29571_CommonData.DurationSec nextTimeUsage optional |
| } |
| |
| type set SmPolicyUpdateContextData { |
| set of PolicyControlRequestTrigger repPolicyCtrlReqTriggers, |
| set of AccNetChId accNetChIds optional, |
| TS29571_CommonData.AccessType accessType optional, |
| TS29571_CommonData.RatType ratType optional, |
| TS29571_CommonData.NetworkId servingNetwork optional, |
| TS29571_CommonData.UserLocation userLocationInformation optional, |
| TS29571_CommonData.TimeZone ueTimeZone optional, |
| TS29571_CommonData.Ipv4Addr relIpv4Address optional, |
| TS29571_CommonData.Ipv4Addr ipv4Address optional, |
| TS29571_CommonData.Ipv6Prefix ipv6AddressPrefix optional, |
| TS29571_CommonData.Ipv6Prefix relIpv6AddressPrefix optional, |
| TS29571_CommonData.MacAddr48 relUeMac optional, |
| TS29571_CommonData.MacAddr48 ueMac optional, |
| TS29571_CommonData.Ambr subsSessAmbr optional, |
| TS29571_CommonData.DefaultQosInformation subsDefQos optional, |
| AccuUsageReport accuUsageReport optional, |
| boolean threegppPsDataOffStatus optional, |
| set of AppDetectionInfo appDetectionInfos optional, |
| set of RuleReport ruleReports optional, |
| TS29571_CommonData.DateTime userLocationInfoTime optional, |
| set of record { |
| universal charstring key, |
| TS29571_CommonData.PresenceInfo additionalProperties |
| } repPraInfos optional, |
| UeInitiatedResourceRequest ueInitResReq optional, |
| boolean refQosIndication optional, |
| TS29571_CommonData.TraceData traceReq optional |
| } with { |
| variant (repPraInfos) "as map" |
| variant (threegppPsDataOffStatus) "name as '3gppPsDataOffStatus'" |
| } |
| |
| type set DnaiReport { |
| TS29571_CommonData.Uri notificationUri, |
| TS29571_CommonData.DnaiChangeType dnaiChgType optional |
| } |
| |
| type set TerminationNotification { |
| TS29571_CommonData.Uri resourceUri |
| } |
| |
| type set AppDetectionInfo { |
| charstring appId, |
| charstring instanceId optional, |
| set of FlowInformation sdfDescriptions optional |
| } |
| |
| type set AccNetChId { |
| charstring accNetChaIdValue, |
| set of charstring refPccRuleIds optional, |
| boolean sessionChScope optional |
| } |
| |
| type set RequestedRuleData { |
| set of charstring refPccRuleIds, |
| set of RequestedRuleDataType reqData |
| } |
| |
| type set RequestedUsageData { |
| set of charstring refUmIds optional, |
| boolean allUmIds optional |
| } |
| |
| type set UeCampingRep { |
| TS29571_CommonData.AccessType accessType optional, |
| TS29571_CommonData.AccessType ratType optional, |
| TS29571_CommonData.NetworkId servingNetwork optional, |
| TS29571_CommonData.UserLocation userLocationInfo optional, |
| TS29571_CommonData.TimeZone ueTimeZone optional |
| } |
| |
| type set RuleReport { |
| set of charstring pccRuleIds optional, |
| RuleStatus ruleStatus optional, |
| set of TS29514_Npcf_PolicyAuthorization.ContentVersion contVers optional, |
| FailureCode failureCode optional, |
| TS32291_Nchf_ConvergedCharging.FinalUnitAction finUnitAct optional |
| } |
| |
| type set of RanNasRelCause ranNasRelCauses |
| |
| type set RanNasRelCause { |
| TS29571_CommonData.NgApCause ngApCause optional, |
| TS29571_CommonData.FiveGMmCause fiveGMmCause optional, |
| FiveGSmCause fiveGSmCause optional |
| } with { |
| variant (fiveGMmCause) "name as '5GMmCause'" |
| variant (fiveGSmCause) "name as '5GSmCause'" |
| } |
| |
| type set UeInitiatedResourceRequest { |
| PacketFilterOperation packFiltOp, |
| set of PacketFilterInfo packFiltInfo, |
| RequestedQos reqQos optional |
| } |
| |
| type set PacketFilterInfo { |
| charstring packFiltId optional, |
| integer precedence optional, |
| PacketFilterContent packFiltCont optional, |
| charstring tosTrafficClass optional, |
| charstring spi optional, |
| charstring flowLabel optional, |
| FlowDirection flowDirection optional |
| } |
| |
| type set RequestedQos { |
| TS29571_CommonData.FiveQi fiveqi optional, |
| TS29571_CommonData.BitRate gbrUl optional, |
| TS29571_CommonData.BitRate gbrDl optional |
| } with { |
| variant (fiveqi) "name as '5qi'" |
| } |
| |
| |
| type TS29571_CommonData.Uinteger FiveGSmCause |
| |
| type charstring PacketFilterContent |
| |
| type charstring FlowDescription |
| |
| type integer Volume |
| |
| type TS29512_CommonData.FlowDirection_enum FlowDirection_enum |
| |
| type TS29512_CommonData.FlowDirection FlowDirection |
| |
| |
| type enumerated ReportingLevel_enum { SER_ID_LEVEL, RAT_GR_LEVEL, SPON_CON_LEVEL} |
| |
| type union ReportingLevel { |
| ReportingLevel_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| type enumerated MeteringMethod_enum { DURATION, VOLUME, DURATION_VOLUME, EVENT} |
| |
| type union MeteringMethod { |
| MeteringMethod_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| type enumerated PolicyControlRequestTrigger_enum { PLMN_CH, RES_MO_RE, AC_TY_CH, UE_IP_CH, UE_MAC_CH, AN_CH_COR, US_RE, APP_STA, APP_STO, AN_INFO, CM_SES_FAIL, PS_DA_OFF, DEF_QOS_CH, SE_AMBR_CH, PCC_RMV, QOS_STO, QOS_STA, NO_CREDIT, PRA_CH, SAREA_CH, SCNN_CH, ENF_PCC_RUL, RE_TIMEOUT, RES_RELEASE, SUCC_RES_ALLO} |
| |
| type union PolicyControlRequestTrigger { |
| PolicyControlRequestTrigger_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| type enumerated RequestedRuleDataType_enum { CH_ID, MS_TIME_ZONE, USER_LOC_INFO, RES_RELEASE, SUCC_RES_ALLO} |
| |
| type union RequestedRuleDataType { |
| RequestedRuleDataType_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| type enumerated RuleStatus_enum { ACTIVE, INACTIVE} |
| |
| type union RuleStatus { |
| RuleStatus_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| type enumerated FailureCode_enum { UNK_RULE_ID, RA_GR_ERR, SER_ID_ERR, NF_MAL, RES_LIM, MAX_NR_QoS_FLOW, MISS_FLOW_INFO, RES_ALLO_FAIL, UNSUCC_QOS_VAL, INCOR_FLOW_INFO, PS_TO_CS_HAN, APP_ID_ERR, NO_QOS_FLOW_BOUND, FILTER_RES, MISS_REDI_SER_ADDR, CM_END_USER_SER_DENIED, CM_CREDIT_CON_NOT_APP, CM_AUTH_REJ, CM_USER_UNK, CM_RAT_FAILED, SESS_AMBR_FAILURE, DEF_QOS_FAILURL} |
| |
| type union FailureCode { |
| FailureCode_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| type enumerated AfSigProtocol_enum { NO_INFORMATION, SIP} |
| |
| type union AfSigProtocol { |
| AfSigProtocol_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| type enumerated PacketFilterOperation_enum { DELETION, ADDITION, MODIFICATION} |
| |
| type union PacketFilterOperation { |
| PacketFilterOperation_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| type enumerated RedirectAddressType_enum { IPV4_ADDR, IPV6_ADDR, URL, SIP_URI} |
| |
| type union RedirectAddressType { |
| RedirectAddressType_enum enum_val, |
| charstring other_val |
| } with { |
| variant "JSON: as value" |
| } |
| |
| |
| |
| |
| |
| |
| } with { |
| encode "JSON" |
| } |