Four merges related to NGAP templates and NAS QoS types

With previous approach TTCN-3 titan would decode QoS_Rule records wrongly, (eg. as "modify" instead of "new") due to lack of TAG/CROSSTAG definitions in the union. Moreover, having a union of lists of PacketFilter made applying LENGTOHF on numOfPacketFilters difficult too, which also broke dec/enc.

Re-arrange the QoS_Rule into several subtypes based on operation field, since each operation really defines a lot of stuff, like which fields are present, etc.

Merge request reports

Loading
+17 −5
Changes for ttcn/Lib3GPP/NG_NAS/NG_NAS_Common.ttcn: 17 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -174,16 +174,13 @@ module NG_NAS_Common {
    B32_Type        NG_TMSI
  };

  template (value) NG_PacketFilterList cs_PacketFilterList_RemoteAddress (B4_Type p_Id, octetstring p_Component) :=
  template (value) NG_PacketFilter_Type2 cs_PacketFilter_RemoteAddress (B4_Type p_Id, octetstring p_Component) :=
  { /* @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS) */
   new := {{
     spare          := tsc_Spare2,
     direction      := '11'B,       // bi-directional
     packetFilterId := p_Id,
     len            := int2oct(lengthof(p_Component), 1),
     contents       := p_Component

   }}
  };

  template (value) QoS_Rule cs_QoS_RuleRemoteAccess (O1_Type p_Id,
@@ -196,14 +193,18 @@ module NG_NAS_Common {
   { /* @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS) */
    identifier          := p_Id,
    iel                 := p_Length,
    u := {
      creat := {
        ruleOperationCode   := '001'B,
        dqrBit              := p_DQR,
        numOfPacketFilters  := '0001'B,
    packetFilterList    := cs_PacketFilterList_RemoteAddress (p_FilterId, p_Component),
        packetFilterList    := { cs_PacketFilter_RemoteAddress (p_FilterId, p_Component) },
        precedence          := p_Precedence,
        spare               := tsc_Spare1,
        segregation         := tsc_Spare1,
        flowIdentifier      := p_FlowId
      }
    }
  };

  template (value) NG_NAS_GutiParameters_Type cs_NG_NAS_GutiParameters(B8_Type p_AMF_RegionId,
@@ -238,6 +239,17 @@ module NG_NAS_Common {
    otherDigits := p_Guti
  };

  template (value) NG_MobileIdentity cs_NG_MobileIdentitySUCI(template (value) B4_Type p_SUPIFormat,
                                                              template (value) octetstring p_OtherDigits) :=
  { /* @status    APPROVED (IMS, NR5GC, NR5GC_IRAT, POS) */
      iei         := omit,
      iel         := int2oct(1+lengthof(p_OtherDigits), 2),              // @sic R5s190719 sic@
      idDigit1    := p_SUPIFormat,                      // 4 bits
      oddEvenInd  := '0'B,                              // 1 bit
      typeOfId    := tsc_IdType_NG_SUCI,                // 3 bits
      otherDigits := p_OtherDigits
  };

  template (present) NG_MobileIdentity cr_NG_MobileIdentity_TypeOfId(template (present) B4_Type p_FirstDigit,
                                                                     template (present) B1_Type p_OddEvenInd,
                                                                     template (present) octetstring p_OtherDigits,
+1 −1
Changes for ttcn/Lib3GPP/NG_NAS/NG_NAS_MsgContainers.ttcn: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ module NG_NAS_MsgContainers
      configuration_Update_Complete,                  messageType = '01010101'B;
      cp_Service_Request,                             messageType = '01001111'B;
      deregistration_Accept,                          messageType = '01000110'B;
      deregistration_RequestMO,                       messageType = '01001000'B;
      deregistration_RequestMO,                       messageType = '01000101'B;
      gmm_Status,                                     messageType = '01100100'B;
      gsm_Status,                                     messageType = '11010110'B;
      network_Slice_Specific_Authentication_Complete, messageType = '01010001'B;
+241 −41
Changes for ttcn/Lib3GPP/NG_NAS/NG_NAS_Templates.ttcn: 241 added lines, 41 removed lines.
Original line number Diff line number Diff line
@@ -270,6 +270,101 @@ module NG_NAS_Templates {
    }
  };

 template (omit) NG_NAS_UL_Message_Type cs_NG_REGISTRATION_REQUEST(template (value) RegistrationType p_RegistrationType,
                                                                   template (value) NAS_KsiValue p_KeySetId,
                                                                   template (value) B1_Type p_Tsc,
                                                                   template (value) NG_MobileIdentity p_MobileId,
                                                                   template (omit) NAS_KeySetIdentifier p_NonCurrentKSI := omit,
                                                                   template (omit) NG_GMM_Cap p_GMM_Cap := omit,
                                                                   template (omit) NG_UE_SecurityCapability p_UESecurityCap := omit,
                                                                   template (omit) NSSAI p_ReqNSSAI := omit,
                                                                   template (omit) NG_TrackingAreaId p_TAI := omit,
                                                                   template (omit) UE_NetworkCap p_UE_NetworkCap := omit,
                                                                   template (omit) ULDataStatus p_ULDataStatus := omit,
                                                                   template (omit) PDU_SessionStatus p_PDU_SessionStatus := omit,
                                                                   template (omit) MICO_Ind p_MICO_Ind := omit,
                                                                   template (omit) UE_Status p_UE_Status := omit,
                                                                   template (omit) NG_MobileIdentity p_AddGUTI := omit,
                                                                   template (omit) AllowedPDU_SessionStatus p_AllowedPDU_SessionStatus := omit,
                                                                   template (omit) UE_UsageSetting p_UE_UsageSetting := omit,
                                                                   template (omit) NG_DRXparameter p_DRXparam := omit,
                                                                   template (omit) EPS_MessageContainer p_EPSMsg := omit,
                                                                   template (omit) LADN_Ind p_LADN_Ind := omit,
                                                                   template (omit) PayloadContainerType p_ContainerType := omit, // @sic R5w190113 sic@
                                                                   template (omit) PayloadContainer p_Payload := omit,
                                                                   template (omit) NetworkSlicingInd p_NetworkSlicingInd := omit,
                                                                   template (omit) NG_UpdateType p_NG_UpdateType := omit,
                                                                   template (omit) MS_Clsmk2 p_MS_Clsmk2 := omit,
                                                                   template (omit) CodecList p_SupportedCodecs := omit,
                                                                   template (omit) EPS_BearerContextStatus p_EPS_BearerContextStatus := omit, // @sic R5s190543 sic@
                                                                   template (omit) NASMessageContainer p_Msg := omit,
                                                                   template (omit) ExtdDRXParams p_ExtdDRXParams := omit,
                                                                   template (omit) GPRS_Timer3 p_T3324 := omit,
                                                                   template (omit) UERadioCapId p_UERadioCapId := omit,
                                                                   template (omit) MappedNSSAI p_MappedNSSAI := omit,
                                                                   template (omit) AddInfoRequest p_AddInfoRequest := omit,
                                                                   template (omit) WUSAssistInfo p_WUSAssistInfo := omit,
                                                                   template (omit) N5GCInd p_N5GCInd := omit,
                                                                   template (omit) NB_N1ModeDRXParams p_NB_N1ModeDRXParams := omit,
                                                                   template (omit) UE_RequestType p_UeRequestType := omit,
                                                                   template (omit) NG_PagingRestriction p_PagingRestrict := omit,
                                                                   template (omit) ServiceLvlAAContainer p_ServiceLvlAA := omit,
                                                                   template (omit) NID p_NId := omit,
                                                                   template (omit) PLMN_IdIE p_MSPLMNwDisasterCondition := omit,
                                                                   template (omit) PEIPS_AssistInfo p_RequestedPEIPS_AssistInfo := omit,
                                                                   template (omit) GPRS_Timer3 p_T3512 := omit
                                                                   ) := { /* 24.501 cl. 8.2.6 */
    /* @status    APPROVED (IMS, NR5GC, NR5GC_IRAT, POS) */
    registration_Request := {
      protocolDiscriminator   := tsc_EPD_GMM,                     /* cl. 9.2       M V 1   */
      spareHalfOctet          := tsc_SpareHalfOctet,              /* cl. 9.3      M V 1/2 */
      securityHeaderType      := tsc_SHT_NoSecurityProtection,
      messageType             := tsc_MT_NG_RegistrationRequest,   /* cl. 9.7      M V 1   */
      ngNasKSI                := cs_NAS_KeySetIdentifier_lv(valueof(p_KeySetId), valueof(p_Tsc)), /* cl. 9.11.3.32 M V 1/2 */
      registrationType        := p_RegistrationType,              /* cl. 9.11.3.7 M LV 2  */
      ngMobileId              := p_MobileId,                      /* cl. 9.11.3.4 M LV 5-?  */
      nonCurrentNativeKSI     := p_NonCurrentKSI,                 /* cl. 9.11.3.32 O TV 1 IEI=C- */
      gmmCapability           := p_GMM_Cap,                       /* cl. 9.11.3.1  O TLV 3-15 IEI=10 */
      ueSecurityCapability    := p_UESecurityCap,                 /* cl. 9.11.3.54 O TLV 4-10 IEI=2E */
      requestedNSSAI          := p_ReqNSSAI,                      /* cl. 9.11.3.37 O TLV 4-74 IEI=2F */
      lastVisitedRegisteredTai := p_TAI,                          /* cl. 9.11.3.8  O TV 7 IEI=52 */
      s1_UE_Capability        := p_UE_NetworkCap,                 /* cl. 9.11.3.48 O LV 4-15 IEI=65 */
      ulDataStatus            := p_ULDataStatus,                  /* cl. 9.11.3.57 O TLV 4-34 IEI=40 */
      pduSessionStatus        := p_PDU_SessionStatus,             /* cl. 9.11.3.44  O TLV 4-34 IEI=50 */
      micoInd                 := p_MICO_Ind,                      /* cl. 9.11.3.31 O TLV 1 IEI=B */
      ueStatus                := p_UE_Status,                     /* cl. 9.11.3.56 O TLV 3 IEI=2B */
      additionalGUTI          := p_AddGUTI,                       /* cl. 9.11.3.4  O TLV 5-? IEI=2C */
      allowedPDUSessionStatus := p_AllowedPDU_SessionStatus,      /* cl. 9.11.3.13 O TLV 4-34 IEI=25 */
      ueUsageSetting          := p_UE_UsageSetting,               /* cl. 9.11.3.55 O TLV 3 IEI=60 */
      reqDRXParams            := p_DRXparam,                      /* cl. 9.11.3.22 O TLV ? IEI=51 */
      epsMessage              := p_EPSMsg,                        /* cl. 9.11.3.24 O TLV-E ? IEI=7C */
      ladnInd                 := p_LADN_Ind,                      /* cl. 9.11.3.29 O TLV-E 3-811 IEI=7E */
      payloadContainerType    := p_ContainerType,                 /* cl. 9.11.3.40 O TV 1 IEI=8 Mar 19 @sic R5w190113 sic@*/
      payload                 := p_Payload,                       /* cl. 9.11.3.39 O TLV-E 4-65538 IEI=7B */
      networkSlicingInd       := p_NetworkSlicingInd,             /* cl. 9.11.3.36 O TV 1 IEI=9 Dec18 */
      updateType              := p_NG_UpdateType,                 /* cl. 9.11.3.9A O TLV 3 IEI=53 Dec18 */
      msClassmark2            := p_MS_Clsmk2, /* cl. 9.11.3.31C O TLV 5 IEI=41 Sep20 @sic R5s201387 Baseline Moving sic@ */
      supportedCodecs         := p_SupportedCodecs, /* cl. 9.11.3.51A O TLV 5-n IEI=42 Sep20 @sic R5s201387 Baseline Moving sic@ */
      nasMsg                  := p_Msg,                           /* cl. 9.11.3.33 O TLV-E 4-n IEI=71 Dec18 */
      epsBearerContextStatus  := p_EPS_BearerContextStatus,       /* cl. 9.11.3.23A O TLV 4 IEI=60 Jun19 @sic R5s190543 sic@ */
      requestedExtdDRXParams  := p_ExtdDRXParams, /* cl. 9.11.3.26A O TLV 3 IEI=6E Sep20 @sic R5s201387 Baseline Moving sic@ */
      t3324Value              := p_T3324, /* cl. 9.11.2.5   O TLV 3 IEI=6A Sep20 @sic R5s201387 Baseline Moving sic@ */
      ueRadioCapabilityId     := p_UERadioCapId, /* cl. 9.11.3.68  O TLV 3-n IEI=67 Sep20 @sic R5s201387 Baseline Moving sic@ */
      requestedMappedNSSAI    := p_MappedNSSAI, /* cl. 9.11.3.31B O TLV 3-42 IEI=35 Sep20 @sic R5s201387 Baseline Moving sic@ */
      additionalInfoReq       := p_AddInfoRequest, /* cl. 9.11.3.12A O TLV 3 IEI=48 Sep20 @sic R5s201387 Baseline Moving sic@ */
      requestedWUSAssistanceInfo := p_WUSAssistInfo, /* cl. 9.11.3.71  O TLV 3-n IEI=1A Sep20 @sic R5s201387 Baseline Moving sic@ */
      n5GCInd                 := p_N5GCInd, /* cl. 9.11.3.72  O T   1 IEI=A Sep20 @sic R5s201387 Baseline Moving sic@ */
      requestedNB_N1DRXParams := p_NB_N1ModeDRXParams,  /* cl. 9.11.3.73  O TLV 3 IEI=30 Sep20 @sic R5s201387 Baseline Moving sic@ */
      ueRequestType           := p_UeRequestType, /* cl. 9.11.3.76  O TLV 3 IEI=29 Sep22 @sic R5s221179 Baseline Moving sic@ */
      pagingRestrict          := p_PagingRestrict, /* cl. 9.11.3.77  O TLV 3-35 IEI=28 Sep22 @sic R5s221179 Baseline Moving sic@ */
      serviceLvlAA            := p_ServiceLvlAA, /* cl. 9.11.2.10  O TLV-E 6-n IEI=72 Sep22 @sic R5s221179 Baseline Moving sic@ */
      nId                     := p_NId, /* cl. 9.11.3.79  O TLV 8 IEI=32 Sep22 @sic R5s221179 Baseline Moving sic@ */
      msPLMNwDisasterCondition  := p_MSPLMNwDisasterCondition, /* cl. 9.11.3.85  O TLV 5 IEI=16 Sep22 @sic R5s221179 Baseline Moving sic@ */
      requestedPEIPS_AssistInfo := p_RequestedPEIPS_AssistInfo,  /* cl. 9.11.3.80  O TLV 3-n IEI=2A Sep22 @sic R5s221179 Baseline Moving sic@ */
      t3512Value              := p_T3512  /* cl. 9.11.2.5   O TLV 3 IEI=3B Jun23 @sic R5s230533 sic@ */
    }
  } // End of template m_NG_REGISTRATION_REQUEST

  template (present) NG_UpdateType cr_NG_Update (template (present) B1_Type p_NgRAN_RCU := ?,
                                                 template (present) B1_Type p_SmsRequested := ?,
                                                 template (present) B2_Type p_EPS_PNB_CIoT := ?,
@@ -1426,6 +1521,14 @@ module NG_NAS_Templates {
    registrationType    := p_Type
  };

  template (value) RegistrationType cs_RegistrationType (template (value) B3_Type p_Type,
                                                         template (value) B1_Type p_FOR) :=
  { /* 24.501 cl. 9.11.3.7 */
    /* @status    APPROVED (IMS, NR5GC, NR5GC_IRAT, POS) */
    fOR                 := p_FOR,
    registrationType    := p_Type
  };

  template (value) CAGInfoList cs_EmptyCAGInfoList :=
  { /* @status    APPROVED (NR5GC) */
    /* 24.501 cl. 9.11.3.18A */
@@ -2367,27 +2470,19 @@ module NG_NAS_Templates {
  template (value) QoSFlowDescr cs_QoSFlowDescr1 := cs_QoSFlowDescr ({cs_QoS_Flow1});           /* @status      */
  template (value) QoSFlowDescr cs_QoSFlowDescr2 := cs_QoSFlowDescr ({cs_QoS_Flow2});           /* @status      */

  template (value) NG_PacketFilterList cs_PacketFilterList_1MatchAll :=
  template (value) NG_PacketFilter_Type2 cs_PacketFilter_1MatchAll :=
  { /* @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS) */
    new := {
      {
    spare          := tsc_Spare2,
    direction      := '11'B,       // bi-directional
    packetFilterId := '0001'B,     // @sic R5-216158 sic@
    len            := '01'O,
    contents       := '01'O        // match-all
      }
    }
  };

  template (value) NG_PacketFilterList cs_PacketFilterList_MediaUDP (B4_Type p_Id, integer p_Port) :=
  { /* @status    APPROVED (IMS, NR5GC, NR5GC_IRAT, POS) */
    new := {
  template (value) NG_PacketFilter_Type2 cs_PacketFilter_MediaUDP (B4_Type p_Id, integer p_Port) :=
      cs_NG_PacketFilter_Type2 ('11'B,       // bi-directional
                                p_Id,
                                fl_BuildRemotePortRange(p_Port) & fl_BuildProtocolIdNextHeaderUDP())  // @sic R5s220046 sic@                                                        // Protocol id / Next Header UDP
    }
  };
                                fl_BuildRemotePortRange(p_Port) & fl_BuildProtocolIdNextHeaderUDP());

  template (value) NG_PacketFilter_Type2 cs_NG_PacketFilter_Type2 (B2_Type p_Dir,
                                                                   B4_Type p_Id,
@@ -2429,24 +2524,91 @@ module NG_NAS_Templates {
    return v_PacketFilter;
  }


  template (value) QoS_Rule cs_QoS_Rule (O1_Type p_Id,
                                         B6_Type p_QFI,
                                         O1_Type p_Precedence,
                                         B3_Type p_OperationCode := '001'B,
                                         template (value) NG_PacketFilterList p_FilterList := cs_PacketFilterList_1MatchAll,
                                         B1_Type p_DQR := '1'B) :=
  template (value) QoS_Rule cs_QoS_Rule (template (value) O1_Type p_Id,
                                         template (value) QoS_RuleU qos_rule_u) :=
  { /* @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS) */
    identifier          := p_Id,
    iel                 := fl_NR5GC_QoSRuleLength(p_FilterList),   // @sic R5s210074 sic@
    ruleOperationCode   := p_OperationCode,  // @sic R5s190987 sic@
    iel                 := fl_NR5GC_QoSRuleLength(valueof(qos_rule_u)),   // @sic R5s210074 sic@
    u                   := qos_rule_u
  };


  template (value) QoS_RuleU cs_QoS_RuleU_Create(
                                  template (value) B6_Type p_QFI,
                                  template (value) O1_Type p_Precedence,
                                  template (omit) NG_PacketFilterList_Type2 p_FilterList := {cs_PacketFilter_1MatchAll},
                                  template (value) B1_Type p_DQR := '1'B,
                                  template (value) B1_Type spare := tsc_Spare1,
                                  template (value) B1_Type segregation := tsc_Spare1) :=
  { /* @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS) */
    creat := {
      ruleOperationCode   := '001'B,
      dqrBit              := p_DQR,
    numOfPacketFilters  := '0001'B,
      numOfPacketFilters  := fl_NR5GC_numOfPacketFilters(p_FilterList),
      packetFilterList    := p_FilterList,
      precedence          := p_Precedence,
    spare               := tsc_Spare1,
    segregation         := tsc_Spare1,
      spare               := spare,
      segregation         := segregation,
      flowIdentifier      := p_QFI
    }
  };

  template (value) QoS_RuleU cs_QoS_RuleU_Modify_and_add_PF(
                                  template (omit) B6_Type p_QFI := omit,
                                  template (omit) O1_Type p_Precedence := omit,
                                  template (value) NG_PacketFilterList_Type2 p_FilterList := {cs_PacketFilter_1MatchAll},
                                  template (value) B1_Type p_DQR := '1'B,
                                  template (omit) B1_Type spare := tsc_Spare1,
                                  template (omit) B1_Type segregation := tsc_Spare1) :=
  { /* @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS) */
    modify_and_add_pf := {
      ruleOperationCode   := '011'B,
      dqrBit              := p_DQR,
      numOfPacketFilters  := fl_NR5GC_numOfPacketFilters(p_FilterList),
      packetFilterList    := p_FilterList,
      precedence          := p_Precedence,
      spare               := spare,
      segregation         := segregation,
      flowIdentifier      := p_QFI
    }
  };

  template (value) QoS_RuleU cs_QoS_RuleU_Modify_and_replace_PF(
                                  template (omit) B6_Type p_QFI := omit,
                                  template (omit) O1_Type p_Precedence := omit,
                                  template (omit) NG_PacketFilterList_Type2 p_FilterList := {cs_PacketFilter_1MatchAll},
                                  template (value) B1_Type p_DQR := '1'B,
                                  template (omit) B1_Type spare := tsc_Spare1,
                                  template (omit) B1_Type segregation := tsc_Spare1) :=
  { /* @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS) */
    modify_and_replace_pf := {
      ruleOperationCode   := '100'B,
      dqrBit              := p_DQR,
      numOfPacketFilters  := fl_NR5GC_numOfPacketFilters(p_FilterList),
      packetFilterList    := p_FilterList,
      precedence          := p_Precedence,
      spare               := spare,
      segregation         := segregation,
      flowIdentifier      := p_QFI
    }
  };

  template (value) QoS_RuleU cs_QoS_RuleU_Modify_no_PF(
                                  template (omit) B6_Type p_QFI := omit,
                                  template (omit) O1_Type p_Precedence := omit,
                                  template (value) B1_Type p_DQR := '1'B,
                                  template (omit) B1_Type spare := tsc_Spare1,
                                  template (omit) B1_Type segregation := tsc_Spare1) :=
  { /* @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS) */
    modify_no_pf := {
      ruleOperationCode   := '110'B,
      dqrBit              := p_DQR,
      numOfPacketFilters  := '0000'B,
      precedence          := p_Precedence,
      spare               := spare,
      segregation         := segregation,
      flowIdentifier      := p_QFI
    }
  };

  /*
@@ -2463,14 +2625,27 @@ module NG_NAS_Templates {
                                   template (omit) IEI8_Type p_IEI := omit) return template (value) QoS_Rules
  {
    var template (value) QoS_Rules v_QoS_Rules;
    var template (value) QoS_Rule v_VoiceQoS := cs_QoS_Rule('03'O, int2bit(7, 6), '01'O, -, cs_PacketFilterList_MediaUDP('0110'B, tsc_IMS_MediaPort_M1), '0'B); // @sic R5-210627, R5s220046 sic@;
    var template (value) QoS_Rule v_VoiceQoS;
    var template (value) QoS_Rule v_VoiceQoS2;

    v_VoiceQoS := cs_QoS_Rule('03'O,
                              cs_QoS_RuleU_Create(int2bit(7, 6),
                                                  '01'O,
                                                  { cs_PacketFilter_MediaUDP('0110'B, tsc_IMS_MediaPort_M1) },
                                                  '0'B)); // @sic R5-210627, R5s220046 sic@;
    v_VoiceQoS2 := cs_QoS_Rule('04'O,
                               cs_QoS_RuleU_Create(int2bit(8, 6),
                                                   '02'O,
                                                   { cs_PacketFilter_MediaUDP('0111'B, tsc_IMS_MediaPort_M2) },
                                                   '0'B));


    if (p_RuleNum == "7_Voice") {
      v_QoS_Rules := cs_QoS_Rules ({v_VoiceQoS}, p_IEI) // @sic R5-213440 sic@
    } else if (p_RuleNum == "7_Video") {
      v_QoS_Rules := cs_QoS_Rules ({cs_QoS_Rule('04'O, int2bit(8, 6), '02'O, -, cs_PacketFilterList_MediaUDP('0111'B, tsc_IMS_MediaPort_M2), '0'B)}, p_IEI) // @sic R5-217796, R5s220046, R5s220336 sic@
      v_QoS_Rules := cs_QoS_Rules ({v_VoiceQoS2}, p_IEI) // @sic R5-217796, R5s220046, R5s220336 sic@
    } else if (p_RuleNum == "7_VoiceVideo") {
      v_QoS_Rules := cs_QoS_Rules ({v_VoiceQoS, cs_QoS_Rule('04'O, int2bit(8, 6), '02'O, -, cs_PacketFilterList_MediaUDP('0111'B, tsc_IMS_MediaPort_M2), '0'B)}, p_IEI) // @sic R5-210627, R5-216161, R5s220046 sic@
      v_QoS_Rules := cs_QoS_Rules ({v_VoiceQoS, v_VoiceQoS2}, p_IEI) // @sic R5-210627, R5-216161, R5s220046 sic@
    } else {
      v_QoS_Rules := cs_QoS_Rules ({f_BuildDefaultQoSRule(p_RuleNum)}, p_IEI);
    }
@@ -2490,43 +2665,68 @@ module NG_NAS_Templates {

    select (p_RuleNum) {
      case ("1") {
        v_QoS_Rule := cs_QoS_Rule('01'O, int2bit(1, 6), 'FF'O); // @sic R5-202585 sic@
        v_QoS_Rule := cs_QoS_Rule('01'O,
                                  cs_QoS_RuleU_Create(int2bit(1, 6),
                                                      'FF'O)); // @sic R5-202585 sic@
      }
      case ("2") {
        v_QoS_Rule := cs_QoS_Rule('02'O, int2bit(2, 6), 'FF'O); // @sic R5-202585 sic@
        v_QoS_Rule := cs_QoS_Rule('02'O,
                                  cs_QoS_RuleU_Create(int2bit(2, 6),
                                                      'FF'O)); // @sic R5-202585 sic@
      }
      case ("3", "4", "4a", "5", "6") {
        v_QoS_Rule := f_BuildQoSRuleRemoteAccess (p_RuleNum);
      }
      case ("8") {
        v_QoS_Rule := cs_QoS_Rule('07'O, int2bit(9, 6), 'FF'O); // @sic R5-211499 sic@
        v_QoS_Rule := cs_QoS_Rule('07'O,
                                  cs_QoS_RuleU_Create(int2bit(9, 6),
                                                      'FF'O)); // @sic R5-211499 sic@
      }
    }
    return v_QoS_Rule;
  }

  /*
   * @desc      Returns "number of packet filters" for a given input NG_PacketFilterList
   * @param     p_FilterList
   * @return    B4_Type
   */
  function fl_NR5GC_numOfPacketFilters (template (omit) NG_PacketFilterList_Type2 p_FilterList) return B4_Type
  {
    if (isvalue(p_FilterList)) {
      return int2bit(lengthof(valueof(p_FilterList)), 4);
    }
    return '0000'B;
  }


  /*
   * @desc      Returns length of QoS Rule for a given input
   * @param     p_FilterList
   * @return    Type6Length_Type
   * @status    APPROVED (ENDC, IMS, NR5GC, NR5GC_IRAT, POS)
   */
   function fl_NR5GC_QoSRuleLength (template (value) NG_PacketFilterList p_FilterList) return Type6Length_Type
   function fl_NR5GC_QoSRuleLength (QoS_RuleU u) return Type6Length_Type
  {
    var integer i;
    var integer v_Length:=0;

    if (ischosen(p_FilterList.modify)) {
      v_Length := 1;
    if (ischosen(u.creat)) {
      return int2oct(lengthof(bit2oct(encvalue(u.creat))), 2);
    }
    if (ischosen(p_FilterList.new)) {
      for (i:= 0; i < lengthof(p_FilterList.new); i:= i+1) {
        v_Length := v_Length + oct2int(valueof(p_FilterList.new[i].len));
        v_Length := v_Length + 2; // 1 octet of header + length
    if (ischosen(u.delete)) {
      return int2oct(lengthof(bit2oct(encvalue(u.delete))), 2);
    }
    if (ischosen(u.modify_and_add_pf)) {
      return int2oct(lengthof(bit2oct(encvalue(u.modify_and_add_pf))), 2);
    }
    v_Length := v_Length + 3; // 1 octet of header + precedence + 1 octet of footer
    return int2oct(v_Length, 2);
    if (ischosen(u.modify_and_replace_pf)) {
      return int2oct(lengthof(bit2oct(encvalue(u.modify_and_replace_pf))), 2);
    }
    if (ischosen(u.modify_and_delete_pf)) {
      return int2oct(lengthof(bit2oct(encvalue(u.modify_and_delete_pf))), 2);
    }
    if (ischosen(u.modify_no_pf)) {
      return int2oct(lengthof(bit2oct(encvalue(u.modify_no_pf))), 2);
    }
    return int2oct(0, 2);
 }

  /*
+105 −15
Changes for ttcn/Lib3GPP/NG_NAS/NG_NAS_TypeDefs.ttcn: 105 added lines, 15 removed lines.
Original line number Diff line number Diff line
@@ -2495,14 +2495,13 @@ module NG_NAS_TypeDefs {
    B4_Type                     spare,
    B1_Type                     si16LLA,                    // @sic R5s201526 sic@
    B3_Type                     typeValue,
    octetstring                 adressInfo length(4..12),
    octetstring                 ipv6Address length(1..16) optional    /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    octetstring                 adressInfo length(4..12) optional,
    octetstring                 ipv6Address length(16) optional    /* Sep20 @sic R5s201387 Baseline Moving sic@ */
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (spare, si16LLA, typeValue, adressInfo, ipv6Address)";
    variant (iel) "BYTEORDER(last)";
    variant (adressInfo) "BYTEORDER(last)";
    variant (ipv6Address) "BYTEORDER(last)";
    variant (ipv6Address) "PRESENCE(si16LLA = '1'B)"
  };

  type record PDU_SessionType {                                 /* 24.501 cl. 9.11.4.11 */
@@ -2539,25 +2538,116 @@ module NG_NAS_TypeDefs {
  type record QoS_Rule {
    IEI8_Type                   identifier,
    Type6Length_Type            iel,
    B3_Type                     ruleOperationCode,
    QoS_RuleU                   u
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (u)";
    variant (iel) "BYTEORDER(last)";
  };

  type union QoS_RuleU {
    QoS_Rule_Create creat,
    QoS_Rule_Delete delete,
    QoS_Rule_Modify_and_add_PF modify_and_add_pf,
    QoS_Rule_Modify_and_replace_PF modify_and_replace_pf,
    QoS_Rule_Modify_and_delete_PF modify_and_delete_pf,
    QoS_Rule_Modify_no_PF modify_no_pf
  } with {
    variant "TAG(creat, ruleOperationCode = '001'B;
                 delete, ruleOperationCode = '010'B;
                 modify_and_add_pf, ruleOperationCode = '011'B;
                 modify_and_replace_pf, ruleOperationCode = '100'B;
                 modify_and_delete_pf, ruleOperationCode = '101'B;
                 modify_no_pf, ruleOperationCode = '110'B)"
  };

  type record QoS_Rule_Create {
    B3_Type                     ruleOperationCode ('001'B),
    B1_Type                     dqrBit,
    B4_Type                     numOfPacketFilters,
    NG_PacketFilterList         packetFilterList   optional,
    B4_Type                     numOfPacketFilters, /* >= 0 */
    NG_PacketFilterList_Type2   packetFilterList   optional,
    /*  For the "create new QoS rule" operation, the QoS rule precedence value field shall be included */
    O1_Type                     precedence,
    /* For the "create new QoS rule" operation, the QoS flow identifier value field shall be included. */
    B1_Type                     spare,
    B1_Type                     segregation,        /* Dec18 */
    B6_Type                     flowIdentifier
  } with {
    variant "FIELDORDER(msb)";
    variant (numOfPacketFilters) "LENGTHTO(packetFilterList)";
    variant (numOfPacketFilters) "UNIT(elements)"
  };

  type record QoS_Rule_Delete {
    B3_Type                     ruleOperationCode ('010'B),
    B1_Type                     dqrBit,
    /* For the "delete existing QoS rule" operation the number of packet filters shall be coded as 0. */
    B4_Type                     numOfPacketFilters ('0000'B)
    /* For the "delete existing QoS rule" operation, the QoS rule precedence
     * value field shall not be included */
    /* For the "delete existing QoS rule" operation, the QoS flow identifier
     * value field shall not be included. */
  } with {
    variant "FIELDORDER(msb)";
  };

  type record QoS_Rule_Modify_and_add_PF {
    B3_Type                     ruleOperationCode ('011'B),
    B1_Type                     dqrBit,
    B4_Type                     numOfPacketFilters, /* > 0 */
    NG_PacketFilterList_Type2   packetFilterList,
    O1_Type                     precedence         optional,
    B1_Type                     spare              optional,
    B1_Type                     segregation        optional,        /* Dec18 */
    B6_Type                     flowIdentifier     optional
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (ruleOperationCode, dqrBit, numOfPacketFilters, packetFilterList, precedence, spare, segregation, flowIdentifier)";
    variant (iel) "BYTEORDER(last)";
    variant (numOfPacketFilters) "LENGTHTO(packetFilterList)";
    variant (numOfPacketFilters) "UNIT(elements)"
  };

  type union NG_PacketFilterList {
    NG_PacketFilterList_Type1   modify,
    NG_PacketFilterList_Type2   new
  type record QoS_Rule_Modify_and_replace_PF {
    B3_Type                     ruleOperationCode ('100'B),
    B1_Type                     dqrBit,
    B4_Type                     numOfPacketFilters,  /* >= 0 */
    NG_PacketFilterList_Type2   packetFilterList   optional,
    O1_Type                     precedence         optional,
    B1_Type                     spare              optional,
    B1_Type                     segregation        optional,        /* Dec18 */
    B6_Type                     flowIdentifier     optional
  } with {
    variant "";
    variant "FIELDORDER(msb)";
    variant (numOfPacketFilters) "LENGTHTO(packetFilterList)";
    variant (numOfPacketFilters) "UNIT(elements)"
  };

  type record QoS_Rule_Modify_and_delete_PF {
    B3_Type                     ruleOperationCode ('101'B),
    B1_Type                     dqrBit,
    B4_Type                     numOfPacketFilters,  /* > 0 */
    NG_PacketFilterList_Type1   packetFilterList,
    O1_Type                     precedence         optional,
    B1_Type                     spare              optional,
    B1_Type                     segregation        optional,        /* Dec18 */
    B6_Type                     flowIdentifier     optional
  } with {
    variant "FIELDORDER(msb)";
    variant (numOfPacketFilters) "LENGTHTO(packetFilterList)";
    variant (numOfPacketFilters) "UNIT(elements)"
  };

  type record QoS_Rule_Modify_no_PF {
    B3_Type                     ruleOperationCode ('110'B),
    B1_Type                     dqrBit,
/* For the "modify existing QoS rule without modifying packet filters"
 * operation, the number of packet filters shall be coded as 0. */
    B4_Type                     numOfPacketFilters ('0000'B),
    O1_Type                     precedence         optional,
    B1_Type                     spare              optional,
    B1_Type                     segregation        optional,        /* Dec18 */
    B6_Type                     flowIdentifier     optional
  } with {
    variant "FIELDORDER(msb)";
  };

  type record of NG_PacketFilter_Type1 NG_PacketFilterList_Type1;
@@ -2575,8 +2665,8 @@ module NG_NAS_TypeDefs {
    B2_Type                     spare,
    B2_Type                     direction,
    B4_Type                     packetFilterId,
    Type4Length_Type            len                   optional,
    octetstring                 contents  length (1..255) optional // @sic R5w190307 sic@
    Type4Length_Type            len,
    octetstring                 contents length (0..255) // @sic R5w190307 sic@
  } with {
    variant "FIELDORDER(msb)";
    variant (len) "LENGTHTO (contents)";
+1 −1
Changes for ttcn/LibNGAP/lib/LibNGAP_Templates.ttcn: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -560,7 +560,7 @@ module LibNGAP_Templates {
                                                                                                       value_ := { RAN_UE_NGAP_ID := p_ranUeNgapID }
                                                                                                   },
                                                                                                   {
                                                                                                       id := id_PDUSessionResourceModifyListModReq,
                                                                                                       id := id_PDUSessionResourceModifyListModRes,
                                                                                                       criticality := reject,
                                                                                                       value_ := { PDUSessionResourceModifyListModRes := p_pDUSessionResourceModifyListModRes
                                                                                                   }
Loading