/******************************************************************************/
// @copyright   Copyright Notification
//   No part may be reproduced except as authorized by written permission.
//   The copyright and the foregoing restriction extend to reproduction in all media.
//   Trademark 2010, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC).
//   All rights reserved.
// @version: IWD_10wk37
// $Date: 2010-09-08 15:02:33 +0200 (Wed, 08 Sep 2010) $
// $Rev: 3834 $
/******************************************************************************/

module UTRAN_RAB_TemplatesFDD {

//----------------------------------------------------------------------
// Import part
//----------------------------------------------------------------------

  import from UTRAN_RRC_ASN1_Definitions language "ASN.1:1997" all;
  import from UTRAN_ASP_Definitions language "ASN.1:1997" all;
  import from UTRAN_RAB_Templates all;
  import from UTRAN_Parameters all;
  import from UTRAN_ASN1_Templates all;
  import from UTRAN_Templates all;
  import from UTRAN_TypeDefs all;

//----------------------------------------------------------------------
// Template init functions
//----------------------------------------------------------------------

  //* @desc Function that determines the number of HARQ processes according to 34.108 cl. 6.10.2.4.5 Parameter Set
  function f_GetNrOfHarqProcesses_FDD ( ) return HarqNrOfProcesses_Type {
    var HarqNrOfProcesses_Type v_NumberOfProcesses := n6;

    if ( ( px_HSDSCH_UE_Category_FDD == 1 ) or
         ( px_HSDSCH_UE_Category_FDD == 2 ) ) {
      v_NumberOfProcesses := n2;
    }
    else if ( ( px_HSDSCH_UE_Category_FDD == 3 ) or
              ( px_HSDSCH_UE_Category_FDD == 4 ) or
              ( px_HSDSCH_UE_Category_FDD == 11 ) ) {
      v_NumberOfProcesses := n3;
    }

    return v_NumberOfProcesses;
  }

//----------------------------------------------------------------------
// Start: All FDD templates used by RAB establishment procedures
// Reference: 4.8.3 Table 4.8.3-1
//----------------------------------------------------------------------

  //* @desc ASN.1 PDU Constraint Defined in TS 34.108 clause 9. But uses 64 K uplink
  template (value) DL_DCCH_Message cs_108_RB_SetUpHS_FromDCH_UL_64k_FDD ( IntegrityCheckInfo        p_Integrityinfo,
                                                                          RRC_TransactionIdentifier p_RRC_Ti,
                                                                          ActivationTime            p_Activetime,
                                                                          UL_ScramblingCode         p_UL_ScramblingCode,
                                                                          PrimaryScramblingCode     p_PrimScramblingCode ) :=
  {
    integrityCheckInfo := p_Integrityinfo,
    message_ := {
      radioBearerSetup := {
        later_than_r3 := {
          rrc_TransactionIdentifier := p_RRC_Ti,
          criticalExtensions := {
            criticalExtensions := {
              criticalExtensions := {
                criticalExtensions := {
                  criticalExtensions := {
                    r8 := {
                      radioBearerSetup_r8 := {
                        integrityProtectionModeInfo := omit,
                        cipheringModeInfo := omit,
                        sr_vcc_Info := omit,
                        activationTime := p_Activetime,
                        new_U_RNTI := omit,
                        new_C_RNTI := omit,
                        new_DSCH_RNTI := omit,
                        new_H_RNTI := '1010101010101010'B,
                        newPrimary_E_RNTI := omit,
                        newSecondary_E_RNTI := omit,
                        rrc_StateIndicator := cell_DCH,
                        utran_DRX_CycleLengthCoeff := omit,
                        ura_Identity := omit,
                        supportForChangeOfUE_Capability := omit,
                        cn_InformationInfo := omit,
                        srb_InformationSetupList := omit,
                        rab_InformationSetupList := {
                          cs_RAB_InfoSetupDCH_PS_HSDPA ( cs_RLC_InfoAM_Def_HSDPA )//FFS - Checl values
                        },
                        rab_InformationReconfigList := omit,
                        rb_InformationReconfigList := omit,
                        rb_InformationAffectedList := omit,
                        dl_CounterSynchronisationInfo := omit,
                        pdcp_ROHC_TargetMode := omit,
                        ul_CommonTransChInfo := cs_UL_CommTrChInfoDCH_PS_64k_FDD,//FFS - Check values
                        ul_deletedTransChInfoList := omit,
                        ul_AddReconfTransChInfoList := cs_UL_AddReconfTransChInfoListDCH_PS_64k,//FFs - check values
                        dl_CommonTransChInfo := cs_DL_CommonTransChInfoDCH_FDD ( cs_TFCS_Cmpl0_1_Rx ),//FFS - check values
                        dl_DeletedTransChInfoList := omit,
                        dl_AddReconfTransChInfoList := cs_DL_AddReconfTransChInfoList_2DCH_HS_PS_HSDPA_FDD,//FFS - check values
                        frequencyInfo := omit,
                        multi_frequencyInfo := omit,
                        dtx_drx_TimingInfo := omit,
                        dtx_drx_Info := omit,
                        hs_scch_LessInfo := omit,
                        mimoParameters := omit,
                        maxAllowedUL_TX_Power := tsc_MaxAllowPwr,
                        ul_DPCH_Info := cds_UL_DPCH_InfoACK_HSDPA_FDD ( tsc_UL_DPDCH_SF_64k_PS,
                                                                        pl0_96,
                                                                        p_UL_ScramblingCode ),//FFS - check values
                        ul_EDCH_Information := omit,
                        dl_HSPDSCH_Information := cs_DL_HSPDSCH_Information_FDD ( cs_HS_SCCH_Info_FDD,
                                                                                 cs_Measurement_Feedback_Info ),//FFS - check values
                        dl_CommonInformation := cs_DL_CommonInformationRB_SetUp_FDD ( tsc_DL_DPCH1_SFP_SRB_3_4k, flexible),//FFs - check values
                        dl_InformationPerRL_List := cds_DL_InfoPerRL_HSDPA_r8_FDD ( p_PrimScramblingCode ,
                                                                                    tsc_Sfc256_C0,
                                                                                    tsc_DL_DPCH1_2ndScrC ),//FFS - check values
                        dl_SecondaryCellInfoFDD := omit,
                        controlChannelDRXInfo_TDD128 := omit,
                        sps_Information_TDD128 := omit,
                        mbms_PL_ServiceRestrictInfo := omit
                      },
                      radioBearerSetup_r8_add_ext := omit,
                      v7d0NonCriticalExtensions := omit                      /* @sic R5s100135 sic@ */
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  };

  template (value) HARQ_Info_r7 cs_HARQ_Info_FDD :=
  {
    numberOfProcesses := f_GetNrOfHarqProcesses_FDD(),
    memoryPartitioning := {
      implicit := NULL
    }
  };

  template (value) DL_AddReconfTransChInfoList_r7 cs_DL_AddReconfTransChInfoList_2DCH_HS_PS_HSDPA_FDD :=
  {
    cds_DL_AddReconfTransChInfoSameUL_HSDPA ( tsc_DL_DCH5, tsc_UL_DCH5 ),
    cs_DL_AddReconfTransChInfoDCH_PS_TFCS_01_HSDPA ( tsc_DL_DCH1 ),
    cs_DL_AddReconfTransChHSDSCHInfo_HSDPA ( cs_HSDSCH_Info ( cs_HARQ_Info_FDD,
                                                              cs_AddOrReconfMAC_dFlow ( cs_MAC_hs_AddReconfQueue336 ) ) )
  };

  template (value) DL_InformationPerRL_List_r8 cs_DL_InformationPerRL_r8_FDD ( PrimaryScramblingCode   p_ScrmbCode,
                                                                               SF512_AndCodeNumber     p_Sf,
                                                                               SecondaryScramblingCode p_SecondaryScramblingCode ) :=
  {
    {
      modeSpecificInfo := {
        fdd := {
          primaryCPICH_Info := {
            primaryScramblingCode := p_ScrmbCode
          },
          servingHSDSCH_RL_indicator := false,
          servingEDCH_RL_indicator := false
        }
      },
      dl_dpchInfo := {
        dl_DPCH_InfoPerRL := {
          fdd := {
            pCPICH_UsageForChannelEst := mayBeUsed,
            dpch_FrameOffset := (( (tsc_DefaultDPCH_OffsetValue*512 ) mod 38400) / 256 ),
            // DPCH-FrameOffset = DefaultDPCH-OffsetValueFDD MOD 38400
            // Actual value DPCH-FrameOffset = IE value * 256
            // Actual value DefaultDPCH-OffsetValueFDD = IE value * 512
            secondaryCPICH_Info := omit,
            dl_ChannelisationCodeList := {
              {
                secondaryScramblingCode := p_SecondaryScramblingCode,
                sf_AndCodeNumber := p_Sf,
                scramblingCodeChange := omit  // Default2
              }
            },
            tpc_CombinationIndex := tsc_TPC_CombinationIndex,
            powerOffsetTPC_pdpdch := omit,//FFS - check value
            closedLoopTimingAdjMode := omit
          }
        }
      },
      e_AGCH_Information := omit,
      modeSpecificInfo2 := {
        fdd := {
          e_HICH_Info := omit,
          e_RGCH_Info := omit
        }
      },
      cell_id := omit
    }
  };

  template (value) U_CPHY_CONFIG_REQ cas_TrChCfgInfo_FDD ( UTRAN_CellId_Type                  p_CellId,
                                                               integer                            p_PhyChId,
                                                               template (value) TrChConfigType    p_Type,
                                                               template (value) CphyTrchConfigReq p_TrChConfig ) :=
  {
    trchConfig_FDD := {
      cellId := p_CellId,
      routingInfo := {
        physicalChannelIdentity := p_PhyChId
      },
      ratType := fdd,
      trchConfigType := p_Type,
      configMessage := p_TrChConfig
    }
  };

  //* @desc ASN.1 Type Constraint for transport format set for transport channel used in CreateCell_DCH_64kPS_RAB_SRB for FDD.
  //* additional Notes:
  //* TTI = 20 ms;
  //* 5 transport formats: TB size always=336 bits; TransportBlocks = 0,1,2,3 and 4 ;
  //* coding = turbo;
  //* CRCsize = 16;
  //* RateMatching = 150
  template (value) CommonOrDedicatedTFS cs_DCH_336_TFS_FDD :=
  {
    tti := {
      tti20 := {
        {
          tb_Size := 336,
          numberOfTbSizeList := {
            { zero := NULL },
            { one := NULL },
            { small := 2 },
            { small := 3 },
            { small := 4 }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        turbo := NULL
      },
      rateMatchingAttribute := 150,
      crc_Size := crc16
    }
  };

  template (value) CphyTrchConfigReq.ulconnectedTrCHList cs_DCH_336_148_UL_Info_FDD :=
  {
    {
      trchid := tsc_UL_DCH1,
      ul_TransportChannelType := dch,
      transportChannelInfo := cs_DCH_336_TFS_FDD
    },
    {
      trchid := tsc_UL_DCH5,
      ul_TransportChannelType := dch,
      transportChannelInfo := cs_DCH_148_TFS_UL_FDD
    }
  };

  template (value) CphyTrchConfigReq.dlconnectedTrCHList cs_DCH_336_148_DL_Info_FDD := {
    {
      trchid := tsc_DL_DCH1,
      dl_TransportChannelType := dch,
      transportChannelInfo := cs_DCH_336_TFS_FDD
    },
    {
      trchid := tsc_DL_DCH5,
      dl_TransportChannelType := dch,
      transportChannelInfo := cs_DCH_148_TFS_DL_FDD
    }
  };

  template (value) CphyTrchConfigReq cs_CphyTrchConfigReq_Common_FDD ( template (value) SS_ActivationTime           p_ActivationTime,
                                                                       template (omit) CphyUlConnectedTrCHList_Type p_UlconnectedTrCHList,
                                                                       template (omit) TFCS                         p_UlTfcs,
                                                                       template (omit) CphyDlConnectedTrCHList_Type p_DlconnectedTrCHList,
                                                                       template (omit) TFCS                         p_DlTfcs,
                                                                       template (omit) HS_DSCHMACdFlows             p_HsDSCHMacdFlows,
                                                                       template (omit) E_DCHMACdFlows               p_E_DCHMacdFlows,
                                                                       template (omit) EHS_DSCH_Flows               p_Ehs_DSCH_Flows,
                                                                       template (omit) EHS_DSCH_CommonFlows         p_Ehs_DSCH_CommonFlows) :=
  {
    activationTime       := p_ActivationTime,
    ulconnectedTrCHList  := p_UlconnectedTrCHList,
    ulTFCS               := p_UlTfcs,
    dlconnectedTrCHList  := p_DlconnectedTrCHList,
    dlTFCS               := p_DlTfcs,
    hsDSCHMacdFlows      := p_HsDSCHMacdFlows,
    e_DCHMacdFlows       := p_E_DCHMacdFlows,
    ehs_DSCH_Flows       := p_Ehs_DSCH_Flows,
    ehs_DSCH_CommonFlows := p_Ehs_DSCH_CommonFlows,
    e_DCHMacd_CommonFlows := omit
  };

  template (value) U_CPHY_CONFIG_REQ cas_HS_PDSCH_SetupInfo_FDD ( UTRAN_CellId_Type p_CellId,
                                                                      integer                                 p_PhyChId,
                                                                      template (value) HS_PDSCHInfo_r5OrLater p_HS_PDSCHInfo,
                                                                      template (value) SS_ActivationTime p_SS_ActTime ) :=
  {
    rlSetup_FDD := {
      cellId := p_CellId,
      routingInfo := {
        physicalChannelIdentity := p_PhyChId
      },
      ratType := fdd,
      setupMessage := {
        physicalChannelInfo := {
          hS_PDSCHInfo := p_HS_PDSCHInfo
        },
        activationTime := p_SS_ActTime,
        trchConfigToFollow := omit    // DEFAULT TRUE
      }
    }
  };

  template (value) CphyTrchConfigReq.dlconnectedTrCHList cs_DCH_148_DL_FDD := {
    {
      trchid := tsc_DL_DCH5,
      dl_TransportChannelType := dch,
      transportChannelInfo := cs_DCH_148_TFS_DL_FDD
    }
  };

  template (value) U_CPHY_CONFIG_REQ cas_UL_DPCH_ModifyInfo_FDD ( UTRAN_CellId_Type                  p_CellId,
                                                                      integer                            p_PhyChId,
                                                                      template (omit)  UL_DPCH_Info_r7    p_UL_DPCH_Info,
                                                                      template (omit)  HS_DPCCHInfo       p_HS_DPCCHInfo,
                                                                      template (value) SS_ActivationTime p_ActTime ) :=
  {
    rlModify_FDD := {
      cellId := p_CellId,
      routingInfo := {
        physicalChannelIdentity := p_PhyChId
      },
      ratType := fdd,
      modifyMessage := {
        activationTime := p_ActTime,
        physicalChannelInfo := {
          dPCHInfo_r5 := {
            r8 := {
              ul_DPCHInfo := p_UL_DPCH_Info,
              dl_DPCHInfo := omit,
              hs_DPCCHInd := p_HS_DPCCHInfo,
              ss_UL_DPCCH_DRX_Info := omit,
              ss_DRX_Info := omit
            }
          }
        },
        trchConfigToFollow := true
      }
    }
  };

  //* @desc ASN.1 ASP Constraint to modify down link physical channel DPCH.
  template (value) U_CPHY_CONFIG_REQ cas_DL_DPCH_ModifyInfo_FDD ( UTRAN_CellId_Type                  p_CellId,
                                                                      integer                            p_PhyChId,
                                                                      template (omit) DL_DPCHInfo_r8     p_Dl_DPCHInfo,
                                                                      template (omit) HS_DPCCHInfo       p_Hs_DPCCHInfo,
                                                                      template (value) SS_ActivationTime p_ActivationTime ) :=
  {
    rlModify_FDD := {
      cellId := p_CellId,
      routingInfo := {
        physicalChannelIdentity := p_PhyChId
      },
      ratType := fdd,
      modifyMessage := {
        activationTime := p_ActivationTime,
        physicalChannelInfo := {
          dPCHInfo_r5 := {
            r8 := {
              ul_DPCHInfo := omit,
              dl_DPCHInfo := p_Dl_DPCHInfo,
              hs_DPCCHInd := p_Hs_DPCCHInfo,
              ss_UL_DPCCH_DRX_Info := omit,
              ss_DRX_Info := omit
              }
          }
        },
        trchConfigToFollow := true
      }
    }
  };

  template (value) DL_InformationPerRL_List_r7 cds_DL_InfoPerRL_HSDPA_r7_FDD ( PrimaryScramblingCode   p_ScrmbCode,
                                                                               SF512_AndCodeNumber     p_Sf,
                                                                               SecondaryScramblingCode p_SecondaryScramblingCode )
    modifies cs_DL_InformationPerRL_r7_FDD :=
  {
    [0] := {
      modeSpecificInfo := {
        fdd := {
          servingHSDSCH_RL_indicator := true
        }
      }
    }
  };

  template (value) HS_SCCH_Info_r7 cs_HS_SCCH_Info_FDD :=
  {
    modeSpecificInfo := {
      fdd := {
        hS_SCCHChannelisationCodeInfo := {
          tsc_HS_SCCH_ChC7
        },
        dl_ScramblingCode := omit
      }
    }
  };

  template (value) UL_DPCH_Info_r7 cds_UL_DPCH_InfoACK_HSDPA_FDD ( SpreadingFactor   p_SprdFct,
                                                                   PuncturingLimit   p_PuncLimit,
                                                                   UL_ScramblingCode p_UL_ScramblingCode )
    modifies cs_UL_DPCH_Info_FDD :=
  {
    ul_DPCH_PowerControlInfo := {
      fdd := {
        deltaACK := 3,
        deltaNACK := 3,
        ack_NACK_repetition_factor := 1
      }
    }
  };

  template (value) DL_HSPDSCH_Information_r8 cs_DL_HSPDSCH_Information_FDD ( template (value) HS_SCCH_Info_r7              p_HS_SCCH_Info,
                                                                             template (value) Measurement_Feedback_Info_r7 p_Measurement_Feedback_Info ) :=
  {
    hs_scch_Info := p_HS_SCCH_Info,
    measurement_feedback_Info := p_Measurement_Feedback_Info,
    modeSpecificInfo := {
      fdd := {
        dl_64QAM_Configured := omit,
        hs_DSCH_TBSizeTable := omit//FFS - check value
      }
    }
  };

  template (value) DL_InformationPerRL_List_r7 cs_DL_InformationPerRL_r7_FDD ( PrimaryScramblingCode   p_ScrmbCode,
                                                                               SF512_AndCodeNumber     p_Sf,
                                                                               SecondaryScramblingCode p_SecondaryScramblingCode ) :=
  { /* According to condition A3 in TS 34.108 clause 9.1.1: Downlink information for each radio link list */
    {
      modeSpecificInfo := {
        fdd := {
          primaryCPICH_Info := {
            primaryScramblingCode := p_ScrmbCode
          },
          servingHSDSCH_RL_indicator := false,
          servingEDCH_RL_indicator := false
        }
      },
      dl_dpchInfo := {
        dl_DPCH_InfoPerRL := {
          fdd := {
            pCPICH_UsageForChannelEst := mayBeUsed,
            dpch_FrameOffset := (( (tsc_DefaultDPCH_OffsetValue*512 ) mod 38400) / 256 ),
            // DPCH-FrameOffset = DefaultDPCH-OffsetValueFDD MOD 38400
            // Actual value DPCH-FrameOffset = IE value * 256
            // Actual value DefaultDPCH-OffsetValueFDD = IE value * 512
            secondaryCPICH_Info := omit,
            dl_ChannelisationCodeList := {
              {
                secondaryScramblingCode := p_SecondaryScramblingCode,
                sf_AndCodeNumber := p_Sf,
                scramblingCodeChange := omit  // Default2
              }
            },
            tpc_CombinationIndex := tsc_TPC_CombinationIndex,
            powerOffsetTPC_pdpdch := omit,//FFS - check value
            closedLoopTimingAdjMode := omit
          }
        }
      },
      e_AGCH_Information := omit,
      modeSpecificInfo2 := {
        fdd := {
          e_HICH_Info := omit,
          e_RGCH_Info := omit
        }
      },
      cell_id := omit
    }
  };

  template (value) DL_AddReconfTransChInfoList_r7 cs_DL_AddReconfTransChInfoListDCH_PS_64k :=
  { /* According to the corresponding IE in the RADIO BEARER SETUP message using condition A3 in TS 34.108 clause 9.1.1: Added or Reconfigured DL TrCH information */
    cs_DL_AddReconfTransChInfo_r7 ( tsc_DL_DCH1 , tsc_UL_DCH1 ),
    cs_DL_AddReconfTransChInfo_r7 ( tsc_DL_DCH5, tsc_UL_DCH5 )
  };

  template (value) DL_CommonTransChInfo_r4 cs_DL_CommonTransChInfoDCH_FDD ( template (value) TFCS p_Tfcs ) :=
  { /* Values according to condition A3 in TS 34.108 clause 9.1.1: DL Transport channel information common for all transport channel */
    sccpch_TFCS := omit,
    modeSpecificInfo := {
      fdd := {
        dl_Parameters := {
          dl_DCH_TFCS := {
            tfcs := p_Tfcs
          }
        }
      }
    }
  };

  template (value) UL_CommonTransChInfo_r4 cs_UL_CommTrChInfoDCH_PS_64k_FDD :=
  { /* Values according to TS 34.108 clause 9.1.1: UL Transport channel information common for all transport channels using condition A3 */
    tfc_Subset := omit,
    prach_TFCS := omit,
    modeSpecificInfo := {
      fdd := {
        ul_TFCS := cs_TFCS_Cmpl0_1_2_3_4_5_6_7_8_9_Tx ( cs_PowerOffsetInfo64k_FDD )
      }
    },
    tfc_SubsetList := omit
  };

  template (value) DL_CommonInformation_r8 cs_DL_CommonInformationRB_SetUp_FDD ( SF512_AndPilot          p_Sf,
                                                                                 PositionFixedOrFlexible p_PositionFixedOrFlexible) :=
  /* According to condition A3 in TS 34.108 clause 9.1.1: Downlink information common for all radio links */
  {
    dl_dpchInfoCommon := {
      dl_DPCH_InfoCommon := {
        cfnHandling := {
          maintain := {
            timingmaintainedsynchind := omit
          }
        },
        modeSpecificInfo := {
          fdd := {
            dl_DPCH_PowerControlInfo := {
              modeSpecificInfo := {
                fdd := {
                  dpc_Mode := singleTPC
                }
              }
            },
            powerOffsetPilot_pdpdch := tsc_DPCH_PowerOffsetPILOT,
            dl_rate_matching_restriction := omit,
            spreadingFactorAndPilot := p_Sf,
            positionFixedOrFlexible := p_PositionFixedOrFlexible,
            tfci_Existence := true
          }
        },
        mac_d_HFN_initial_value := omit
      }
    },
    modeSpecificInfo := {
      fdd := {
        defaultDPCH_OffsetValue := omit,
        dpch_CompressedModeInfo := omit,
        tx_DiversityMode := noDiversity
      }
    },
    mac_hsResetIndicator := omit,
    postVerificationPeriod := omit
  };

  template (value) UL_DPCH_Info_r7 cs_UL_DPCH_Info_FDD ( SpreadingFactor   p_SprdFct,
                                                         PuncturingLimit   p_PuncLimit,
                                                         UL_ScramblingCode p_UL_ScramblingCode ) :=
  { /* According to condition A3 in TS 34.108 clause 9.1.1: Uplink DPCH info */
    ul_DPCH_PowerControlInfo := {
      fdd := {
        dpcch_PowerOffset := tsc_DPCCH_PowerOffset,
        pc_Preamble := 1,
        sRB_delay := 7,
        powerControlAlgorithm := {
          algorithm1 := tsc_TpcStepSize_FDD
        },
        deltaACK := omit,
        deltaNACK := omit,
        ack_NACK_repetition_factor := omit,
        harq_Preamble_Mode := 0//According to Rel-8 condition/table
      }
    },
    modeSpecificInfo := {
      fdd := {
        scramblingCodeType := longSC,
        scramblingCode := p_UL_ScramblingCode,
        dpdchPresence := {
          present_ := {
            numberOfDPDCH := omit,
            spreadingFactor := p_SprdFct,
            tfci_Existence := true,
            numberOfFBI_Bits := omit,
            numberOfTPC_Bits := omit,
            puncturingLimit := p_PuncLimit
          }
        }
      }
    }
  };

  template (value) DL_DPCHInfo_r8 cs_DL_DPCH_FDD ( template (value) DL_CommonInformation_r8 p_DL_CommonInformation,
                                                   SF512_AndCodeNumber                      p_Sf,
                                                   DL_TxPower                               p_Dl_TxPower ) :=
  {
    dl_CommonInformation := p_DL_CommonInformation,
    dl_Dpch_InfoPerRL := {
      dl_DPCH_InfoPerRL := {
        fdd := {
          pCPICH_UsageForChannelEst := mayBeUsed,
          dpch_FrameOffset := ( ( (tsc_DefaultDPCH_OffsetValue*512 ) mod 38400)/256 ),
          // DPCH-FrameOffset = DefaultDPCH-OffsetValueFDD MOD 38400
          // Actual value DPCH-FrameOffset = IE value * 256
          // Actual value DefaultDPCH-OffsetValueFDD = IE value * 512
          secondaryCPICH_Info := omit,
          dl_ChannelisationCodeList := {
            {
              secondaryScramblingCode := tsc_DL_DPCH1_2ndScrC,
              sf_AndCodeNumber := p_Sf,
              scramblingCodeChange := omit
            }
          },
          tpc_CombinationIndex := 0,
          powerOffsetTPC_pdpdch := omit,
          closedLoopTimingAdjMode := omit
        }
      }
    },
    rl_Information := {
      powerOffsetOfTFCI_PO1 := tsc_DPCH_PowerOffsetTFCI,
      powerOffsetOfTPC_PO2 := tsc_DPCH_PowerOffsetTPC,
      powerOffsetOfPILOT_PO3 := tsc_DPCH_PowerOffsetPILOT,
      dl_TxPower := p_Dl_TxPower,
      dl_TxPowerMax := 15,
      dl_TxPowerMin := -35,
      cfnTgtSfnFrameOffset := omit//as per cs_RL_InfoDef
    }
  };

  template (value) TrCH_LogCHMappingList1 cs_TrLogMappingDL_4DCCH_1DTCH_PS :=
  {
    ulconnectedTrCHList := omit,
    dlconnectedTrCHList := {
      {
        trchid := tsc_DL_DCH1,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              dl_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                dl_TransportChannelType := dch,
                logicalChannelIdentity := tsc_DL_DTCH1,
                logicalChannelType := dTCH,
                rlc_SizeList := {
                  configured := NULL
                },
                mac_LogicalChannelPriority := 8
              }
            },
            rB_Identity := tsc_RB20,
            cn_DomainIdentity := omit
          }
        }
      },
      {
        trchid := tsc_DL_DCH5,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              dl_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                dl_TransportChannelType := dch,
                logicalChannelIdentity := tsc_DL_DCCH1,
                logicalChannelType := dCCH,
                rlc_SizeList := {
                  configured := NULL
                },
                mac_LogicalChannelPriority := 1
              }
            },
            rB_Identity := tsc_RB1,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              dl_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                dl_TransportChannelType := dch,
                logicalChannelIdentity := tsc_DL_DCCH2,
                logicalChannelType := dCCH,
                rlc_SizeList := {
                  configured := NULL
                },
                mac_LogicalChannelPriority := 2
              }
            },
            rB_Identity := tsc_RB2,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              dl_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                dl_TransportChannelType := dch,
                logicalChannelIdentity := tsc_DL_DCCH3,
                logicalChannelType := dCCH,
                rlc_SizeList := {
                  configured := NULL
                },
                mac_LogicalChannelPriority := 3
              }
            },
            rB_Identity := tsc_RB3,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              dl_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                dl_TransportChannelType := dch,
                logicalChannelIdentity := tsc_DL_DCCH4,
                logicalChannelType := dCCH,
                rlc_SizeList := {
                  configured := NULL
                },
                mac_LogicalChannelPriority := 4
              }
            },
            rB_Identity := tsc_RB4,
            cn_DomainIdentity := omit
          }
        }
      }
    },
    dlconnectedMACdFlows := omit,
    dlconnectedMAC_ehsFlows := omit,
    dlconnectedMAC_ehsCommonFlows := omit,
    dlconnectedMAC_ehsCommonFlowsDC := omit
  };

  template (value) TrCHInfo.dlconnectedTrCHList cs_TrChInfoDL_336_148_FDD := {
    {
      trchid := tsc_DL_DCH1,
      transportChannelInfo := cs_DCH_336_TFS_FDD
    },
    {
      trchid := tsc_DL_DCH5,
      transportChannelInfo := cs_DCH_148_TFS_DL_FDD
    }
  };

  template (value) TrCHInfo.ulconnectedTrCHList cs_TrChInfoUL_336_148_FDD := {
    {
      trchid := tsc_UL_DCH1,
      transportChannelInfo := cs_DCH_336_TFS_FDD
    },
    {
      trchid := tsc_UL_DCH5,
      transportChannelInfo := cs_DCH_148_TFS_UL_FDD
    }
  };

  template (value) DL_InformationPerRL_List_r8 cds_DL_InfoPerRL_HSDPA_r8_FDD ( PrimaryScramblingCode   p_ScrmbCode,
                                                                               SF512_AndCodeNumber     p_Sf,
                                                                               SecondaryScramblingCode p_SecondaryScramblingCode )
    modifies cs_DL_InformationPerRL_r8_FDD :=
  {
    [0] := {
      modeSpecificInfo := {
        fdd := {
          servingHSDSCH_RL_indicator := true
        }
      }
    }
  };

  //* @desc ASN.1 PDU Constraint. Defined in TS 34.108 clause 9.
  template (value) DL_DCCH_Message cs_108_RB_SetUp64k_PS_FDD ( IntegrityCheckInfo        p_Integrityinfo,
                                                               RRC_TransactionIdentifier p_RRC_Ti,
                                                               ActivationTime            p_Activetime,
                                                               PrimaryScramblingCode     p_PrimScramblingCode,
                                                               UL_ScramblingCode         p_UL_ScramblingCode) :=
  {//FFS - Check this template so that it matches the values in f_SS_HO_Config_64kPS_FDD
    integrityCheckInfo := p_Integrityinfo,
    message_ := {
      radioBearerSetup := {
        later_than_r3 := {
          rrc_TransactionIdentifier := p_RRC_Ti,
          criticalExtensions := {
            criticalExtensions := {
              criticalExtensions := {
                criticalExtensions := {
                  criticalExtensions := {
                    r8 := {
                      radioBearerSetup_r8 := {
                        integrityProtectionModeInfo := omit,
                        cipheringModeInfo := omit,
                        sr_vcc_Info := omit,//FFS - Check value
                        activationTime := p_Activetime,
                        new_U_RNTI := omit,
                        new_C_RNTI := omit,
                        new_DSCH_RNTI := omit,
                        new_H_RNTI := omit,
                        newPrimary_E_RNTI := omit, //FFS - Check value
                        newSecondary_E_RNTI := omit, //FFS - Check value
                        rrc_StateIndicator := cell_DCH,
                        utran_DRX_CycleLengthCoeff := omit,
                        ura_Identity := omit,//FFS - Check value
                        supportForChangeOfUE_Capability := omit,//FFS - chack value
                        cn_InformationInfo := omit,
                        srb_InformationSetupList := omit,
                        rab_InformationSetupList := {
                          cs_RAB_InfoSetupDCH_PS_64k ( cs_RLC_InfoAM_Def )
                        },
                        rab_InformationReconfigList := omit,//FFS - Check value
                        rb_InformationReconfigList := omit,//FFS - Check value
                        rb_InformationAffectedList := omit,
                        dl_CounterSynchronisationInfo := omit,//FFS - check value
                        pdcp_ROHC_TargetMode := omit, //FFS - Check value
                        ul_CommonTransChInfo := cs_UL_CommTrChInfoDCH_PS_64k_FDD,
                        ul_deletedTransChInfoList := omit,
                        ul_AddReconfTransChInfoList := cs_UL_AddReconfTransChInfoListDCH_PS_64k,
                        dl_CommonTransChInfo := cs_DL_CommonTransChInfoDCH_FDD ( cs_TFCS_Cmpl0_1_2_3_4_5_6_7_8_9_Rx ),
                        dl_DeletedTransChInfoList := omit,
                        dl_AddReconfTransChInfoList := cs_DL_AddReconfTransChInfoListDCH_PS_64k,
                        frequencyInfo := omit,
                        multi_frequencyInfo := omit,//FFS - Check value
                        dtx_drx_TimingInfo := omit, //FFS - Check value
                        dtx_drx_Info := omit, //FFS - Check value
                        hs_scch_LessInfo := omit, //FFS - Check value
                        mimoParameters := omit, //FFS - Check value
                        maxAllowedUL_TX_Power := tsc_MaxAllowPwr,
                        ul_DPCH_Info := cs_UL_DPCH_Info_FDD ( tsc_UL_DPDCH_SF_64k_PS, pl0_96, p_UL_ScramblingCode ),
                        ul_EDCH_Information := omit, //FFS - Check value
                        dl_HSPDSCH_Information := omit, //FFS - Check value
                        dl_CommonInformation := cs_DL_CommonInformationRB_SetUp_FDD ( tsc_DL_DPCH1_SFP_64k_PS, flexible),
                        dl_InformationPerRL_List := cs_DL_InformationPerRL_r8_FDD ( p_PrimScramblingCode ,
                                                                                    tsc_DL_DPCH1_ChC_64k_PS,
                                                                                    tsc_DL_DPCH1_2ndScrC ),
                        dl_SecondaryCellInfoFDD := omit,//FFS - Check value
                        controlChannelDRXInfo_TDD128 := omit, //FFS - Check value
                        sps_Information_TDD128 := omit, //FFS - Check value
                        mbms_PL_ServiceRestrictInfo := omit//FFS - Check value
                      },
                      radioBearerSetup_r8_add_ext := omit,//FFS - Check Value
                      v7d0NonCriticalExtensions := omit                      /* @sic R5s100135 sic@ */
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  };

  template (value) DL_DCCH_Message cs_108_RB_SetUpSpeech_FDD ( IntegrityCheckInfo p_Integrityinfo,
                                                               RRC_TransactionIdentifier p_RRC_Ti,
                                                               ActivationTime p_Activetime,
                                                               bitstring p_RAB_Id,
                                                               PrimaryScramblingCode p_PrimScramblingCode,
                                                               UL_ScramblingCode p_UL_ScramblingCode ) :=
  {
    integrityCheckInfo := p_Integrityinfo,
    message_ := {
      radioBearerSetup := {
        later_than_r3 := {
          rrc_TransactionIdentifier := p_RRC_Ti,
          criticalExtensions := {
            criticalExtensions := {
              criticalExtensions := {
                criticalExtensions := {
                  criticalExtensions := {
                    r8 := {
                      radioBearerSetup_r8 := {//RadioBearerSetup-r8-IEs
                        integrityProtectionModeInfo := omit,
                        cipheringModeInfo           := omit,
                        sr_vcc_Info                 := omit,
                        activationTime              := p_Activetime,
                        new_U_RNTI                  := omit,
                        new_C_RNTI                  := omit,
                        new_DSCH_RNTI               := omit,
                        new_H_RNTI                  := omit,
                        newPrimary_E_RNTI           := omit,
                        newSecondary_E_RNTI         := omit,
                        rrc_StateIndicator          := cell_DCH,
                        utran_DRX_CycleLengthCoeff  := omit,
                        ura_Identity                := omit,
                        supportForChangeOfUE_Capability := omit,
                        cn_InformationInfo              := omit,
                        srb_InformationSetupList        := omit,
                        rab_InformationSetupList := {
                          cs_RAB_InfoSetupTM_12_2k ( useT314, p_RAB_Id)
                        },
                        rab_InformationReconfigList   := omit,
                        rb_InformationReconfigList    := omit,
                        rb_InformationAffectedList    := omit,
                        dl_CounterSynchronisationInfo := omit,
                        pdcp_ROHC_TargetMode          := omit,
                        ul_CommonTransChInfo          := cs_UL_CommTrChInfoTM_12_2k_FDD,
                        ul_deletedTransChInfoList     := omit,
                        ul_AddReconfTransChInfoList   := cs_UL_AddReconfTransChInfoListTM_12_2k,
                        dl_CommonTransChInfo          := cs_DL_CommonTransChInfoSameAsUL_r4_FDD,
                        dl_DeletedTransChInfoList     := omit,
                        dl_AddReconfTransChInfoList   := cs_DL_AddReconfTransChInfoListTM_12_2k,
                        frequencyInfo                 := omit,
                        multi_frequencyInfo           := omit,
                        dtx_drx_TimingInfo            := omit,
                        dtx_drx_Info                  := omit,
                        hs_scch_LessInfo              := omit,
                        mimoParameters                := omit,
                        maxAllowedUL_TX_Power         := tsc_MaxAllowPwr,
                        ul_DPCH_Info                  := cs_UL_DPCH_Info_FDD ( tsc_UL_DPDCH_SF_Speech,
                                                                               pl0_84,
                                                                               p_UL_ScramblingCode ),
                        ul_EDCH_Information         := omit,
                        dl_HSPDSCH_Information      := omit,
                        dl_CommonInformation        := cs_DL_CommonInformationRB_SetUpSpeech ( tsc_DL_DPCH1_SFP_Speech ),
                        dl_InformationPerRL_List    := cs_DL_InformationPerRL_r8_FDD ( p_PrimScramblingCode,
                                                                                       tsc_DL_DPCH1_ChC_Speech,
                                                                                       tsc_DL_DPCH1_2ndScrC ),
                        dl_SecondaryCellInfoFDD      := omit,
                        controlChannelDRXInfo_TDD128 := omit,
                        sps_Information_TDD128       := omit,
                        mbms_PL_ServiceRestrictInfo  := omit
                      },
                      radioBearerSetup_r8_add_ext := omit,
                      v7d0NonCriticalExtensions := omit                      /* @sic R5s100135 sic@ */
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  };

//----------------------------------------------------------------------
// Stop: All FDD templates used by RAB establishment procedures
//----------------------------------------------------------------------

//----------------------------------------------------------------------
// Start: Templates to be moved to UTRAN_Templates
//----------------------------------------------------------------------

  template (value) DL_DCCH_Message cs_PhysicalChannelReconfiguration_FDD ( IntegrityCheckInfo                                  p_Integrityinfo,
                                                                           RRC_TransactionIdentifier                           p_RRC_TI,
                                                                           ActivationTime                                      p_ActivationTime,
                                                                           template (omit) DL_CommonInformation_r8            p_DL_CommonInformation,
                                                                           RRC_StateIndicator                                  p_RRC_StateIndicator := cell_DCH,
                                                                           template (omit) UTRAN_DRX_CycleLengthCoefficient_r7 p_UTRAN_DRX_CycleLengthCoefficient_r7 := omit,
                                                                           template (omit) MaxAllowedUL_TX_Power               p_MaxAllowedUL_TX_Power := omit) :=
  /* Default values from 36.508 Table 4.7B.1-5: PHYSICAL CHANNEL RECONFIGURATION */
  {
    integrityCheckInfo := p_Integrityinfo,
    message_ := {
      physicalChannelReconfiguration  := {
        later_than_r3 := {
          rrc_TransactionIdentifier := p_RRC_TI,
          criticalExtensions := {
            criticalExtensions  := {
              criticalExtensions := {
                criticalExtensions := {
                  criticalExtensions := {
                    r8:=   {
                      physicalChannelReconfiguration_r8 := {
                        //-- User equipment IEs
                        integrityProtectionModeInfo     := omit,
                        cipheringModeInfo               := omit,
                        activationTime                  := p_ActivationTime,
                        delayRestrictionFlag            := omit,
                        new_U_RNTI                      := omit,
                        new_C_RNTI                      := omit,
                        new_DSCH_RNTI                   := omit,
                        new_H_RNTI                      := omit,
                        newPrimary_E_RNTI               := omit,
                        newSecondary_E_RNTI             := omit,
                        rrc_StateIndicator              := p_RRC_StateIndicator,
                        ueMobilityStateIndicator        := omit,
                        utran_DRX_CycleLengthCoeff      := p_UTRAN_DRX_CycleLengthCoefficient_r7,
                        cn_InformationInfo              := omit,
                        ura_Identity                    := omit,
                        supportForChangeOfUE_Capability := omit,
                        responseToChangeOfUE_Capability := omit,
                        dl_CounterSynchronisationInfo   := omit,
                        harqInfo                        := omit,
                        frequencyInfo         := omit,
                        multi_frequencyInfo   := omit,
                        dtx_drx_TimingInfo    := omit,
                        dtx_drx_Info          := omit,
                        hs_scch_LessInfo      := omit,
                        mimoParameters        := omit,
                        maxAllowedUL_TX_Power := p_MaxAllowedUL_TX_Power,
                        ul_DPCH_Info          := omit,//FFS - cds_PhyChReconf64kPSEventTriggerCompModeDL_U is used in TTCN2. Split depending on RAB type?
                        ul_EDCH_Information   := omit,
                        dl_HSPDSCH_Information    := omit,
                        dl_CommonInformation      := p_DL_CommonInformation,
                        dl_InformationPerRL_List     := omit,
                        dl_SecondaryCellInfoFDD      := omit,
                        controlChannelDRXInfo_TDD128 := omit,
                        sps_Information_TDD128       := omit,
                        mbms_PL_ServiceRestrictInfo  := omit
                      },
                      physicalChannelReconfiguration_r8_add_ext := omit,
                      v7d0NonCriticalExtensions := omit                      /* @sic R5s100135 sic@ */
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  };

  template (value) U_CPHY_CONFIG_REQ cas_CompressedModeDPCH_Info_FDD ( UTRAN_CellId_Type                   p_CellId,
                                                                           integer                             p_PhyChId,
                                                                           template (value) DPCHInfo_r5OrLater p_DPCHInfo_r5OrLater,
                                                                           template (value) SS_ActivationTime  p_ActivationTime ) := {
    rlModify_FDD := {
      cellId := p_CellId,
      routingInfo := {
        physicalChannelIdentity := p_PhyChId
      },
      ratType := fdd,
      modifyMessage := {
        activationTime := p_ActivationTime,
        physicalChannelInfo := {
          dPCHInfo_r5 := p_DPCHInfo_r5OrLater
        },
        trchConfigToFollow := false
      }
    }
  };

  template (value) DL_CommonInformation_r8 cs_DL_CommonInformation_FDD ( template (value) UL_DL_Mode p_UL_DL_Mode  ) :=
  {
    dl_dpchInfoCommon := omit,
    modeSpecificInfo := {
      fdd := {
        defaultDPCH_OffsetValue := omit,
        dpch_CompressedModeInfo := {
          tgp_SequenceList := {
            {
              tgpsi       := 1,
              tgps_Status := {
                deactivate_ := NULL
              },
              tgps_ConfigurationParams  := {
                tgmp  := fdd_Measurement,
                tgprc := 0,
                tgsn  := 4,
                tgl1  := 7,
                tgl2  := omit,
                tgd   := 270,
                tgpl1 := 3,
                rpp   := mode0,
                itp   := mode0,
                ul_DL_Mode      := p_UL_DL_Mode,//UL and DL, UL only or DL only (depending on the UE capability)
                dl_FrameType    := dl_FrameTypeB,
                deltaSIR1       := 20,
                deltaSIRAfter1  := 10,
                deltaSIR2       := omit,
                deltaSIRAfter2  := omit,
                nidentifyAbort  := omit,
                treconfirmAbort := omit
              }
            }
          }
        },
        tx_DiversityMode := omit
      }
    },
    mac_hsResetIndicator   := omit,
    postVerificationPeriod := omit
  };

  template (value) PowerOffsetInformation cs_PowerOffsetInfo64k_FDD :=
  {
    gainFactorInformation := {
      signalledGainFactors := {
        modeSpecificInfo := {
          fdd := {
            gainFactorBetaC := tsc_GainFactorBetaC_Higher64k
          }
        },
        gainFactorBetaD := tsc_GainFactorBetaD,
        referenceTFC_ID := 0
      }
    },
    powerOffsetPp_m := omit
  };

  //* @desc ASN.1 ASP Constraint Used  to setup AM RLC entity
  template (value) U_CRLC_CONFIG_REQ cas_RB25_AM_Info_FDD ( UTRAN_CellId_Type                 p_CellId,
                                                                integer                           p_RB_Id,
                                                                template (value) RB_LogCH_Mapping p_LogChMapping,
                                                                integer                           p_PayLoad ) :=
  {
    config := {
      cellId := p_CellId,
      routingInfo := {
        rB_Identity := p_RB_Id
      },
      ratType := fdd,
      configMessage := {
        setup := {
          sS_rlc_Info := omit,
          sS_rlc_Info_r8 := {
           r8 := {
            sS_ul_RLC_Mode := {
              dl_AM_RLC_Mode := cs_DL_AM_RLC_SS_HSDPA
            },
            sS_dl_RLC_Mode := {
              dl_PayloadSize := p_PayLoad,
              dl_RLCModeInfo := {
                ul_AM_RLC_Mode := cds_UL_AM_RLC_HSDPA
              },
              dl_UM_RLC_LI_size := omit, //only for UM RLC configuration
              dl_UM_outOfSeqDelivery := omit,
              dl_RLC_PDU_size := omit
            },
            rlc_OneSidedReEst := omit,//default false
            altE_bitInterpretation := omit,//default false
            useSpecialValueOfHEField := omit,//default false
            uM_SN_DeliveryMode := omit // DEFAULT nonConfigured
            }
          },
          rB_LogCH_Mapping := p_LogChMapping
        }
      },
      activationTime := omit
    }
  };

  template (value) U_CMAC_CONFIG_REQ cas_CMAC_MAChs_TFRC_ExplicitConfigReq_FDD ( UTRAN_CellId_Type p_CellId ) :=
  {
    tfrc_FDD := {
      cellId := p_CellId,
      tfrcConfigMode := {
        explicitlyConfigured := {
          modulationScheme := qpsk,
          channelisationCodeOffset := 1,
          noOfChannelisatonCodes := 1,
          tbSizeIndexOnHS_SCCH := 19,
          minimumInterTTIinterval := 3,
          redundancyVersions := { 0, 2, 5, 6, 1, 3, 7, 4  },//According to modulation scheme
          hs_PDSCH_TxPower := tsc_DL_hs_PDSCH_TxPower
        }
      },
      activationTime := {
        activateNow := NULL
      },
      ss_DTX_Info := omit,
      hs_DSCH_TBSizeTable := omit
    }
  };

  template (value) TrCHInfo cs_TrCHInfo_Common_FDD ( template (omit) UlConnectedTrCHList_Type p_UlconnectedTrCHList,
                                                     template (omit) TFCS                     p_UlTfcs,
                                                     template (omit) DlConnectedTrCHList_Type p_DlconnectedTrCHList,
                                                     template (omit) TFCS                     p_DlTfcs,
                                                     template (omit) HS_DSCHMACdFlows         p_HsDSCHMacdFlows,
                                                     template (omit) EHS_DSCH_Flows           p_Ehs_DSCH_Flows,
                                                     template (omit) EHS_DSCH_CommonFlows     p_Ehs_DSCH_CommonFlows ) :=
  {
    ulconnectedTrCHList  := p_UlconnectedTrCHList,
    ulTFCS               := p_UlTfcs,
    dlconnectedTrCHList  := p_DlconnectedTrCHList,
    dlTFCS               := p_DlTfcs,
    hsDSCHMacdFlows      := p_HsDSCHMacdFlows,
    ehs_DSCH_Flows       := p_Ehs_DSCH_Flows,
    ehs_DSCH_CommonFlows := p_Ehs_DSCH_CommonFlows
  };

  template (value) UL_CommonTransChInfo_r4 cs_UL_CommTrChInfoTM_12_2k_FDD :=
  {
    tfc_Subset := omit,
    prach_TFCS := omit,
    modeSpecificInfo := {
      fdd := {
        ul_TFCS := cs_TFCS_Cmpl0_1_11_12_13_23_Tx ( cs_PowerOffsetInfoBelow64k )
      }
    },
    tfc_SubsetList := omit
  };

  // =============================================================================
  // ASN.1 ASP Constraint
  // *** Comments:
  // For FDD mode only, used in aknowledged mode RLC testing
  // *** additional Notes:
  // For DCH1 transport channel the following parameters are fixed by core spec.(34.123 cl. 7.2):
  // TTI = 40 ms;
  // two transport formats: TransportBlocks = 1, TB size = 148 bits; TansportBlock = 0, Size = 148.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 16;
  // RateMatching = 155
  // -----------------------------------------------------------------------------
  template (value) U_CPHY_CONFIG_REQ cas_DCH4_DL_Info_FDD ( UTRAN_CellId_Type               p_CellId,
                                                                integer                         p_PhyChId,
                                                                template (value) TrChConfigType p_Type,
                                                                ActivationTime                  p_ActivationTime ) :=
  {
    trchConfig_FDD := {
      cellId := p_CellId,
      routingInfo := {
        physicalChannelIdentity := p_PhyChId
      },
      ratType := fdd,
      trchConfigType := p_Type,
      configMessage := {
        activationTime := {
          activationCFN := p_ActivationTime
        },
        ulconnectedTrCHList := omit,
        ulTFCS              := omit,
        dlconnectedTrCHList := {
          {
            trchid := tsc_DL_DCH1,
            dl_TransportChannelType := dch,
            transportChannelInfo := cs_DCH_81_TFS_DL_FDD
          },
          {
            trchid := tsc_DL_DCH2,
            dl_TransportChannelType := dch,
            transportChannelInfo := cs_DCH_103_TFS_FDD
          },
          {
            trchid := tsc_DL_DCH3,
            dl_TransportChannelType := dch,
            transportChannelInfo := cs_DCH_60_TFS_FDD
          },
          {
            trchid := tsc_DL_DCH5,
            dl_TransportChannelType := dch,
            transportChannelInfo := cs_DCH_148_TFS_DL_FDD
          }
        },
        dlTFCS := cs_TFCS_Cmpl0_1_11_12_13_23_Tx(cs_PowerOffsetInfoBelow64k),
        hsDSCHMacdFlows      := omit,
        e_DCHMacdFlows       := omit,
        ehs_DSCH_Flows       := omit,
        ehs_DSCH_CommonFlows := omit,
        e_DCHMacd_CommonFlows := omit
      }
    }
  };

  template (value) DL_DPCHInfo_r8 cs_DL_DPCH_122_AMR_FDD ( template (value) DL_CommonInformation_r8 p_DL_CommonInformation,
                                                       SecondaryScramblingCode p_SecondaryScramblingCode ) :=
  {
    dl_CommonInformation := p_DL_CommonInformation,
    dl_Dpch_InfoPerRL := {
      dl_DPCH_InfoPerRL := cs_DL_DPCH_InfoPerRL_SRB_FDD ( tsc_DL_DPCH1_ChC_Speech, p_SecondaryScramblingCode )
    },
    rl_Information := {
      powerOffsetOfTFCI_PO1 := tsc_DPCH_PowerOffsetTFCI,
      powerOffsetOfTPC_PO2 := tsc_DPCH_PowerOffsetTPC,
      powerOffsetOfPILOT_PO3 := tsc_DPCH_PowerOffsetPILOT,
      dl_TxPower := tsc_DL_TxPower_DPCH,
      dl_TxPowerMax        := 15,
      dl_TxPowerMin        := -35,
      cfnTgtSfnFrameOffset := omit
    }
  };

  template (value) TrCHInfo cs_TrChInfoDL_122_AMR_FDD :=
  {
    ulconnectedTrCHList := omit,
    ulTFCS              := omit,
    dlconnectedTrCHList := {
      {
        trchid := tsc_DL_DCH1,
        transportChannelInfo := cs_DCH_81_TFS_DL_FDD
      },
      {
        trchid := tsc_DL_DCH2,
        transportChannelInfo := cs_DCH_103_TFS_FDD
      },
      {
        trchid := tsc_DL_DCH3,
        transportChannelInfo := cs_DCH_60_TFS_FDD
      },
      {
        trchid := tsc_DL_DCH5,
        transportChannelInfo := cs_DCH_148_TFS_DL_FDD
      }
    },
    dlTFCS := cs_TFCS_Cmpl0_1_11_12_13_23_Tx(cs_PowerOffsetInfoBelow64k),
    hsDSCHMacdFlows       := omit,
    ehs_DSCH_Flows        := omit,
    ehs_DSCH_CommonFlows  := omit
  };

  // =============================================================================
  // ASN.1 ASP Constraint
  // *** Comments:
  // For FDD mode only, used in aknowledged mode RLC testing
  // *** additional Notes:
  // For DCH1 transport channel the following parameters are fixed by core spec.(34.123 cl. 7.2):
  // TTI = 40 ms;
  // two transport formats: TransportBlocks = 1, TB size = 148 bits; TansportBlock = 0, Size = 148.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 16;
  // RateMatching = 155
  // -----------------------------------------------------------------------------
  template (value) U_CPHY_CONFIG_REQ cas_DCH4_UL_Info_FDD ( UTRAN_CellId_Type               p_CellId,
                                                                integer                         p_PhyChId,
                                                                template (value) TrChConfigType p_Type,
                                                                ActivationTime                  p_ActivationTime ) :=
  {
    trchConfig_FDD := {
      cellId := p_CellId,
      routingInfo := {
        physicalChannelIdentity := p_PhyChId
      },
      ratType := fdd,
      trchConfigType := p_Type,
      configMessage := {
        activationTime := {
          activationCFN := p_ActivationTime
        },
        ulconnectedTrCHList := {
          {
            trchid := tsc_UL_DCH1,
            ul_TransportChannelType := dch,
            transportChannelInfo := cs_DCH_81_TFS_FDD
          },
          {
            trchid := tsc_UL_DCH2,
            ul_TransportChannelType := dch,
            transportChannelInfo := cs_DCH_103_TFS_FDD
          },
          {
            trchid := tsc_UL_DCH3,
            ul_TransportChannelType := dch,
            transportChannelInfo := cs_DCH_60_TFS_FDD
          },
          {
            trchid := tsc_UL_DCH5,
            ul_TransportChannelType := dch,
            transportChannelInfo := cs_DCH_148_TFS_UL_FDD
          }
        },
        ulTFCS := cs_TFCS_Cmpl0_1_11_12_13_23_Rx,
        dlconnectedTrCHList := omit,
        dlTFCS          := omit,
        hsDSCHMacdFlows := omit,
        e_DCHMacdFlows  := omit,
        ehs_DSCH_Flows  := omit,
        ehs_DSCH_CommonFlows := omit,
        e_DCHMacd_CommonFlows := omit
      }
    }
  };

//----------------------------------------------------------------------
// Stop: Templates to be moved to UTRAN_Templates
//----------------------------------------------------------------------
}
