/******************************************************************************/
// @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-16 23:11:35 +0200 (Thu, 16 Sep 2010) $
// $Rev: 3943 $
/******************************************************************************/

module EUTRA_Measurement_Specific_Templates
{

/////////////////
// Import Part //
/////////////////

  import from EUTRA_RRC_ASN1_Definitions language "ASN.1:1997" all;
  import from EUTRA_RRC_Templates all;
  import from EUTRA_Measurement_Templates all;

////////////////////
// Templates Part //
////////////////////

//****************************************************************
//Specific Templates
//****************************************************************

//------------------------------------------------
//rrcConnectionReconfiguration_r8.radioResourceConfigDedicated

  //cs_RadioResourceConfigDedicated
  template (value) RadioResourceConfigDedicated cs_RadioResourceConfigDedicated(
                                                  template (omit) SRB_ToAddModList p_SRB_ToAddModList := omit,
                                                  template (omit) DRB_ToAddModList p_DRB_ToAddModList := omit,
                                                  template (omit) DRB_ToReleaseList p_DRB_ToReleaseList := omit,
                                                  template (omit) RadioResourceConfigDedicated.mac_MainConfig p_Mac_MainConfig := omit,
                                                  template (omit) SPS_Config p_SPS_Config := omit,
                                                  template (omit) PhysicalConfigDedicated p_PhysicalConfigDedicated := omit ) :=
  {
    srb_ToAddModList        := p_SRB_ToAddModList,
    drb_ToAddModList        := p_DRB_ToAddModList,
    drb_ToReleaseList       := p_DRB_ToReleaseList,
    mac_MainConfig          := p_Mac_MainConfig,
    sps_Config              := p_SPS_Config,
    physicalConfigDedicated := p_PhysicalConfigDedicated
  };

  //cs_RadioResourceConfigDedicated_MacMainCfg_DrxL
  template (value) RadioResourceConfigDedicated cs_RadioResourceConfigDedicated_MacMainCfg_DrxL := {
    srb_ToAddModList        := omit,
    drb_ToAddModList        := omit,
    drb_ToReleaseList       := omit,
    mac_MainConfig          := cs_508_MAC_MainConfig_Explicit_RBC_DrxL,
    sps_Config              := omit,
    physicalConfigDedicated := omit
  };

//****************************************************************
//Templates of message used in measurement test cases
//****************************************************************

//================================================================
//RRCConnectionReconfiguration

  //------------------------------------------------
  //Resume inter frequency measurement
  //8.3.1.9,  Step8a1
  //8.3.1.10, Step9
  //8.3.1.11  Step15a1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_ResumeInterFreqMeas(RRC_TransactionIdentifier p_RRC_TI) :=
    /* @status    APPROVED */
    cs_508_RRCConnectionReconfiguration_ConditionMEAS( p_RRC_TI,
                                                       cs_MeasConfig(omit,
                                                                     omit,
                                                                     omit,
                                                                     omit,
                                                                     omit,
                                                                     omit,
                                                                     cs_QuantityConfig_Def,
                                                                     cs_508_MeasGapConfig_GP1) );
  
  //------------------------------------------------
  //8.3.1.1, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_1_Step1(RRC_TransactionIdentifier p_RRC_TI,
                                                                                 ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth) :=
    /* @status    APPROVED */
    cs_508_RRCConnectionReconfiguration_ConditionMEAS(p_RRC_TI,
                                                      cs_MeasConfig(omit,
                                                                    cs_MeasObjectToAddModList_1Entry(tsc_IdMeasObject_f1,
                                                                                                     cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq,
                                                                                                                                          p_MeasurementBandwidth,
                                                                                                                                          omit,
                                                                                                                                          omit,
                                                                                                                                          omit)),
                                                                    omit,
                                                                    cs_ReportConfigToAddModList_1Entry(tsc_IdReportConfig_A1,
                                                                                                       cs_ReportConfig_reportConfigEUTRA_eventA1_RSRP( -72,
                                                                                                                                                       6,
                                                                                                                                                       ms256,
                                                                                                                                                       rsrp,
                                                                                                                                                       both,
                                                                                                                                                       1,
                                                                                                                                                       ms1024,
                                                                                                                                                       infinity_ ) ), //Changed from r1 to infinity_, CR R5-094520
                                                                    
                                                                    omit,
                                                                    cs_MeasIdToAddModList_1Entry(1,
                                                                                                 tsc_IdMeasObject_f1,
                                                                                                 tsc_IdReportConfig_A1)));
  
  //------------------------------------------------
  //8.3.1.2, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_2_Step1(RRC_TransactionIdentifier p_RRC_TI,
                                                                                 ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth ) :=
    /* @status    APPROVED */
    cs_508_RRCConnectionReconfiguration_ConditionMEAS(p_RRC_TI,
                                                      cs_MeasConfig(omit,
                                                                    cs_MeasObjectToAddModList_1Entry(tsc_IdMeasObject_f1,
                                                                                                     cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq,
                                                                                                                                          p_MeasurementBandwidth,
                                                                                                                                          omit,
                                                                                                                                          omit,
                                                                                                                                          omit)),
                                                                    omit,
                                                                    cs_ReportConfigToAddModList_1Entry(tsc_IdReportConfig_A2,
                                                                                                       cs_ReportConfig_reportConfigEUTRA_eventA2_RSRP(-83,
                                                                                                                                                      6,
                                                                                                                                                      ms320, //@sic R5s100176, Change 3: Change value of timeToTrigger parameter from 256ms to 320ms
                                                                                                                                                      rsrp,
                                                                                                                                                      both,
                                                                                                                                                      1,
                                                                                                                                                      ms1024,
                                                                                                                                                      infinity_ ) ), //Changed from r1 to infinity_, CR R5-095507
                                                                    omit,
                                                                    cs_MeasIdToAddModList_1Entry(1,
                                                                                                 tsc_IdMeasObject_f1,
                                                                                                 tsc_IdReportConfig_A2)));
  
  //------------------------------------------------
  //8.3.1.3, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_3_Step1(RRC_TransactionIdentifier p_RRC_TI,
                                                                                 ARFCN_ValueEUTRA     p_EUTRA_DL_CarrierFreq_1,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth_1,
                                                                                 ARFCN_ValueEUTRA     p_EUTRA_DL_CarrierFreq_2,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth_2) :=
    /* @status    APPROVED */
    cs_508_RRCConnectionReconfiguration_ConditionMEAS(p_RRC_TI,
                                                      cs_MeasConfig(omit,
                                                                    cs_MeasObjectToAddModList_2Entries(tsc_IdMeasObject_f1,
                                                                                                       cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq_1,
                                                                                                                                            p_MeasurementBandwidth_1,
                                                                                                                                            omit,
                                                                                                                                            omit,
                                                                                                                                            omit),
                                                                                                       tsc_IdMeasObject_f2,
                                                                                                       cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq_2,
                                                                                                                                            p_MeasurementBandwidth_2,
                                                                                                                                            omit,
                                                                                                                                            omit,
                                                                                                                                            omit) ),
                                                                    omit,
                                                                    cs_ReportConfigToAddModList_1Entry(tsc_IdReportConfig_A3,
                                                                                                       cs_ReportConfig_reportConfigEUTRA_eventA3( 0, //Changed a3_Offset from 20 to 0, CR R5-101032r2
                                                                                                                                                  false,
                                                                                                                                                  0,
                                                                                                                                                  ms0,
                                                                                                                                                  rsrp,
                                                                                                                                                  sameAsTriggerQuantity,
                                                                                                                                                  1,
                                                                                                                                                  ms1024,
                                                                                                                                                  r1 ) ), //Changed from r1 to infinity_, CR R5-095507
                                                                                                                                                          //Changed from infinity_ to r1, CR R5-105011
                                                                    omit,
                                                                    cs_MeasIdToAddModList_2Entries(1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3,
                                                                                                   2, tsc_IdMeasObject_f2, tsc_IdReportConfig_A3 ),
                                                                    cs_QuantityConfig( cs_QuantityConfigEUTRA( omit, omit ), omit, omit, omit ), //@sic R5s100495 change 2 sic@
                                                                    cs_508_MeasGapConfig_GP1,
                                                                    omit,
                                                                    omit,
                                                                    omit ) );

  //------------------------------------------------
  //8.3.1.4, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_4_Step1(RRC_TransactionIdentifier p_RRC_TI,
                                                                                 ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_1,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth_1,
                                                                                 ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_2,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth_2,
                                                                                 ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_3,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth_3 ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_3Entries(
        tsc_IdMeasObject_f1,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq_1, p_MeasurementBandwidth_1, omit, omit, omit ),
        tsc_IdMeasObject_f2,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq_2, p_MeasurementBandwidth_2, omit, omit, omit ),
        tsc_IdMeasObject_f3, //@sic R5-103829r2 sic@
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq_3, p_MeasurementBandwidth_3, omit, omit, omit ) ), //@sic R5-103829r2 sic@
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfigEUTRA_PERIODICAL,
        cs_ReportConfig_reportConfigEUTRA_periodical( reportStrongestCells, rsrp, both, 2, ms1024, infinity_ ) ),
      omit,
      cs_MeasIdToAddModList_3Entries(
        1, tsc_IdMeasObject_f1, tsc_IdReportConfigEUTRA_PERIODICAL,
        2, tsc_IdMeasObject_f2, tsc_IdReportConfigEUTRA_PERIODICAL,
        3, tsc_IdMeasObject_f3, tsc_IdReportConfigEUTRA_PERIODICAL ), //@sic R5-103829r2 sic@
      cs_QuantityConfig_Def,
      cs_508_MeasGapConfig_GP1 ) );

  //------------------------------------------------
  //8.3.1.4, Step10
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_4_Step10(
                                     RRC_TransactionIdentifier p_RRC_TI ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit, omit, omit, omit,
      cs_MeasIdToRemoveList_3Entries( 1, 2, 3 ), //@sic R5-103829r2 sic@
      omit ) );

  //------------------------------------------------
  //8.3.1.5, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_5_Step1(RRC_TransactionIdentifier p_RRC_TI,
                                                                                 ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth ) :=
  /* @status    APPROVED */
    cs_508_RRCConnectionReconfiguration_ConditionMEAS(
      p_RRC_TI,
      cs_MeasConfig(omit,
                           cs_MeasObjectToAddModList_1Entry(tsc_IdMeasObject_f1,
                                                            cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq, p_MeasurementBandwidth, omit, omit, omit ) ),
                           omit,
      cs_ReportConfigToAddModList_2Entries(1,
                                           cs_ReportConfig_reportConfigEUTRA_eventA3( -12, false, 0, ms0, rsrp, sameAsTriggerQuantity, 1, ms1024, r1 ), //@sic R5s100187, Change 2: Set the a3-Offset for both events to 0
                                                                                                                                                        //@sic R5-105041r2 "a3-Offset from 0 to -12" sic@
                                           2,
                                           cs_ReportConfig_reportConfigEUTRA_eventA3( 0, false, 0, ms0, rsrp, sameAsTriggerQuantity, 1, ms1024, r1 ) ), //@sic R5s100187, Change 2: Set the a3-Offset for both events to 0
                           omit,
                           cs_MeasIdToAddModList_2Entries(1, tsc_IdMeasObject_f1, 1,
                                                          2, tsc_IdMeasObject_f1, 2 ) ) );

  //------------------------------------------------
  //8.3.1.7, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_7_Step1(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     AllowedMeasBandwidth p_MeasurementBandwidth,
                                     PhysCellId p_PhysCellId ) :=
  cs_RRCConnectionReconfiguration_Common(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        1,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq, p_MeasurementBandwidth, omit,
          cs_BlackCellsToAddModList_1Entry(
            1,
            p_PhysCellId,
            omit ),
          omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        1,
        cs_508_ReportConfigEUTRA_A3), // to be checked
      omit,
      cs_MeasIdToAddModList_1Entry( 1, 1, 1 )),
    omit, omit, omit );

//------------------------------------------------
//8.3.1.7, Step7
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_7_Step7(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     AllowedMeasBandwidth p_MeasurementBandwidth ) :=
  cs_RRCConnectionReconfiguration_Common(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        1,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq, p_MeasurementBandwidth, cs_CellIndexList_1Entry( 1 ),
          omit, omit ) ),
      omit, omit, omit, omit ),
    omit, omit, omit );

  //------------------------------------------------
  //8.3.1.8, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_8_Step1(RRC_TransactionIdentifier p_RRC_TI,
                                                                                 ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                                                                 AllowedMeasBandwidth p_MeasurementBandwidth) :=
    /* @status    APPROVED */
    cs_508_RRCConnectionReconfiguration_ConditionMEAS(p_RRC_TI,
                                                      cs_MeasConfig(omit,
                                                                    cs_MeasObjectToAddModList_1Entry(tsc_IdMeasObject_f1,
                                                                                                     cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq,
                                                                                                                                          p_MeasurementBandwidth,
                                                                                                                                          omit,
                                                                                                                                          omit,
                                                                                                                                          omit)),
                                                                    omit,
                                                                    cs_ReportConfigToAddModList_1Entry(tsc_IdReportConfig_A3,
                                                                                                       cs_508_ReportConfigEUTRA_A3),
                                                                    omit,
                                                                    cs_MeasIdToAddModList_1Entry(1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3 ) ) );
  
  //------------------------------------------------
  //8.3.1.8, Step5, MeasConfig
  template (value) MeasConfig cs_MeasConfig_8_3_1_8_Step5 :=
    /* @status    APPROVED */
    cs_MeasConfig(cs_MeasObjectToRemoveList_1Entry( tsc_IdMeasObject_f1 ),  // CR R5-101082
                  omit,
                  cs_ReportConfigToRemoveList_1Entry( tsc_IdReportConfig_A3 ),
                  omit,
                  cs_MeasIdToRemoveList_1Entry( 1 ),
                  omit );
/*
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_8_Step5(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     PhysCellId p_PhysCellId,
                                     C_RNTI p_C_RNTI,
                                     RadioResourceConfigCommonSIB p_RadioResourceConfigCommonSIB,
                                     template (value) EUTRA_FDD_TDD_CellInfo_Type p_EUTRA_FDD_TDD_CellInfo,
                                     template (omit) AntennaInfoCommon p_AntennaInfoCommon, // @sic R5-100786 sic@
                                     template (value) PhysicalConfigDedicated_AntennaInfo_Type p_AntennaInfo, // @sic R5-100786 sic@
                                     SR_PUCCH_ResourceIndex_Type p_SR_PUCCH_ResourceIndex, // @sic R5-103678 sic@
                                     SR_ConfigIndex_Type p_SR_ConfigIndex // @sic R5-103678 sic@
                                     ) :=
  cs_RRCConnectionReconfiguration_Common(
    p_RRC_TI,
    cs_MeasConfig(
      cs_MeasObjectToRemoveList_1Entry( tsc_IdMeasObject_f1 ),  // CR R5-101082
      omit,
      cs_ReportConfigToRemoveList_1Entry( tsc_IdReportConfig_A3 ),
      omit,
      cs_MeasIdToRemoveList_1Entry( 1 ),
      omit ),
    cs_508_MobilityControlInfo_HO(
      p_PhysCellId,
      omit,
      p_C_RNTI,
      cs_RadioResourceConfigCommon_Def(
        p_RadioResourceConfigCommonSIB.rach_ConfigCommon,
        cs_PRACH_Config_Def ( p_RadioResourceConfigCommonSIB.prach_Config ),
        p_RadioResourceConfigCommonSIB.pusch_ConfigCommon,
        p_RadioResourceConfigCommonSIB.soundingRS_UL_ConfigCommon,
        omit,
        p_AntennaInfoCommon ) ),
    cs_508_RadioResourceConfigDedicated_HO(
      p_EUTRA_FDD_TDD_CellInfo.cqi_ReportConfig,
      p_EUTRA_FDD_TDD_CellInfo.soundingRS_UL_Config,
      p_AntennaInfo,
      p_SR_PUCCH_ResourceIndex,
      p_SR_ConfigIndex ),
    cs_SecurityConfigHO_IntraLTE(false, 0)
    );
*/
  //------------------------------------------------
  //8.3.1.9, Step1, condition pc_25
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_9_Step1_pc25(RRC_TransactionIdentifier p_RRC_TI,
                                                                                      ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_1,
                                                                                      AllowedMeasBandwidth p_MeasurementBandwidth_1,
                                                                                      ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_2,
                                                                                      AllowedMeasBandwidth p_MeasurementBandwidth_2) :=
    /* @status    APPROVED */
    cs_508_RRCConnectionReconfiguration_ConditionMEAS(p_RRC_TI,
                                                      cs_MeasConfig(omit,
                                                                    cs_MeasObjectToAddModList_2Entries(tsc_IdMeasObject_f1,
                                                                                                       cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq_1,
                                                                                                                                            p_MeasurementBandwidth_1,
                                                                                                                                            omit,
                                                                                                                                            omit,
                                                                                                                                            omit),
                                                                                                       tsc_IdMeasObject_f2,
                                                                                                       cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq_2,
                                                                                                                                            p_MeasurementBandwidth_2,
                                                                                                                                            omit,
                                                                                                                                            omit,
                                                                                                                                            omit)),
                                                                    omit,
                                                                    cs_ReportConfigToAddModList_1Entry(tsc_IdReportConfig_A3,
                                                                                                       cs_508_ReportConfigEUTRA_A3),
                                                                    omit,
                                                                    cs_MeasIdToAddModList_2Entries(1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3,
                                                                                                   2, tsc_IdMeasObject_f2, tsc_IdReportConfig_A3),
                                                                    cs_QuantityConfig( cs_QuantityConfigEUTRA( omit, omit ), omit, omit, omit ), //@sic R5s100493 change 1 sic@
                                                                    cs_508_MeasGapConfig_GP1 ) );
  
  //------------------------------------------------
  //8.3.1.9, Step1, condition not pc_25
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_9_Step1_notpc25(RRC_TransactionIdentifier p_RRC_TI,
                                                                                         ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                                                                         AllowedMeasBandwidth p_MeasurementBandwidth) :=
    /* @status    APPROVED */
    cs_508_RRCConnectionReconfiguration_ConditionMEAS(p_RRC_TI,
                                                      cs_MeasConfig(omit,
                                                                    cs_MeasObjectToAddModList_1Entry(tsc_IdMeasObject_f1,
                                                                                                     cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq,
                                                                                                                                          p_MeasurementBandwidth,
                                                                                                                                          omit,
                                                                                                                                          omit,
                                                                                                                                          omit)),
                                                                    omit,
                                                                    cs_ReportConfigToAddModList_1Entry(tsc_IdReportConfig_A3,
                                                                                                       cs_508_ReportConfigEUTRA_A3),
                                                                    omit,
                                                                    cs_MeasIdToAddModList_1Entry(1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3) ) );

  //------------------------------------------------
  //8.3.1.10, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_10_Step1(RRC_TransactionIdentifier p_RRC_TI,
                                                                                  ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_1,
                                                                                  AllowedMeasBandwidth p_MeasurementBandwidth_1,
                                                                                  ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_2,
                                                                                  AllowedMeasBandwidth p_MeasurementBandwidth_2) :=
  /* @status    APPROVED */
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(p_RRC_TI,
                                                    cs_MeasConfig(omit,
                                                                  cs_MeasObjectToAddModList_2Entries(tsc_IdMeasObject_f1,
                                                                                                     cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq_1,
                                                                                                                                          p_MeasurementBandwidth_1,
                                                                                                                                          omit,
                                                                                                                                          omit,
                                                                                                                                          omit),
                                                                                                     tsc_IdMeasObject_f2,
                                                                                                     cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq_2,
                                                                                                                                          p_MeasurementBandwidth_2,
                                                                                                                                          omit,
                                                                                                                                          omit,
                                                                                                                                          omit)),
                                                                  omit,
                                                                  cs_ReportConfigToAddModList_1Entry(tsc_IdReportConfig_A3,
                                                                                                     cs_ReportConfig_reportConfigEUTRA_eventA3(4,
                                                                                                                                               false,
                                                                                                                                               0,
                                                                                                                                               ms640,
                                                                                                                                               rsrp,
                                                                                                                                               sameAsTriggerQuantity,
                                                                                                                                               1,
                                                                                                                                               ms1024,
                                                                                                                                               r1)),
                                                                  omit,
                                                                  cs_MeasIdToAddModList_2Entries(1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3,
                                                                                                 2, tsc_IdMeasObject_f2, tsc_IdReportConfig_A3 ),
                                                                  cs_QuantityConfig_Def, //@sic R5s100516 Change 1 sic@
                                                                  cs_508_MeasGapConfig_GP1 ));

  //------------------------------------------------
  //8.3.1.11, Step1, condition pc_25
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_11_Step1_pc25(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_1,
                                     AllowedMeasBandwidth p_MeasurementBandwidth_1,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq_2,
                                     AllowedMeasBandwidth p_MeasurementBandwidth_2 ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_2Entries(
        tsc_IdMeasObject_f1,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq_1, p_MeasurementBandwidth_1, omit, omit, omit ),
        tsc_IdMeasObject_f2,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq_2, p_MeasurementBandwidth_2, omit, omit, omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfig_A3,
        cs_ReportConfig_reportConfigEUTRA_eventA3( 0, false, 0, ms640, rsrp, sameAsTriggerQuantity, 1, ms1024, r1 ) ),
      omit,
      cs_MeasIdToAddModList_2Entries(
        1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3,
        2, tsc_IdMeasObject_f2, tsc_IdReportConfig_A3 ),
      cs_QuantityConfig_Def,
      cs_508_MeasGapConfig_GP1 ) );

  //------------------------------------------------
  //8.3.1.11, Step1, condition not pc_25
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_1_11_Step1_notpc25(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     AllowedMeasBandwidth p_MeasurementBandwidth ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f1,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq, p_MeasurementBandwidth, omit, omit, omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfig_A3,
        cs_ReportConfig_reportConfigEUTRA_eventA3( 0, false, 0, ms640, rsrp, sameAsTriggerQuantity, 1, ms1024, r1 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry(
        1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3 ) ) );

  //------------------------------------------------
  //8.3.2.1, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_2_1_Step1(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueGERAN p_StartingARFCN,
                                     BandIndicatorGERAN p_BandIndicator,
                                     ExplicitListOfARFCNs p_ExplicitListOfARFCNs ) := //TBD!!!!
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f11,
        cs_MeasObject_measObjectGERAN(
          p_StartingARFCN,
          p_BandIndicator,
          cs_FollowingARFCNs_explicitListOfARFCNs( p_ExplicitListOfARFCNs ),
          0, omit, omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        1,
        cs_508_ReportConfigInterRAT_B2_GERAN( -69, -79 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 1, tsc_IdMeasObject_f11, 1 ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        omit,
        cs_QuantityConfigGERAN( rssi, fc0 ),
        omit ),  // CR R5-101039
      cs_508_MeasGapConfig_GP2 ) );

  //------------------------------------------------
  //8.3.2.2, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_2_2_Step1(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueGERAN p_StartingARFCN_1,
                                     BandIndicatorGERAN p_BandIndicator_1,
                                     ExplicitListOfARFCNs p_ExplicitListOfARFCNs_1,
                                     ARFCN_ValueGERAN p_StartingARFCN_2,
                                     BandIndicatorGERAN p_BandIndicator_2,
                                     ExplicitListOfARFCNs p_ExplicitListOfARFCNs_2 ) := //TBD!!!!
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_2Entries(
        tsc_IdMeasObject_f12,
        cs_MeasObject_measObjectGERAN(
          p_StartingARFCN_1,
          p_BandIndicator_1,
          cs_FollowingARFCNs_explicitListOfARFCNs( p_ExplicitListOfARFCNs_1 ),
          0, omit, omit ),
        tsc_IdMeasObject_f12,
        cs_MeasObject_measObjectGERAN(
          p_StartingARFCN_2,
          p_BandIndicator_2,
          cs_FollowingARFCNs_explicitListOfARFCNs( p_ExplicitListOfARFCNs_2 ),
          0, omit, omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfigInterRAT_PERIODICAL,
        cs_508_ReportConfigInterRAT_PERIODICAL ),
      omit,
      cs_MeasIdToAddModList_2Entries(
        1, tsc_IdMeasObject_f12, tsc_IdReportConfigInterRAT_PERIODICAL,
        2, tsc_IdMeasObject_f13, tsc_IdReportConfigInterRAT_PERIODICAL ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        omit,
        cs_QuantityConfigGERAN( rssi, fc0 ),
        omit ),  // CR R5-101039
      cs_508_MeasGapConfig_GP2 ) );

  //------------------------------------------------
  //8.3.2.2, Step9
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_RemoveMeasId_2Entries(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     integer p_MeasId_1,
                                     integer p_MeasId_2 ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit, omit, omit, omit,
      cs_MeasIdToRemoveList_2Entries( p_MeasId_1, p_MeasId_2 ), //@sic R5-103829r2 sic@
      omit,
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        omit,
        cs_QuantityConfigGERAN( rssi, fc0 ),
        omit ),
      cs_508_MeasGapConfig_GP2 ) );

  //------------------------------------------------
  //8.3.2.3, Step1, condition UTRAN-FDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_2_3_Step1_FDD(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueUTRA p_CarrierFreq ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f8,
        cs_508_MeasObjectUTRA_GENERIC( p_CarrierFreq ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        1,
        cs_508_ReportConfigInterRAT_B2_UTRA_ConditionFDD( -69, -18 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 1, tsc_IdMeasObject_f8, 1 ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc0 ),
        omit,
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP1 ) );

  //------------------------------------------------
  //8.3.2.3, Step1, condition UTRAN-TDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_2_3_Step1_TDD(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueUTRA p_CarrierFreq ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f8,
        cs_508_MeasObjectUTRA_GENERIC( p_CarrierFreq ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        1,
        cs_508_ReportConfigInterRAT_B2_UTRA_ConditionTDD( -69, -79 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 1, tsc_IdMeasObject_f8, 1 ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc0 ),
        omit,
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP1 ) );

  //------------------------------------------------
  //8.3.2.4, Step1, condition UTRAN-FDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_2_4_Step1_FDD(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueUTRA p_CarrierFreq,
                                     PhysCellIdUTRA_FDD p_PhysCellIdUTRA_FDD_1,
                                     PhysCellIdUTRA_FDD p_PhysCellIdUTRA_FDD_2 ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f8,
        cs_MeasObject_measObjectUTRA(
          p_CarrierFreq,
          0,
          omit,
          {
            cellsToAddModListUTRA_FDD := {
              {
                cellIndex := 1,
                physCellId := p_PhysCellIdUTRA_FDD_1
              },
              {
                cellIndex := 2,
                physCellId := p_PhysCellIdUTRA_FDD_2
              }
            }
          },
          omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfigInterRAT_PERIODICAL,
        cs_ReportConfig_reportConfigInterRAT_periodical( reportStrongestCells, 2, ms1024, infinity_ ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 1, tsc_IdMeasObject_f8, tsc_IdReportConfigInterRAT_PERIODICAL ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc0 ),
        omit,
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP1 ) );

  //------------------------------------------------
  //8.3.2.4, Step1, condition UTRAN-TDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_2_4_Step1_TDD(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueUTRA p_CarrierFreq,
                                     PhysCellIdUTRA_TDD p_PhysCellIdUTRA_TDD_1,
                                     PhysCellIdUTRA_TDD p_PhysCellIdUTRA_TDD_2 ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f8,
        cs_MeasObject_measObjectUTRA(
          p_CarrierFreq,
          0,
          omit,
          {
            cellsToAddModListUTRA_TDD := {
              {
                cellIndex := 1,
                physCellId := p_PhysCellIdUTRA_TDD_1
              },
              {
                cellIndex := 2,
                physCellId := p_PhysCellIdUTRA_TDD_2
              }
            }
          },
          omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfigInterRAT_PERIODICAL,
        cs_ReportConfig_reportConfigInterRAT_periodical( reportStrongestCells, 2, ms1024, infinity_ ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 1, tsc_IdMeasObject_f8, tsc_IdReportConfigInterRAT_PERIODICAL ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc0 ),
        omit,
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP1 ) );

  //------------------------------------------------
  //8.3.2.4, Step10
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_RemoveMeasId_1Entry(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     integer p_MeasId ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit, omit, omit, omit,
      cs_MeasIdToRemoveList_1Entry( p_MeasId ),
      omit,
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc0 ),
        omit,
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP1 ) );

  //------------------------------------------------
  //8.3.2.6, Step1, condition UTRAN-FDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_2_6_Step1_FDD(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     AllowedMeasBandwidth p_EUTRA_MeasurementBandwidth,
                                     ARFCN_ValueUTRA p_UTRA_Freq,
                                     ARFCN_ValueGERAN p_GERAN_startingARFCN,
                                     BandIndicatorGERAN p_GERAN_bandIndicator,
                                     template (value) ExplicitListOfARFCNs p_GERAN_explicitListOfARFCNs ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_3Entries(
        tsc_IdMeasObject_f1,
        cs_508_MeasObjectEUTRA_GENERIC( p_EUTRA_DL_CarrierFreq, p_EUTRA_MeasurementBandwidth ),
        tsc_IdMeasObject_f8,
        cs_508_MeasObjectUTRA_GENERIC( p_UTRA_Freq ),
        tsc_IdMeasObject_f11,
        cs_508_MeasObjectGERAN_GENERIC( p_GERAN_startingARFCN, p_GERAN_bandIndicator, p_GERAN_explicitListOfARFCNs ) ),
      omit,
      cs_ReportConfigToAddModList_3Entries(
        tsc_IdReportConfig_A2,
        cs_508_ReportConfigEUTRA_A2( -95 ),
        tsc_IdReportConfig_B2_UTRA,
        cs_508_ReportConfigInterRAT_B2_UTRA_ConditionFDD( -95, (-70-(-60)) ), //TBD!!!! There's no Ec/No value offered in the CR R5-096606
        tsc_IdReportConfig_B2_GERAN,
        cs_508_ReportConfigInterRAT_B2_GERAN( -95, -75 ) ),
      omit,
      cs_MeasIdToAddModList_3Entries(
        1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A2,
        2, tsc_IdMeasObject_f8, tsc_IdReportConfig_B2_UTRA,
        3, tsc_IdMeasObject_f11, tsc_IdReportConfig_B2_GERAN ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( fc4, fc4 ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc4 ),
        cs_QuantityConfigGERAN( rssi, fc2 ),
        omit ),
      cs_508_MeasGapConfig_GP2 ) );

  //------------------------------------------------
  //8.3.2.6, Step1, condition UTRAN-TDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_2_6_Step1_TDD(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     AllowedMeasBandwidth p_EUTRA_MeasurementBandwidth,
                                     ARFCN_ValueUTRA p_UTRA_Freq,
                                     ARFCN_ValueGERAN p_GERAN_startingARFCN,
                                     BandIndicatorGERAN p_GERAN_bandIndicator,
                                     template (value) ExplicitListOfARFCNs p_GERAN_explicitListOfARFCNs ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_3Entries(
        tsc_IdMeasObject_f1,
        cs_508_MeasObjectEUTRA_GENERIC( p_EUTRA_DL_CarrierFreq, p_EUTRA_MeasurementBandwidth ),
        tsc_IdMeasObject_f8,
        cs_508_MeasObjectUTRA_GENERIC( p_UTRA_Freq ),
        tsc_IdMeasObject_f11,
        cs_508_MeasObjectGERAN_GENERIC( p_GERAN_startingARFCN, p_GERAN_bandIndicator, p_GERAN_explicitListOfARFCNs ) ),
      omit,
      cs_ReportConfigToAddModList_3Entries(
        tsc_IdReportConfig_A2,
        cs_508_ReportConfigEUTRA_A2( -95 ),
        tsc_IdReportConfig_B2_UTRA,
        cs_508_ReportConfigInterRAT_B2_UTRA_ConditionTDD( -95, -70 ),
        tsc_IdReportConfig_B2_GERAN,
        cs_508_ReportConfigInterRAT_B2_GERAN( -95, -75 ) ),
      omit,
      cs_MeasIdToAddModList_3Entries(
        1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A2,
        2, tsc_IdMeasObject_f8, tsc_IdReportConfig_B2_UTRA,
        3, tsc_IdMeasObject_f11, tsc_IdReportConfig_B2_GERAN ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( fc4, fc4 ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc4 ),
        cs_QuantityConfigGERAN( rssi, fc2 ),
        omit ),
      cs_508_MeasGapConfig_GP2 ) );

  //------------------------------------------------
  //8.3.3.1, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_3_1_Step1(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     AllowedMeasBandwidth p_MeasurementBandwidth ) :=
  //@sic R5-105002 sic@
  cs_RRCConnectionReconfiguration_Common(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f1,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq, p_MeasurementBandwidth, omit, omit, omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfig_A3,
        cs_ReportConfig_reportConfigEUTRA_eventA3( 0, false, 0, ms0, rsrp, sameAsTriggerQuantity, 1, ms1024, r1 ) ),  // Changed a3_Offset (1st parameter) from 20 to 0, CR R5-101130
      omit,
      cs_MeasIdToAddModList_1Entry(
        1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3 ) ),
    omit,
    cs_RadioResourceConfigDedicated(
      omit, omit, omit,
      { explicitValue := {
          ul_SCH_Config := omit,
          drx_Config := omit,
          timeAlignmentTimerDedicated := infinity_,
          phr_Config := omit } } ),
    omit );
  /* //@sic R5-105002 sic@
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f1,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq, p_MeasurementBandwidth, omit, omit, omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfig_A3,
        cs_ReportConfig_reportConfigEUTRA_eventA3( 0, false, 0, ms0, rsrp, sameAsTriggerQuantity, 1, ms1024, r1 ) ),  // Changed a3_Offset (1st parameter) from 20 to 0, CR R5-101130
      omit,
      cs_MeasIdToAddModList_1Entry(
        1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A3 ) ) );
  */

  //------------------------------------------------
  //8.3.3.1, Step5
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_3_1_Step5(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     AllowedMeasBandwidth p_MeasurementBandwidth,
                                     PhysCellId p_PhysCellId ) :=
  cs_RRCConnectionReconfiguration_Common(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f1_CGI,
        cs_MeasObject_measObjectEUTRA_Common(
          p_EUTRA_DL_CarrierFreq, p_MeasurementBandwidth, omit, omit, p_PhysCellId ) ),
      cs_ReportConfigToRemoveList_1Entry( tsc_IdReportConfig_A3 ),
      cs_ReportConfigToAddModList_1Entry(
        tsc_ReportConfigId_CGI,
        cs_ReportConfig_reportConfigEUTRA_periodical( reportCGI, rsrp, sameAsTriggerQuantity, 1, ms1024, r1 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry(
        2, tsc_IdMeasObject_f1_CGI, tsc_ReportConfigId_CGI ) ),
    omit,
    //@sic R5-105002 sic@
    cs_RadioResourceConfigDedicated(
      omit, omit, omit,
      { explicitValue := {
          ul_SCH_Config := {
            maxHARQ_Tx := n5,
            periodicBSR_Timer := infinity_,
            retxBSR_Timer := sf10240,
            ttiBundling := false },
          drx_Config := {
            setup := {
              onDurationTimer := psf6,
              drx_InactivityTimer := psf6,
              drx_RetransmissionTimer := psf16,
              longDRX_CycleStartOffset := {
                sf2560 := 0 },
              shortDRX := omit } },
          timeAlignmentTimerDedicated := infinity_,
          phr_Config := {
            release := NULL } } } ),
    omit );

  //------------------------------------------------
  //8.3.3.2, Step1, condition UTRAN-FDD and UTRAN-TDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_3_2_Step1(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueUTRA p_CarrierFreq ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f8,
        cs_508_MeasObjectUTRA_GENERIC( p_CarrierFreq ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        1,
        cs_ReportConfig_reportConfigInterRAT_periodical( reportStrongestCellsForSON, 1, ms1024, r1 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 1, tsc_IdMeasObject_f8, 1 ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc0 ),
        omit,
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP1 ) );

  //------------------------------------------------
  //8.3.3.2, Step5, codition UTRAN-FDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_3_2_Step5_FDD(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     PhysCellIdUTRA_FDD p_PhysCellIdUTRA_FDD ) :=
  cs_RRCConnectionReconfiguration_Common(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f8_CGI,
        cs_MeasObject_measObjectUTRA( p_EUTRA_DL_CarrierFreq, 0, omit, omit, { utra_FDD := p_PhysCellIdUTRA_FDD } ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_ReportConfigId_CGI,
        cs_ReportConfig_reportConfigInterRAT_periodical( reportCGI, 1, ms1024, r1 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 2, tsc_IdMeasObject_f8_CGI, tsc_ReportConfigId_CGI ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc0 ),
        omit,
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP1 ),
    omit,
    //@sic R5-105002 sic@
    cs_RadioResourceConfigDedicated(
      omit, omit, omit,
      { explicitValue := {
          ul_SCH_Config := {
            maxHARQ_Tx := n5,
            periodicBSR_Timer := infinity_,
            retxBSR_Timer := sf10240,
            ttiBundling := false },
          drx_Config := {
            setup := {
              onDurationTimer := psf6,
              drx_InactivityTimer := psf1,
              drx_RetransmissionTimer := psf16,
              longDRX_CycleStartOffset := {
                sf2560 := 0 },
              shortDRX := omit } },
          timeAlignmentTimerDedicated := sf750,
          phr_Config := {
            release := NULL } } } ),
    omit );

  //------------------------------------------------
  //8.3.3.2, Step5, codition UTRAN-TDD
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_3_2_Step5_TDD(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                     PhysCellIdUTRA_FDD p_PhysCellIdUTRA_TDD ) :=
  cs_RRCConnectionReconfiguration_Common(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f8_CGI,
        cs_MeasObject_measObjectUTRA( p_EUTRA_DL_CarrierFreq, 0, omit, omit, { utra_TDD := p_PhysCellIdUTRA_TDD } ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_ReportConfigId_CGI,
        cs_ReportConfig_reportConfigInterRAT_periodical( reportCGI, 1, ms1024, r1 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 2, tsc_IdMeasObject_f8_CGI, tsc_ReportConfigId_CGI ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        cs_QuantityConfigUTRA( cpich_EcN0, pccpch_RSCP, fc0 ),
        omit,
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP1),
    omit,
    //@sic R5-105002 sic@
    cs_RadioResourceConfigDedicated(
      omit, omit, omit,
      { explicitValue := {
          ul_SCH_Config := {
            maxHARQ_Tx := n5,
            periodicBSR_Timer := infinity_,
            retxBSR_Timer := sf10240,
            ttiBundling := false },
          drx_Config := {
            setup := {
              onDurationTimer := psf6,
              drx_InactivityTimer := psf1,
              drx_RetransmissionTimer := psf16,
              longDRX_CycleStartOffset := {
                sf2560 := 0 },
              shortDRX := omit } },
          timeAlignmentTimerDedicated := sf750,
          phr_Config := {
            release := NULL } } } ),
    omit );

  //------------------------------------------------
  //8.3.3.3, Step1
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_3_3_Step1(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueGERAN p_StartingARFCN,
                                     BandIndicatorGERAN p_BandIndicator,
                                     ExplicitListOfARFCNs p_ExplicitListOfARFCNs ) :=
  cs_508_RRCConnectionReconfiguration_ConditionMEAS(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f11,
        cs_MeasObject_measObjectGERAN(
          p_StartingARFCN,
          p_BandIndicator,
          cs_FollowingARFCNs_explicitListOfARFCNs( p_ExplicitListOfARFCNs ),
          0,
          '11111111'B,
          omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_IdReportConfig_B2_GERAN,
        cs_508_ReportConfigInterRAT_B2_GERAN( -69, -79 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 1, tsc_IdMeasObject_f11, tsc_IdReportConfig_B2_GERAN ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        omit,
        cs_QuantityConfigGERAN( rssi, fc0 ),
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP2) );

  //------------------------------------------------
  //8.3.3.3, Step5
  template (value) DL_DCCH_Message cs_RRCConnectionReconfiguration_8_3_3_3_Step5(
                                     RRC_TransactionIdentifier p_RRC_TI,
                                     ARFCN_ValueGERAN p_StartingARFCN,
                                     BandIndicatorGERAN p_BandIndicator,
                                     ExplicitListOfARFCNs p_ExplicitListOfARFCNs ) :=
  cs_RRCConnectionReconfiguration_Common(
    p_RRC_TI,
    cs_MeasConfig(
      omit,
      cs_MeasObjectToAddModList_1Entry(
        tsc_IdMeasObject_f11_CGI,
        cs_MeasObject_measObjectGERAN(
          p_StartingARFCN,
          p_BandIndicator,
          cs_FollowingARFCNs_explicitListOfARFCNs( p_ExplicitListOfARFCNs ),
          0,
          '11111111'B,
          omit ) ),
      omit,
      cs_ReportConfigToAddModList_1Entry(
        tsc_ReportConfigId_CGI,
        cs_ReportConfig_reportConfigInterRAT_periodical( reportCGI, 1, ms1024, r1 ) ),
      omit,
      cs_MeasIdToAddModList_1Entry( 2, tsc_IdMeasObject_f11_CGI, tsc_ReportConfigId_CGI ),
      cs_QuantityConfig(
        cs_QuantityConfigEUTRA( omit, omit ),
        omit,
        cs_QuantityConfigGERAN( rssi, fc0 ),
        omit ), // CR R5-101039
      cs_508_MeasGapConfig_GP2 ),
    omit,
    //@sic R5-105002 sic@
    cs_RadioResourceConfigDedicated(
      omit, omit, omit,
      { explicitValue := {
          ul_SCH_Config := {
            maxHARQ_Tx := n5,
            periodicBSR_Timer := infinity_,
            retxBSR_Timer := sf10240,
            ttiBundling := false },
          drx_Config := {
            setup := {
              onDurationTimer := psf6,
              drx_InactivityTimer := psf1,
              drx_RetransmissionTimer := psf16,
              longDRX_CycleStartOffset := {
                sf2560 := 0 },
              shortDRX := omit } },
          timeAlignmentTimerDedicated := sf750,
          phr_Config := {
            release := NULL } } } ),
    omit );


//================================================================
//MeasurementReport

  //------------------------------------------------
  //8.3.1.3, Step3
  //8.3.1.5, Step3
  //8.3.1.8, Step6
  //8.3.2.1, Step3
  template UL_DCCH_Message cr_MeasurementReport_CheckAny := cr_MeasurementReport( ?, *, *, * ); /* @status    APPROVED */

  //------------------------------------------------
  //8.3.1.7, Step6
  template UL_DCCH_Message cr_MeasurementReport_8_3_1_7_Step6( PhysCellId p_PhysCellId ) :=
  cr_MeasurementReport(
    1, ?, ?,
    cr_MeasResultNeighCells_measResultListEUTRA_1Entry( p_PhysCellId, omit, ?, ? ) );

  //------------------------------------------------
  //8.3.1.7, Step9
  template UL_DCCH_Message cr_MeasurementReport_8_3_1_7_Step9(
                               PhysCellId p_PhysCellId_1,
                               PhysCellId p_PhysCellId_2 ) :=
  cr_MeasurementReport(
    1, ?, ?,
    cr_MeasResultNeighCells_measResultListEUTRA_2Entries(
      p_PhysCellId_1, omit, ?, ?,
      p_PhysCellId_2, omit, ?, ? ) );

  //------------------------------------------------
  //8.3.1.8, Step4
  template UL_DCCH_Message cr_MeasurementReport_8_3_1_8_Step4(PhysCellId p_PhysCellId) :=
  /* @status    APPROVED */
  cr_MeasurementReport(1, ?, ?,
                       cr_MeasResultNeighCells_measResultListEUTRA_1Entry( p_PhysCellId, omit, ?, ? ) );

  //------------------------------------------------
  //8.3.3.1, Step7
  //@sic R5-105002 sic@
  template UL_DCCH_Message cr_MeasurementReport_8_3_3_1_Step7(
                             PhysCellId p_PhysCellId,
                             PLMN_Identity p_PLMN_Identity,
                             CellIdentity p_CellIdentity,
                             template TrackingAreaCode p_TrackingAreaCode,
                             template PLMN_IdentityList2 p_PLMN_IdentityList2 ) :=
  cr_MeasurementReport(
    2, ?, ?,
    cr_MeasResultNeighCells_measResultListEUTRA_1Entry(
      p_PhysCellId,
      cr_Cgi_Info_EUTRA( p_PLMN_Identity, p_CellIdentity, p_TrackingAreaCode, p_PLMN_IdentityList2 ),
      ?, omit ) );

  //------------------------------------------------
  //8.3.3.2, Step7
  //for UTRA_FDD
  template UL_DCCH_Message cr_MeasurementReport_8_3_3_2_Step7_FDD(
                             template PhysCellIdUTRA_FDD p_PhysCellId,
                             template PLMN_Identity p_PLMN_Identity,
                             template CellGlobalIdUTRA.cellIdentity p_CellIdentity ) :=
  cr_MeasurementReport(
    2, ?, ?,
    cr_MeasResultNeighCells_measResultListUTRA_1Entry_FDD(
      p_PhysCellId,
      cr_Cgi_Info_UTRA( p_PLMN_Identity, p_CellIdentity, *, *, * ),
      omit, ? ) );
  //for UTRA_TDD
  template UL_DCCH_Message cr_MeasurementReport_8_3_3_2_Step7_TDD(
                             template PhysCellIdUTRA_TDD p_PhysCellId,
                             template PLMN_Identity p_PLMN_Identity,
                             template CellGlobalIdUTRA.cellIdentity p_CellIdentity ) :=
  cr_MeasurementReport(
    2, ?, ?,
    cr_MeasResultNeighCells_measResultListUTRA_1Entry_TDD(
      p_PhysCellId,
      cr_Cgi_Info_UTRA( p_PLMN_Identity, p_CellIdentity, *, *, * ),
      ?, omit ) );

  //------------------------------------------------
  //8.3.3.3, Step4
  template UL_DCCH_Message cr_MeasurementReport_8_3_3_3_Step4(
                             template integer p_ARFCN,
                             template BandIndicatorGERAN p_BandIndicator,
                             template PhysCellIdGERAN p_PhysCellId ) :=
  cr_MeasurementReport(
    1, ?, ?,
    cr_MeasResultNeighCells_measResultListGERAN_1Entry( p_ARFCN, p_BandIndicator, p_PhysCellId, omit, ? ) );

  //------------------------------------------------
  //8.3.3.3, Step7
  template UL_DCCH_Message cr_MeasurementReport_8_3_3_3_Step7(
                             template integer p_ARFCN,
                             template BandIndicatorGERAN p_BandIndicator,
                             template PhysCellIdGERAN p_PhysCellId,
                             template PLMN_Identity p_PLMN_Identity,
                             template CellGlobalIdGERAN.locationAreaCode p_LocationAreaCode,
                             template CellGlobalIdGERAN.cellIdentity p_CellIdentity,
                             template MeasResultGERAN.cgi_Info.routingAreaCode p_RoutingAreaCode) :=
  cr_MeasurementReport(
    1, ?, ?,
    cr_MeasResultNeighCells_measResultListGERAN_1Entry(
      p_ARFCN,
      p_BandIndicator,
      p_PhysCellId,
      cr_Cgi_Info_GERAN(
        p_PLMN_Identity,
        p_LocationAreaCode,
        p_CellIdentity,
        p_RoutingAreaCode
      ),
      ? ) );

  //------------------------------------------------
  //Eutra_1Entry, reportQuantity rsrp
  //8.3.1.3, Step5, Step7
  //8.3.1.5, Step5, Step7
  //8.3.3.1, Step4
  template UL_DCCH_Message cr_MeasurementReport_Eutra_1Entry_rsrp(
                             template integer p_MeasId,
                             template PhysCellId p_PhysCellId ) :=
  /* @status    APPROVED */
  cr_MeasurementReport(p_MeasId, ?, ?,
                       cr_MeasResultNeighCells_measResultListEUTRA_1Entry( p_PhysCellId, omit, ?, omit ) );

  //------------------------------------------------
  //Eutra_1Entry, reportQuantity both
  //8.3.1.9, Step3a2, Step5, Step8a4, Step10
  //8.3.1.10, Step4, Step6, Step12, Step14 //To Be Checked (Prose Error)!!!! Since the <reportQuantity> set to "sameAsTriggerQuantity", UE won't report <rsrqResult>!
  //8.3.1.11, Step3a2, Step5, Step14, Step15a4 //To Be Checked (Prose Error)!!!! Since the <reportQuantity> set to "sameAsTriggerQuantity", UE won't report <rsrqResult>!
  template UL_DCCH_Message cr_MeasurementReport_Eutra_1Entry_both(template integer p_MeasId,
                                                                  template PhysCellId p_PhysCellId) :=
  /* @status    APPROVED */
  cr_MeasurementReport(
    p_MeasId, ?, ?,
    cr_MeasResultNeighCells_measResultListEUTRA_1Entry( p_PhysCellId, omit, ?, ? ) );

  //------------------------------------------------
  //Eutra_2Entries, reportQuantity both
  //8.3.1.4, Step6
  template UL_DCCH_Message cr_MeasurementReport_Eutra_2Entries_both(
                             template integer p_MeasId,
                             template PhysCellId p_PhysCellId_1,
                             template PhysCellId p_PhysCellId_2 ) :=
  cr_MeasurementReport(
    p_MeasId, ?, ?,
    cr_MeasResultNeighCells_measResultListEUTRA_2Entries(
      p_PhysCellId_1, omit, ?, ?,
      p_PhysCellId_2, omit, ?, ? ) );

  //------------------------------------------------
  //Geran_1Entry
  //8.3.2.1, Step5
  //8.3.2.2, Step5, Step8
  //8.3.2.6, PB3
  template UL_DCCH_Message cr_MeasurementReport_Geran_1Entry(
                             template integer p_MeasId,
                             template PhysCellIdGERAN p_PhysCellId ) :=
  cr_MeasurementReport(
    p_MeasId, ?, ?,
    cr_MeasResultNeighCells_measResultListGERAN_1Entry( *, *, p_PhysCellId, omit, ? ) );

  //------------------------------------------------
  //Utran_1Entry: FDD
  //8.3.2.3, Step5
  //8.3.2.4, Step3, Step9
  //8.3.2.6, PB2
  //8.3.3.2, Step4
  template UL_DCCH_Message cr_MeasurementReport_Utran_1Entry_FDD(
                             template integer p_MeasId,
                             template PhysCellIdUTRA_FDD p_PhysCellId ) :=
  cr_MeasurementReport(
    p_MeasId, ?, ?,
    cr_MeasResultNeighCells_measResultListUTRA_1Entry_FDD( p_PhysCellId, omit, omit, ? ) );

  //Utran_1Entry: TDD
  //8.3.2.3, Step5
  //8.3.2.4, Step3, Step9
  //8.3.2.6, PB2
  //8.3.3.2, Step4
  template UL_DCCH_Message cr_MeasurementReport_Utran_1Entry_TDD(
                             template integer p_MeasId,
                             template PhysCellIdUTRA_TDD p_PhysCellId ) :=
  cr_MeasurementReport(
    p_MeasId, ?, ?,
    cr_MeasResultNeighCells_measResultListUTRA_1Entry_TDD( p_PhysCellId, omit, ?, omit ) );

  //------------------------------------------------
  //Utran_2Entries: FDD
  //8.3.2.4, Step6
  template UL_DCCH_Message cr_MeasurementReport_Utran_2Entries_FDD(
                             template integer p_MeasId,
                             template PhysCellIdUTRA_FDD p_PhysCellId_1,
                             template PhysCellIdUTRA_FDD p_PhysCellId_2 ) :=
  cr_MeasurementReport(
    p_MeasId, ?, ?,
    cr_MeasResultNeighCells_measResultListUTRA_2Entries_FDD(
      p_PhysCellId_1, omit, omit, ?,
      p_PhysCellId_2, omit, omit, ? ) );

  //Utran_2Entries: TDD
  //8.3.2.4, Step6
  template UL_DCCH_Message cr_MeasurementReport_Utran_2Entries_TDD(
                             template integer p_MeasId,
                             template PhysCellIdUTRA_TDD p_PhysCellId_1,
                             template PhysCellIdUTRA_TDD p_PhysCellId_2 ) :=
  cr_MeasurementReport(
    p_MeasId, ?, ?,
    cr_MeasResultNeighCells_measResultListUTRA_2Entries_TDD(
      p_PhysCellId_1, omit, ?, omit,
      p_PhysCellId_2, omit, ?, omit ) );

} //end of module
