/******************************************************************************/
// @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-15 17:58:51 +0200 (Wed, 15 Sep 2010) $
// $Rev: 3904 $
/******************************************************************************/

module UTRAN_RAB_Templates {

//----------------------------------------------------------------------
// 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 CommonDefs all;

  import from NAS_CommonTypeDefs all;
  import from NAS_CommonTemplates all;
  import from NAS_24008Templates all;
  import from NAS_24008TypeDefs all;

  import from UTRAN_TypeDefs all;
  import from UTRAN_ASN1_Templates all;
  import from UTRAN_Templates all;

//--------------------------------------------
// Constants
//--------------------------------------------

  const TimeslotNumber_LCR_r4    tsc_DL_TS_SCCH   := 5;
  const UL_TS_ChannelisationCode tsc_UL_DPCH1_ChC_64k_PS := cc1_1;               // FFS - TDD. Value must be checked
  const SF512_AndCodeNumber      tsc_DL_DPCH1_ChC_64k_PS := { sf32 := 0 };       // Channelization code for tsc_DL_DPCH1 for a 64 kbps PS configuration
  const DL_TxPower               tsc_DL_TxPower_DPCH_64k := -2;                  // down link transmit power level of DPCH used 64 KBPS PS RAB's
  const SF512_AndPilot           tsc_DL_DPCH1_SFP_64k_PS := { sfd32 := NULL };   // Spreading factor and pilot bits
  const SpreadingFactor          tsc_UL_DPDCH_SF_64k_PS := sf16;                 // Channelization code for UL DPDCH for a 64 kbps PS configuration
  const integer                  tsc_Mui := 0;
  const MaxAllowedUL_TX_Power    tsc_MaxAllowPwr := 33;
  const TimeslotNumber           tsc_UL_TS_SICH := 0;                            // FFS - value need to be confirmed
  const HS_SCCH_Codes            tsc_HS_SCCH_ChC7 := 7;                          // Channelization code for HS-SCCH
  const SF512_AndCodeNumber      tsc_Sfc256_C0 := { sf256 := 0 };
  const SF512_AndPilot           tsc_DL_DPCH1_SFP_SRB_3_4k := { sfd256 := pb4 };
  const DL_TxPower               tsc_DL_hs_SCCH_TxPower := 3;                    // Channel power for HS-SCCH relative to CPICH.
                                                                                 // Default value is +3dB
  const DL_TxPower               tsc_DL_hs_PDSCH_TxPower := 7;                   // Channel power for HS-PDSCH relative to CPICH.
                                                                                 // Default value is +7dB
  const B8_Type                  tsc_RAB_DefCS := '00000001'B;                   // Default RAB Id for the CS domain
  const SF512_AndPilot           tsc_DL_DPCH1_SFP_Speech := { sfd128 := pb4 };   // Spreading factor and pilot bits for tsc_DL_DPCH1 for a speech configuration
  const SpreadingFactor          tsc_UL_DPDCH_SF_Speech := sf64;                 // Channelization code for UL DPDCH for a speech configuration
  const SF512_AndCodeNumber      tsc_DL_DPCH1_ChC_Speech := { sf128 := 0 };      // Channelization code for tsc_DL_DPCH1 for a speech configuration

//----------------------------------------------------------------------
// Start: Templates used by all RAB establishment procedures
// Reference: 4.8.3 Table 4.8.3-1
//----------------------------------------------------------------------

  template (value) TFCS cs_TFCS_Cmpl0_1_2_3_4_5_6_7_8_9_Rx :=
  { /* Values according to condition A3 in TS 34.108 clause 9.1.1: DL Transport channel information common for all transport channel */
    normalTFCI_Signalling := {
      complete := {
        ctfcSize := {
          ctfc4Bit := {
            {
              ctfc4 := 0,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 1,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 2,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 3,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 4,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 5,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 6,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 7,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 8,
              powerOffsetInformation := omit
            },
            {
              ctfc4 := 9,
              powerOffsetInformation := omit
            }
          }
        }
      }
    }
  };

  template (value) TFCS cs_TFCS_Cmpl0_1_2_3_4_5_6_7_8_9_Tx ( template (value) PowerOffsetInformation p_PowerOffsetInformation ) :=
  {
    normalTFCI_Signalling := {
      complete := {
        ctfcSize := {
          ctfc4Bit := {
            {
              ctfc4 := 0,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 1,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 2,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 3,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 4,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 5,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 6,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 7,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 8,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc4 := 9,
              powerOffsetInformation := p_PowerOffsetInformation
            }
          }
        }
      }
    }
  };

  template (value) TrCH_LogCHMappingList1 cs_TrLogMappingUL_4DCCH_1DTCH ( integer p_RB_Identity ):=
  {
    ulconnectedTrCHList := {
      {
        trchid := tsc_UL_DCH1,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DTCH1,
                logicalChannelType := dTCH
              }
            },
            rB_Identity := p_RB_Identity,//tsc_RB20 for PS RAB, tsc_RB25 for HSDPA RAB
            cn_DomainIdentity := omit
          }
        }
      },
      {
        trchid := tsc_UL_DCH5,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DCCH1,
                logicalChannelType := dCCH
              }
            },
            rB_Identity := tsc_RB1,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DCCH2,
                logicalChannelType := dCCH
              }
            },
            rB_Identity := tsc_RB2,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DCCH3,
                logicalChannelType := dCCH
              }
            },
            rB_Identity := tsc_RB3,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DCCH4,
                logicalChannelType := dCCH
              }
            },
            rB_Identity := tsc_RB4,
            cn_DomainIdentity := omit
          }
        }
      }
    },
    dlconnectedTrCHList := omit,
    dlconnectedMACdFlows := omit,
    dlconnectedMAC_ehsFlows := omit,
    dlconnectedMAC_ehsCommonFlows := omit,
    dlconnectedMAC_ehsCommonFlowsDC := omit
  };

  template U_CMAC_CONFIG_CNF car_CMAC_MACHs_CfgCnf ( UTRAN_CellId_Type p_CellId ) :=
  {
    tfrc := {
      cellId := p_CellId
    }
  };

  //* @desc Template is used for storing the QoS values (function f_UTRAN_InitialiseQoS)
  // and as the sending template in function f_UTRAN_SendActivatePDP_Accept_DCH
  template (value) QualityOfService cs_QoS_InteractiveOrBackgroundMT_HS ( template (value) B3_Type p_DelayClass,
                                                                          template (value) B3_Type p_TrafficClass,
                                                                          template (value) B4_Type p_PeakThroughput,
                                                                          template (value) B8_Type p_MaxSduSize,
                                                                          template (value) B8_Type p_BitRateUL,
                                                                          template (value) B8_Type p_BitRateDL,
                                                                          template (omit) B8_Type p_BitRateExt ) := {
    iei              := omit,
    iel              := '0C'O,
    spare1           := '00'B,
    delayClass       := p_DelayClass,
    relabilityClass  := '011'B,                       //Unacknowledged GTP, LLC, and acknowledged RLC; Protected Data
    peakThroughput   := p_PeakThroughput,
    spare2           := '0'B,
    precedenceClass  := '011'B,
    spare3           := '000'B,
    meanThroughput   := '11111'B,                     //Best effort
    trafficClass     := p_TrafficClass,
    deliveryOrder    := '10'B,                        // Without delivery order
    deliveryErrorSDU := '010'B,
    maxSduSize       := p_MaxSduSize,
    maxBitRateUL     := p_BitRateUL,                  // 64 kbps
    maxBitRateDL     := p_BitRateDL,                  // Depending on UE Category
    residualBER      := '0111'B,                      // 1 x 10E (-5)
    sduErrorRatio    := '0100'B,                      // 1 X 10 E(-4)
    transferDelay    := '111111'B,
    trafficHandlingPrio := '11'B,                     // This is set to 3, but has to be neglected by the UE as the traffic class is interactive.
    guaranteedBitRateUL := '00010000'B,               // The guaranteed bit rate is set equal to 16 kbps
    guaranteedBitRateDL := '00010000'B,               // The guaranteed bit rate is set equal to 16 kbps
    spare4          := '000'B,
    signallingInd   := '0'B,                          // Not optimised for signalling
    sourceStatisticsDescriptor := '0000'B,
    maxBitRateDL_Ext           := p_BitRateExt,
    guaranteedBitRateDL_Ext    := p_BitRateExt,
    maxBitRateUL_Ext           := omit,
    guaranteedBitRateUL_Ext    := omit
  };

  //* @desc ASN.1 PDU Constraint where START value  is omitted
  //* @param p_Count_C_ActivationTime : The presence of this IE depends on the following 2 factors: (a) There exists RB(s) mapped to RLC-TM and (b) UE is transiting to CELL_DCH state after the RB establishment procedure. Else, this IE is absent
  //* @param p_RB_ActivationTimeInfoList : If ciphering is not activated in RADIO BEARER SETUP message, this IE must be absent. Else, SS checks this IE for the presence of activation times of all ciphered uplink RLC-UM and RLC-AM RBs
  template UL_DCCH_Message cdr_RRC_RB_SetUpCmplNoStartVal ( RRC_TransactionIdentifier p_RRC_Ti ) modifies cr_108_RB_SetUpCmpl :=
  {
    integrityCheckInfo := *,
    message_ := {
      radioBearerSetupComplete := {
        rrc_TransactionIdentifier := p_RRC_Ti,
        ul_IntegProtActivationInfo := *,
        ul_TimingAdvance := *,
        start_Value := omit
      }
    }
  };

  template (value) SS_ActivationTime cas_ActivateCNF ( ActivationTime p_ActTime ) :=
  {
    activationCFN := p_ActTime
  };

  //* @desc ASN.1 PDU Constraint defined in TS 34.108 clause 9.
  //* @param p_Count_C_ActivationTime : The presence of this IE depends on the following 2 factors: (a) There exists RB(s) mapped to RLC-TM and (b) UE is transiting to CELL_DCH state after the RB establishment procedure. Else, this IE is absent
  //* @param p_RB_ActivationTimeInfoList : If ciphering is not activated in RADIO BEARER SETUP message, this IE must be absent. Else, SS checks this IE for the presence of activation times of all ciphered uplink RLC-UM and RLC-AM RBs
  template UL_DCCH_Message cr_108_RB_SetUpCmpl ( RRC_TransactionIdentifier p_RRC_Ti ) :=
  {
    integrityCheckInfo := *,
    message_ := {
      radioBearerSetupComplete := {
        rrc_TransactionIdentifier := p_RRC_Ti,
        ul_IntegProtActivationInfo := *,
        ul_TimingAdvance := *,
        start_Value := ?,
        count_C_ActivationTime := *,
        dummy := *,
        ul_CounterSynchronisationInfo := *,
        laterNonCriticalExtensions := {
          radioBearerSetupComplete_r3_add_ext := *,
          v770NonCriticalExtensions := {
            radioBearerSetupComplete_v770ext := {
              ext_UL_TimingAdvance := *,
              deferredMeasurementControlReading := *
            },
            nonCriticalExtensions := *
          }
        }
      }
    }
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList20_24 ( RLC_SequenceNumber p_RLC_SN20,
                                                                          RLC_SequenceNumber p_RLC_SN24 ) :=
  {
    cs_RB_ActTimeInfo( tsc_RB20, p_RLC_SN20 ),
    cs_RB_ActTimeInfo( tsc_RB24, p_RLC_SN24 )
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList25 ( RLC_SequenceNumber p_RLC_SN25 ) :=
  {
    cs_RB_ActTimeInfo( tsc_RB25, p_RLC_SN25 )
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList25_17 ( RLC_SequenceNumber p_RLC_SN25,
                                                                          RLC_SequenceNumber p_RLC_SN17 ) :=
  {
    cs_RB_ActTimeInfo ( tsc_RB25, p_RLC_SN25 ),
    cs_RB_ActTimeInfo ( tsc_RB17, p_RLC_SN17 )
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList25_27 ( RLC_SequenceNumber p_RLC_SN25,
                                                                          RLC_SequenceNumber p_RLC_SN27 ) :=
  {
    cs_RB_ActTimeInfo ( tsc_RB25, p_RLC_SN25 ),
    cs_RB_ActTimeInfo ( tsc_RB27, p_RLC_SN27 )
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList25_17_27 ( RLC_SequenceNumber p_RLC_SN25,
                                                                             RLC_SequenceNumber p_RLC_SN17,
                                                                             RLC_SequenceNumber p_RLC_SN27 ) :=
  {
    cs_RB_ActTimeInfo( tsc_RB25, p_RLC_SN25 ),
    cs_RB_ActTimeInfo( tsc_RB17, p_RLC_SN17 ),
    cs_RB_ActTimeInfo( tsc_RB27, p_RLC_SN27 )
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList20 ( RLC_SequenceNumber p_RLC_SN20 ) :=
  {
    cs_RB_ActTimeInfo( tsc_RB20, p_RLC_SN20 )
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList20_22 ( RLC_SequenceNumber p_RLC_SN20,
                                                                          RLC_SequenceNumber p_RLC_SN22 ) :=
  {
    cs_RB_ActTimeInfo ( tsc_RB20, p_RLC_SN20 ),
    cs_RB_ActTimeInfo ( tsc_RB22, p_RLC_SN22 )
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList20_21 ( RLC_SequenceNumber p_RLC_SN20,
                                                                          RLC_SequenceNumber p_RLC_SN21 ) :=
  {
    cs_RB_ActTimeInfo ( tsc_RB20, p_RLC_SN20 ),
    cs_RB_ActTimeInfo ( tsc_RB21, p_RLC_SN21 )
  };

  template (value) RB_ActivationTimeInfoList cs_RB_ActTimeInfoList21 ( RLC_SequenceNumber p_RLC_SN21 ) :=
  {
    cs_RB_ActTimeInfo( tsc_RB21, p_RLC_SN21 )
  };

  template U_RLC_AM_IND car_AM_DataMuiCnf ( UTRAN_CellId_Type p_CellId,
                                                integer           p_RB,
                                                Mui               p_Mui) :=
  {
    cnf := {
      cellId := p_CellId,
      routingInfo := {
        rB_Identity := p_RB
      },
      mui := p_Mui
    }
  };

  template (value) LLC_SAPI cs_LLC_SAPI_UMTS_GSM :=
  {
    iei             := omit,
    spare           := '0000'B,
    llcSapiValue    := '0011'B
  };

  type record UTRAN_CFN_Info_Type {
    integer        frameNumber,
    ActivationTime actTime,
    TGCFN          tGCFN
  };

  template RRCDataIndType cr_U_ActPDP_ContextReqMo ( template (present) QualityOfService p_QualityOfService ) :=
  {
    activatePDPContextRequestul := cr_ActPDP_ContextReqMO_Common ( p_QualityOfService )
  };

  template (value) RLC_Info_r7 cs_RLC_InfoAM_Def :=
  {
    ul_RLC_Mode := {
      ul_AM_RLC_Mode := cs_UL_AM_RLC
    },
    dl_RLC_Mode := {
      dl_AM_RLC_Mode := cs_DL_AM_RLC_r7
    },
    rlc_OneSidedReEst := false,
    altE_bitInterpretation := omit,// not specified in RADIO BEARER SETUP acc. to TS 34.108 ch 9
    useSpecialValueOfHEField := omit//default false
  };

  template (value) U_RNTI_Short cs_URNTI_Short :=
  {
    srnc_Identity := '000000000001'B,
    s_RNTI_2 := '0000000001'B
  };

//----------------------------------------------------------------------
// Stop: Templates used by all RAB establishment procedures
//----------------------------------------------------------------------

//----------------------------------------------------------------------
// Start: Templates used for PS RAB
// Reference: 36.508 cl. 4.8.3 Table 4.8.3-1
// UTRA PS RB TS 34.108 subclause 6.10.2.4.1.26
// Interactive or background / UL:64 DL: 64 kbps / PS RAB + UL:3.4 DL:3.4 kbps SRBs for DCCH
//----------------------------------------------------------------------

  //* @desc ASN.1 Type Constraint.
  //* Transport format set for transport channel used in CreateCell_DCH_64kPS_RAB_SRB for message sent to UE
  //* 3GPP TS 34.108 clause 6.10.2.4.1.24
  //* TTI = 20 ms;
  //* 5 transport formats:
  //* TB size always=336 bits; TransportBlocks = 0,1,2,3 and 4 ;
  //* rlsc_Size = TB_Size ( DCH, w/o MUX)
  //* coding = turbo;
  //* CRCsize = 16;
  //* RateMatching = 150
  template (value) DedicatedTransChTFS cs_DCH_336_TFS_UE :=
  {
    tti := {
      tti20 := {
        {
          rlc_Size := {
            octetModeType1 := {
              sizeType2 := {
                part1 := 2,
                part2 := omit
              }
            }
          },
          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) UL_AddReconfTransChInfoList_r8 cs_UL_AddReconfTransChInfoListDCH_PS_64k :=
  { /* Values according to the condition A3 in TS 34.108 clause 9.1.1: Added or Reconfigured UL TrCH information */
    {
      dch_usch := {
        ul_TransportChannelType := dch,
        transportChannelIdentity := tsc_UL_DCH1,//identity for transport channel DCH1 (uplink) = 1
        transportFormatSet := {
          dedicatedTransChTFS := cs_DCH_336_TFS_UE
        }
      }
    },
    {
      dch_usch := {
        ul_TransportChannelType := dch,
        transportChannelIdentity := tsc_UL_DCH5,
        transportFormatSet := {
          dedicatedTransChTFS := cs_DCH_148_TFS_UE_UL
        }
      }
    }
  };

  template (value) RAB_InformationSetup_r8 cs_RAB_InfoSetupDCH_PS_64k ( template (value) RLC_Info_r7 p_RLC_Info ) :=
  { /* Values according to 34.108 cl. 9.1.1 Message RADIO BEARER SETUP message: AM or UM using condition A3 */
    rab_Info := {
      rab_Identity := {
        gsm_MAP_RAB_Identity := '00000101'B
      },
      mbms_SessionIdentity := omit,
      mbms_ServiceIdentity := omit,
      cn_DomainIdentity := ps_domain,
      nas_Synchronisation_Indicator := omit,
      re_EstablishmentTimer := useT315
    },
    cs_HSPA_Information := omit,
    rab_InfoReplace := omit,
    rb_InformationSetupList := {//RB-InformationSetupList-r8
      { //First instance of RB-InformationSetup-r8
        rb_Identity := tsc_RB20,
        pdcp_Info := {
          losslessSRNS_RelocSupport := {
            notSupported := NULL
          },
          pdcp_PDU_Header := absent,
          headerCompressionInfoList := omit
        },
        rlc_InfoChoice := {
          rlc_Info := p_RLC_Info
        },
        rb_MappingInfo := {//RB-MappingInfo-r8
          { //First instance of RB-MappingOption-r8
            ul_LogicalChannelMappings := {//UL-LogicalChannelMappings-r8
              oneLogicalChannel := {//UL-LogicalChannelMapping-r8
                ul_TrCH_Type := {
                  dch_rach_usch := {
                    ul_TransportChannelType := {
                      dch := tsc_UL_DCH1
                    },
                    logicalChannelIdentity := omit,
                    rlc_SizeList := {
                      configured := NULL
                    }
                  }
                },
                mac_LogicalChannelPriority := 8
              }
            },
            dl_LogicalChannelMappingList := {
              {
                dl_TransportChannelType := {
                  dch := tsc_DL_DCH1//DL DCH Transport channel identity := 6
                },
                logicalChannelIdentity := omit
              }
            }
          },
          {
            // RB_MappingInfo
            ul_LogicalChannelMappings := {
              oneLogicalChannel := {
                ul_TrCH_Type := {
                  dch_rach_usch := {
                    // UL_LogicalChannelMapping,
                    ul_TransportChannelType := {
                      rach := NULL
                    },
                    logicalChannelIdentity := tsc_UL_DTCH1,//Logical channel identity := 7
                      rlc_SizeList := {
                      explicitList := {
                        {
                          rlc_SizeIndex := 2//Reference to clause 6 Parameter Set in 34.108
                        }
                      }
                    }
                  }
                },
                mac_LogicalChannelPriority := 8
              }
            },
            dl_LogicalChannelMappingList := {
              {
                dl_TransportChannelType := {
                  fach := NULL
                },
                logicalChannelIdentity := tsc_DL_DTCH1
              }
            }
          }
        }
      }
    }
  };

//----------------------------------------------------------------------
// Stop: Templates used for PS RAB
//----------------------------------------------------------------------

//----------------------------------------------------------------------
// Start: Templates used for HSDPA RAB
// Reference: 36.508 cl. 4.8.3 Table 4.8.3-1
// UTRA HSDPA RB TS 34.108 subclause 6.10.2.4.5.1
// Interactive or background / UL:64 DL: [max bit rate depending on UE category] / PS RAB + UL:3.4 DL:3.4 kbps SRBs for DCCH
//----------------------------------------------------------------------

  template (value) TrCH_LogCHMappingList1 cs_TrLogMappingDL_MAC_HS :=
  {
    ulconnectedTrCHList := omit,
    dlconnectedTrCHList := omit,
    dlconnectedMACdFlows := {
      {
        mac_dFlowId := 0,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              dl_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                dl_TransportChannelType := hsdsch,
                logicalChannelIdentity := tsc_DL_DTCH1,
                logicalChannelType := dTCH,
                rlc_SizeList := {
                  explicitList := {
                    {
                      rlc_SizeIndex := 1
                    }
                  }
                },
                mac_LogicalChannelPriority := 8
              }
            },
            rB_Identity := tsc_RB25,
            cn_DomainIdentity := ps_domain
          }
        }
      }
    },
    dlconnectedMAC_ehsFlows := omit,
    dlconnectedMAC_ehsCommonFlows := omit,
    dlconnectedMAC_ehsCommonFlowsDC := omit
  };

  template (value) SS_AddOrReconfMAC_dFlow cs_SS_AddOrReconfMAC_dFlow ( template (value) SS_MAC_hs_AddReconfQueue p_SS_MAC_hs_AddReconfQueue ) :=
  {
    mac_hs_AddReconfQueue_List := {
      {
        mac_hs_AddReconfQueue := p_SS_MAC_hs_AddReconfQueue
      }
    },
    mac_hs_DelQueue_List := omit
  };

  template (value) SS_MAC_hs_AddReconfQueue cs_SS_MAC_hs_AddReconfQueue ( template (value) MAC_hs_AddReconfQueue p_MAC_hs_AddReconfQueue ) :=
  {
    mAChsAddReconfQueue := p_MAC_hs_AddReconfQueue,
    logicalChannelList := {
      tsc_DL_DTCH1
    },
    priority := 0,
    discardTimer := omit
  };

  template (value) RB_LogCH_Mapping cs_RB25_LogChMapping := {
    uLlogicalChannelIdentity := tsc_UL_DTCH1,
    dLlogicalChannelIdentity := tsc_DL_DTCH1,
    logicalChannelType := omit,
    cn_DomainIdentity := omit
  };

  template (value) HS_DSCHMACdFlows cs_HS_DSCHMacdFlows ( template (value) HARQ_Info_r7 p_HARQ_Info,
                                                          template (value) SS_AddOrReconfMAC_dFlow p_SS_AddOrReconfMAC_dFlow ) :=
  {
    harqInfo := omit,
    addOrReconfMACdFlow := p_SS_AddOrReconfMAC_dFlow,
    ackNackRepetitionFactor := omit,
    harqInfo_r7 := p_HARQ_Info
  };



  template (value) TrChConfigType cs_TrChConfigTypeNonDCH :=
  {
    nonDch := NULL
  };

  template (value) HS_PDSCHInfo_r5OrLater cs_DL_Cell_DCH_HS_DSCH_PS_RAB ( HSDSCH_physical_layer_category             p_HSDSCH_physical_layer_category,
                                                                          template (value) DL_HSPDSCH_Information_r8 p_DL_HSPDSCH_Information_r8,
                                                                          boolean                                    p_Sttd_Indicator ) :=
  {
    r8 := {
      hS_PDSCH_Info := {
        hSDSCHPhysicalLayerCategory := p_HSDSCH_physical_layer_category,
        hsdsch_physical_layer_category_ext := omit,//Since mach-ehs is not configured
        hsdsch_physical_layer_category_ext2 := omit,//Since dual cell is not configured
        h_RNTI := '1010101010101010'B,
        dlHSPDSCHInformation := p_DL_HSPDSCH_Information_r8,
        sttd_Indicator := p_Sttd_Indicator,
        hs_SCCH_TxPower := tsc_DL_hs_SCCH_TxPower,
        ss_DTX_Info := omit,
        hs_scch_LessInfo := omit,
        mimo_Parameters := omit,
        hs_DPCCHToFollow := omit // DEFAULT TRUE
      }
    }
  };

  template (value) RLC_Info_r7 cs_RLC_InfoAM_Def_HSDPA :=
  {
    ul_RLC_Mode := {
      ul_AM_RLC_Mode := cds_UL_AM_RLC_HSDPA
    },
    dl_RLC_Mode := {
      dl_AM_RLC_Mode := cds_DL_AM_RLC_HSDPA
    },
    rlc_OneSidedReEst := false,
    altE_bitInterpretation := omit,// not specified in RADIO BEARER SETUP acc. to TS 34.108 ch 9
    useSpecialValueOfHEField := omit//default false
  };

  template (value) DL_AM_RLC_Mode_r7 cds_DL_AM_RLC_HSDPA modifies cs_DL_AM_RLC_r7 :=
  {
    dl_RLC_PDU_size := {
      fixedSize := {
        sizeType2 := {
          part1 := 2,
          part2 := omit
        }
      }
    },    // 336 (320 Payload + 16 bit header)
    receivingWindowSize := rw768,
    dl_RLC_StatusInfo := {
      timerStatusProhibit := tsp100
    }
  };

  template (value) UL_AM_RLC_Mode cds_UL_AM_RLC_HSDPA modifies cs_UL_AM_RLC := {
    pollingInfo := {
      timerPollProhibit := tpp100,
      timerPoll := tp100
    }
  };

  template (value) RAB_InformationSetup_r8 cs_RAB_InfoSetupDCH_PS_HSDPA ( template (value) RLC_Info_r7 p_RLC_Info ) :=
  {
    rab_Info := {
      rab_Identity := {
        gsm_MAP_RAB_Identity := '00000101'B//FFS - this value must be taken from 36.508 or 34.108 cl. 9.1.1
      },
      mbms_SessionIdentity := omit,//FFS - Not specified in message
      mbms_ServiceIdentity := omit,//FFS - Not specified in message
      cn_DomainIdentity := ps_domain,
      nas_Synchronisation_Indicator := omit,
      re_EstablishmentTimer := useT315//FFS - this value can be taken from 34.108 cl. 9.1.1
    },
    cs_HSPA_Information := omit,//FFS - Check value
    rab_InfoReplace := omit,//FFS - Check value
    rb_InformationSetupList := {
      {
        rb_Identity := tsc_RB25,
        pdcp_Info := {
          losslessSRNS_RelocSupport := {
            notSupported := NULL
          },
          pdcp_PDU_Header := absent,
          headerCompressionInfoList := omit
        },
        rlc_InfoChoice := {
          rlc_Info := p_RLC_Info
        },
        rb_MappingInfo := {
          {
            ul_LogicalChannelMappings := {
              oneLogicalChannel := {
                ul_TrCH_Type := {
                  dch_rach_usch := {
                    ul_TransportChannelType := {
                      dch := tsc_UL_DCH1
                    },
                    logicalChannelIdentity := omit,
                    rlc_SizeList := {
                      configured := NULL
                    }
                  }
                },
                mac_LogicalChannelPriority := 8
              }
            },
            dl_LogicalChannelMappingList := {
              {
                dl_TransportChannelType := {
                  dch := tsc_DL_DCH1
                },
                logicalChannelIdentity := omit
              }
            }
          },
          {
            ul_LogicalChannelMappings := {
              oneLogicalChannel := {
                ul_TrCH_Type := {
                  dch_rach_usch := {
                    ul_TransportChannelType := {
                      dch := tsc_UL_DCH1
                    },
                    logicalChannelIdentity := omit,
                    rlc_SizeList := {
                      configured := NULL
                    }
                  }
                },
                mac_LogicalChannelPriority := 8
              }
            },
            dl_LogicalChannelMappingList := {
              {
                dl_TransportChannelType := {
                  hsdsch := {
                    mac_hs := 0
                  }
                },
                logicalChannelIdentity := omit
              }
            }
          },
          {
            // RB_MappingInfo
            ul_LogicalChannelMappings := {
              oneLogicalChannel := {
                ul_TrCH_Type := {
                  dch_rach_usch := {
                    // UL_LogicalChannelMapping,
                    ul_TransportChannelType := {
                      rach := NULL
                    },
                    logicalChannelIdentity := tsc_UL_DTCH1,
                    rlc_SizeList := {
                      explicitList := {
                        {
                          rlc_SizeIndex := 2
                        }
                      }
                    }
                  }
                },
                mac_LogicalChannelPriority := 8
              }
            },
            dl_LogicalChannelMappingList := {
              {
                dl_TransportChannelType := {
                  fach := NULL
                },
                logicalChannelIdentity := tsc_DL_DTCH1
              }
            }
          }
        }
      }
    }
  };

  template (value) Measurement_Feedback_Info_r7 cs_Measurement_Feedback_Info :=
  {
    modeSpecificInfo := {
      fdd := {
        measurementPowerOffset := 12, // Actual measurement power offset value = IE value * 0.5
        feedback_cycle := fc4,        // Feedback cycle
        cqi_RepetitionFactor := 1,    // According to 34.108 cl. 9.1.1 RADIO BEARER SETUP
        deltaCQI := 5
      }
    }
  };

  template (value) AddOrReconfMAC_dFlow cs_AddOrReconfMAC_dFlow ( template (value) MAC_hs_AddReconfQueue p_MAC_hs_AddReconfQueue ) :=
  {
    mac_hs_AddReconfQueue_List := {
      p_MAC_hs_AddReconfQueue
    },
    mac_hs_DelQueue_List := omit
  };

  template (value) MAC_hs_AddReconfQueue cs_MAC_hs_AddReconfQueue336 :=
  {
    mac_hsQueueId := 0,
    mac_dFlowId := 0,
    reorderingReleaseTimer := rt50,
    mac_hsWindowSize := mws16,
    mac_d_PDU_SizeInfo_List := {
      {
        mac_d_PDU_Size := 336,
        mac_d_PDU_Index := 0
      }
    }
  };

  template (value) DL_AddReconfTransChInformation_r7 cds_DL_AddReconfTransChInfoSameUL_HSDPA ( TransportChannelIdentity p_DlTrChId,
                                                                                               TransportChannelIdentity p_UlTrChId )
    modifies cs_DL_AddReconfTransChInfo_r7 :=
  {
    dch_QualityTarget := {
      bler_QualityValue := -20    // Actual Value = IE Value * 0.1
    }
  };

  template (value) DL_AddReconfTransChInformation_r7 cs_DL_AddReconfTransChInfoDCH_PS_TFCS_01_HSDPA ( TransportChannelIdentity p_TrchID ) :=
  {
    dl_TransportChannelType := {
      dch := p_TrchID
    },
    tfs_SignallingMode := {
      explicit_config := {
        dedicatedTransChTFS := cds_DCH_336_TFS_0_UE
      }
    },
    dch_QualityTarget := {
      bler_QualityValue := -20    // Actual Value = IE Value * 0.1
    }
  };

  template (value) DedicatedTransChTFS cds_DCH_336_TFS_0_UE modifies cs_DCH_336_TFS_UE := {
    tti := {
      tti20 := {
        [0]:={
          numberOfTbSizeList := {
            { zero := NULL }
          }
        }
      }
    }
  };

  template (value) DL_AddReconfTransChInformation_r7 cs_DL_AddReconfTransChHSDSCHInfo_HSDPA ( template (value) HSDSCH_Info_r7 p_HSDSCH_Info ) :=
  {
    dl_TransportChannelType := {
      hsdsch := NULL
    },
    tfs_SignallingMode := {
      hsdsch := p_HSDSCH_Info
    },
    dch_QualityTarget := omit
  };

  template (value) HSDSCH_Info_r7 cs_HSDSCH_Info ( template (value) HARQ_Info_r7         p_HARQ_Info,
                                                   template (value) AddOrReconfMAC_dFlow p_AddOrReconfMAC_dFlow ) :=
  {
    harqInfo := p_HARQ_Info,
    dl_MAC_HeaderType := {
      mac_hs := p_AddOrReconfMAC_dFlow
    }
  };

  template QualityOfService cr_QoS_InteractiveOrBackgroundMO_HSDPA ( template B3_Type p_TrafficClass,
                                                                     template B8_Type p_MaxSduSize,
                                                                     template B8_Type p_BitRateDL ) :=
  {
    //From TTCN2 cr_QoS_InterOrBackgrdMO_lv_r5
    //Template is used as receiving template in function f_UTRAN_PS_SessionAct_ReceivePDP_Req
    iei              := omit,
    iel              := ('0C'O,'0E'O,'10'O),
    spare1           := '00'B,
    delayClass       := ?,
    relabilityClass  := ?,
    peakThroughput   := ?,
    spare2           := '0'B,
    precedenceClass  := ?,
    spare3           := '000'B,
    meanThroughput   := '11111'B,                     //Best effort
    trafficClass     := p_TrafficClass,
    deliveryOrder    := '10'B,                        // Without delivery order
    deliveryErrorSDU := '010'B,
    maxSduSize       := p_MaxSduSize,                 // 320 octets
    maxBitRateUL     := ?,                            // 64 kbps
    maxBitRateDL     := p_BitRateDL,                  // Depending on UE Category
    residualBER      := '0111'B,                      // 1 x 10E (-5)
    sduErrorRatio    := '0100'B,                      // 1 X 10 E(-4)
    transferDelay    := ?,
    trafficHandlingPrio := ?,
    guaranteedBitRateUL := ?,
    guaranteedBitRateDL := ?,
    spare4          := '000'B,
    signallingInd   := ?,
    sourceStatisticsDescriptor := ?,
    maxBitRateDL_Ext           := '00000000'B ifpresent,
    guaranteedBitRateDL_Ext    := '00000000'B ifpresent,
    maxBitRateUL_Ext           := '00000000'B ifpresent,
    guaranteedBitRateUL_Ext    := '00000000'B ifpresent
  };

  template QualityOfService cdr_QoS_InteractiveOrBackgroundMO_HSDPA_Ext ( template B3_Type p_TrafficClass,
                                                                          template B8_Type p_MaxSduSize,
                                                                          template B8_Type p_BitRateDL,
                                                                          template B8_Type p_MaxBitRate15 )
    modifies cr_QoS_InteractiveOrBackgroundMO_HSDPA := {
    //From TTCN2 cr_QoS_InterOrBackgrdMO_HS_Ext
    //Template is used as receiving template in function f_UTRAN_PS_SessionAct_ReceivePDP_Req
    iel              := ('0E'O,'10'O),
    maxBitRateDL_Ext           := p_MaxBitRate15,
    guaranteedBitRateDL_Ext    := ?,
    maxBitRateUL_Ext           := '00000000'B ifpresent,
    guaranteedBitRateUL_Ext    := '00000000'B ifpresent
  };

  template (value) DL_AM_RLC_Mode_r7 cs_DL_AM_RLC_SS_HSDPA :=
  {
    dl_RLC_PDU_size := {
      fixedSize := cs_OctetModeRLC_Size336
      },
    inSequenceDelivery := true,
    receivingWindowSize := rw768,
    dl_RLC_StatusInfo := {
      timerStatusProhibit := tsp100,
      dummy := omit,
      missingPDU_Indicator := true,
      timerStatusPeriodic := omit
    }
  };

//----------------------------------------------------------------------
// Stop: Templates used for HSDPA RAB
//----------------------------------------------------------------------

//----------------------------------------------------------------------
// Start: Templates used for HSPA RAB
// Reference: 36.508 cl. 4.8.3 Table 4.8.3-1
// UTRA HSUPA/HSDPA RB TS 34.108 subclause 6.10.2.4.6.3
// Streaming or interactive or background / UL: [max bit rate depending on UE category and TTI] DL: [max bit rate depending on UE category] / PS RAB + UL: [max bit rate depending on UE category and TTI] DL: [max bit rate depending on UE category] SRBs for DCCH on E-DCH and HS-DSCH
//----------------------------------------------------------------------

//----------------------------------------------------------------------
// Stop: Templates used for HSPA RAB
//----------------------------------------------------------------------

//----------------------------------------------------------------------
// Start: Templates used for SPEECH RAB
// Reference: 36.508 cl. 4.8.3 Table 4.8.3-1
// UTRA Speech  TS 34.108 subclause 6.10.2.4.1.4
// Conversational / speech / UL:12.2 DL:12.2 kbps / CS RAB + UL:3.4 DL:3.4 kbps SRBs for DCCH
//----------------------------------------------------------------------

  template (value) RRCDataReqType cs_U_CM_ServAcc :=
  {
    cmServiceAccept :=
    {
      skipIndicator := '0000'B,
      mMProtocolDiscriminator := '0101'B,
      msgType := '00100001'B
    }
  }

  template RRCDataIndType cr_U_ESetup ( template ESETUP p_Esetup ) :=
  {
    esetup := p_Esetup
  }

  template ESETUP cr_ESetup ( template Bcap p_Bcap ) :=
  {
    ti                       := cr_TI_MO,
    cC_ProtocolDiscriminator := '0011'B,
    msgType                  := '??001110'B,
    bcap                     := p_Bcap ifpresent,
    streamId                 := cr_StreamIdAny ifpresent,
    supportedCodecs          := cr_CodecListAny,
    emergCategory            := cr_ServCategoryAny ifpresent
  }

  template RRCDataIndType cr_U_ServReqAny_Common ( template (present) KeySeq p_KeySeq ) :=
  {
    cmServiceRequest := cr_CM_ServReqAny_Common ( p_KeySeq )
  }

  template (value) RRCDataReqType cs_U_CallProc ( template (value) TI p_TI ):=
  {
    callProceeding := cs_CallProc_Common ( p_TI )
  }

  template (value) RRCDataReqType cs_U_Alert ( template (value) TI p_TI ) :=
  {
    alertingdl := cs_Alert_Common ( p_TI )
  }

  template (value) RRCDataReqType cs_U_Connect ( template (value) TI p_TI ) :=
  {
    connectdl := cs_Connect_Common ( p_TI )
  }

  template RRCDataIndType cr_U_ConnAck ( template TI p_TI ) :=
  {
    connectAcknowledge := cr_ConnAck_Common ( p_TI )
  }

  template (value) RLC_Info_r7 cs_RLC_InfoTM_Def :=
  {
    ul_RLC_Mode := {
      ul_TM_RLC_Mode := {
        transmissionRLC_Discard := omit,
        segmentationIndication := false
      }
    },
    dl_RLC_Mode := {
      dl_TM_RLC_Mode := {
        segmentationIndication := false
      }
    },
    rlc_OneSidedReEst := false,
    altE_bitInterpretation := omit,
    useSpecialValueOfHEField := omit
  };

  template (value) RB_InformationSetup_r8 cs_RB_InformationSetup_SpeechFlow ( RB_Identity                p_RB_Identity,
                                                                              TransportChannelIdentity   p_UL_TransportChannelId,
                                                                              MAC_LogicalChannelPriority p_MAC_LogicalChannelPriority,
                                                                              TransportChannelIdentity   p_DL_TransportChannelId) :=
  {
    rb_Identity := p_RB_Identity,
    pdcp_Info := omit,
    rlc_InfoChoice := {
      rlc_Info := cs_RLC_InfoTM_Def
    },
    rb_MappingInfo := {
      {
        // RB_MappingInfo_r7
        ul_LogicalChannelMappings := {
          oneLogicalChannel := {
            ul_TrCH_Type := {
              dch_rach_usch := {
                ul_TransportChannelType := {
                  dch := p_UL_TransportChannelId
                },
                logicalChannelIdentity := omit,
                rlc_SizeList := {
                  configured := NULL
                }
              }
            },
            mac_LogicalChannelPriority := p_MAC_LogicalChannelPriority
          }
        },
        dl_LogicalChannelMappingList := {
          {
            dl_TransportChannelType := {
              dch := p_DL_TransportChannelId
            },
            logicalChannelIdentity := omit
          }
        }
      }
    }
  };

  template (value) RAB_InformationSetup_r8 cs_RAB_InfoSetupTM_12_2k ( Re_EstablishmentTimer p_ReEstTimer,
                                                                      bitstring p_RAB_Id ) :=
  {
    rab_Info := {
      rab_Identity := {
        gsm_MAP_RAB_Identity := p_RAB_Id
      },
      mbms_SessionIdentity          := omit,
      mbms_ServiceIdentity          := omit,
      cn_DomainIdentity             := cs_domain,
      nas_Synchronisation_Indicator := omit,
      re_EstablishmentTimer         := p_ReEstTimer
    },
    cs_HSPA_Information := omit,
    rab_InfoReplace := omit,
    rb_InformationSetupList := {
      // RB_InformationSetupList
      cs_RB_InformationSetup_SpeechFlow ( tsc_RB10, tsc_UL_DCH1, 6, tsc_DL_DCH1 ),
      cs_RB_InformationSetup_SpeechFlow ( tsc_RB11, tsc_UL_DCH2, 6, tsc_DL_DCH2 ),
      cs_RB_InformationSetup_SpeechFlow ( tsc_RB12, tsc_UL_DCH3, 6, tsc_DL_DCH3 )
    }
  };

  template (value) TFCS cs_TFCS_Cmpl0_1_11_12_13_23_Tx ( template (value) PowerOffsetInformation p_PowerOffsetInformation ) :=
  {
    normalTFCI_Signalling := {
      complete := {
        ctfcSize := {
          ctfc6Bit := {
            {
              ctfc6 := 0,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc6 := 1,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc6 := 11,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc6 := 12,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc6 := 13,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc6 := 23,
              powerOffsetInformation := p_PowerOffsetInformation
            }
          }
        }
      }
    }
  };

  // =============================================================================
  // ASN.1 Type Constraint
  // *** Comments:
  // transport format set for signalling bearer on dedicated channel used in message sent to UE
  // *** additional Notes:
  // TS 34.108  cl. 6.10.2.4.1.2:
  // TTI = 40 ms;
  // two transport formats:
  // TransportBlocks = 1, TB size = 148 bits; TansportBlock = 0, Size = 148.
  // rlc_Size = RLC PDU size = TB_Size -4 =144 bits.( DCH, w/ MUX)
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 16;
  // RateMatching = 170
  // -----------------------------------------------------------------------------
  template (value) DedicatedTransChTFS cs_DCH_148_TFS_UE_UL :=
  {
    tti := {
      tti40 := {
        {
          rlc_Size := {
            bitMode := {
              sizeType2 := {
                part1 := 2,
                part2 := omit
              }
            }
          },
          numberOfTbSizeList := {
            { zero := NULL },
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := third
      },
      rateMatchingAttribute := 170,
      crc_Size := crc16
    }
  };

  template (value) UL_AddReconfTransChInfoList_r8 cs_UL_AddReconfTransChInfoListTM_12_2k :=
  {
    {
      dch_usch := {
        ul_TransportChannelType := dch,
        transportChannelIdentity := tsc_UL_DCH1,
        transportFormatSet := {
          dedicatedTransChTFS := cs_DCH_81_TFS_UE
        }
      }
    },
    {
      dch_usch := {
        ul_TransportChannelType := dch,
        transportChannelIdentity := tsc_UL_DCH2,
        transportFormatSet := {
          dedicatedTransChTFS := cs_DCH_103_TFS_UE
        }
      }
    },
    {
      dch_usch := {
        ul_TransportChannelType := dch,
        transportChannelIdentity := tsc_UL_DCH3,
        transportFormatSet := {
          dedicatedTransChTFS := cs_DCH_60_TFS_UE
        }
      }
    },
    {
      dch_usch := {
        ul_TransportChannelType := dch,
        transportChannelIdentity := tsc_UL_DCH5,
        transportFormatSet := {
          dedicatedTransChTFS := cs_DCH_148_TFS_UE_UL
        }
      }
    }
  };

  // =============================================================================
  // ASN.1 Type Constraint
  // *** Comments:
  // transport format set for RAB subflow#1 on dedicated channel
  // *** additional Notes:
  // TS 34.108 cl. 6.10.2.4.1.4:
  // TTI = 20 ms;
  // three transport formats: TransportBlocks = 1, TB size = 0 bits; TransportBlocks = 1, TB size = 39 bits; TansportBlock = 1, Size = 81.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 12;
  // RateMatching = 200
  // -----------------------------------------------------------------------------
  template (value) DedicatedTransChTFS cs_DCH_81_TFS_DL_UE :=
  {
    tti := {
      tti20 := {
        {
          rlc_Size := {
            bitMode := {
              sizeType1 := 0
            }
          },
          numberOfTbSizeList := {
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        },
        {
          rlc_Size := {
            bitMode := {
              sizeType1 := 39
            }
          },
          numberOfTbSizeList := {
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        },
        {
          rlc_Size := {
            bitMode := {
              sizeType1 := 81
            }
          },
          numberOfTbSizeList := {
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := third
      },
      rateMatchingAttribute := 200,
      crc_Size := crc12
    }
  };

  template (value) DL_AddReconfTransChInformation_r7 cs_DL_AddReconfTransChInfo_WithoutQuality ( template (value) TransportChannelIdentity p_DlTrChId,
                                                                                                 template (value) TransportChannelIdentity p_UlTrChId ) :=
  {
    dl_TransportChannelType := {
      dch := p_DlTrChId
    },
    tfs_SignallingMode := {
      sameAsULTrCH := {
        ul_TransportChannelType := dch,
        ul_TransportChannelIdentity := p_UlTrChId
      }
    },
    dch_QualityTarget := omit
  };

  template (value) DL_AddReconfTransChInfoList_r7 cs_DL_AddReconfTransChInfoListTM_12_2k :=
  {
    {
      dl_TransportChannelType := {
        dch := tsc_DL_DCH1
      },
      tfs_SignallingMode := {
        explicit_config := {
          dedicatedTransChTFS := cs_DCH_81_TFS_DL_UE
        }
      },
      dch_QualityTarget := omit
    },
    cs_DL_AddReconfTransChInfo_WithoutQuality ( tsc_DL_DCH2, tsc_UL_DCH2 ),
    cs_DL_AddReconfTransChInfo_WithoutQuality ( tsc_DL_DCH3, tsc_UL_DCH3 ),
    cs_DL_AddReconfTransChInfo_r7(tsc_DL_DCH5, tsc_UL_DCH5)
  };

  template (value) DL_CommonInformation_r8 cs_DL_CommonInformationRB_SetUpSpeech ( SF512_AndPilot p_Sf ) :=
  {
    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 := fixed,
            tfci_Existence := false
          }
        },
        mac_d_HFN_initial_value := omit
      }
    },
    modeSpecificInfo := {
      fdd := {
        defaultDPCH_OffsetValue := omit,
        dpch_CompressedModeInfo := omit,
        tx_DiversityMode := noDiversity
      }
    },
    mac_hsResetIndicator := omit,
    postVerificationPeriod := omit
  }

template (value) TrCH_LogCHMappingList1 cs_TrLogMappingDL_4DCCH_3DTCH :=
  {
    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 := 6
              }
            },
            rB_Identity := tsc_RB10,
            cn_DomainIdentity := omit
          }
        }
      },
      {
        trchid := tsc_DL_DCH2,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              dl_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                dl_TransportChannelType := dch,
                logicalChannelIdentity := tsc_DL_DTCH2,
                logicalChannelType := dTCH,
                rlc_SizeList := {
                  configured := NULL
                },
                mac_LogicalChannelPriority := 6
              }
            },
            rB_Identity := tsc_RB11,
            cn_DomainIdentity := omit
          }
        }
      },
      {
        trchid := tsc_DL_DCH3,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              dl_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                dl_TransportChannelType := dch,
                logicalChannelIdentity := tsc_DL_DTCH3,
                logicalChannelType := dTCH,
                rlc_SizeList := {
                  configured := NULL
                },
                mac_LogicalChannelPriority := 6
              }
            },
            rB_Identity := tsc_RB12,
            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) TrCH_LogCHMappingList1 cs_TrLogMappingUL_4DCCH_3DTCH :=
  {
    ulconnectedTrCHList := {
      {
        trchid := tsc_UL_DCH1,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DTCH1,
                logicalChannelType := dTCH
              }
            },
            rB_Identity := tsc_RB10,
            cn_DomainIdentity := omit
          }
        }
      },
      {
        trchid := tsc_UL_DCH2,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DTCH2,
                logicalChannelType := dTCH
              }
            },
            rB_Identity := tsc_RB11,
            cn_DomainIdentity := omit
          }
        }
      },
      {
        trchid := tsc_UL_DCH3,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DTCH3,
                logicalChannelType := dTCH
              }
            },
            rB_Identity := tsc_RB12,
            cn_DomainIdentity := omit
          }
        }
      },
      {
        trchid := tsc_UL_DCH5,
        trCH_LogCHMappingList := {
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DCCH1,
                logicalChannelType := dCCH
              }
            },
            rB_Identity := tsc_RB1,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DCCH2,
                logicalChannelType := dCCH
              }
            },
            rB_Identity := tsc_RB2,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DCCH3,
                logicalChannelType := dCCH
              }
            },
            rB_Identity := tsc_RB3,
            cn_DomainIdentity := omit
          },
          {
            logicalChannel_Mapping := {
              ul_LogicalChannelMapping := {
                macHeaderManipulation := normalMacHeader,
                ul_TransportChannelType := dch,
                logicalChannelIdentity := tsc_UL_DCCH4,
                logicalChannelType := dCCH
              }
            },
            rB_Identity := tsc_RB4,
            cn_DomainIdentity := omit
          }
        }
      }
    },
    dlconnectedTrCHList           := omit,
    dlconnectedMACdFlows          := omit,
    dlconnectedMAC_ehsFlows       := omit,
    dlconnectedMAC_ehsCommonFlows := omit,
    dlconnectedMAC_ehsCommonFlowsDC := omit
  };



  // =============================================================================
  // ASN.1 Type Constraint
  // *** Comments:
  // transport format set for RAB subflow#1 on dedicated channel
  // *** additional Notes:
  // TS 34.108 cl. 6.10.2.4.1.4:
  // TTI = 20 ms;
  // three transport formats: TransportBlocks = 1, TB size = 0 bits; TransportBlocks = 1, TB size = 39 bits; TansportBlock = 1, Size = 81.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 12;
  // RateMatching = 200
  // -----------------------------------------------------------------------------
  template (value) CommonOrDedicatedTFS cs_DCH_81_TFS_DL_FDD :=
  {
    tti := {
      tti20 := {
        {
          tb_Size := 0,
          numberOfTbSizeList := {
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        },
        {
          tb_Size := 39,
          numberOfTbSizeList := {
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        },
        {
          tb_Size := 81,
          numberOfTbSizeList := {
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := third
      },
      rateMatchingAttribute := 200,
      crc_Size := crc12
    }
  };

  template (value) CommonOrDedicatedTFS_TDD cs_DCH_81_TFS_DL_TDD :=
  {
    tfsMode := {dedicatedTransChTFS := cs_DCH_81_TFS_DL_UE}
  };

  // =============================================================================
  // ASN.1 Type Constraint
  // *** Comments:
  // transport format set for RAB subflow#3 on dedicated channel
  // *** additional Notes:
  // TS 34.108 subcl. 6.10.2.4.1.4:
  // TTI = 20 ms;
  // two transport formats: TransportBlocks = 0, TB size = 60 bits; TansportBlock = 1, Size = 60.
  // coding = convolutional;
  // coding rate = 1/2;
  // CRCsize = N/A;
  // RateMatching = 235
  // -----------------------------------------------------------------------------
  template (value) CommonOrDedicatedTFS cs_DCH_60_TFS_FDD :=
  {
    tti := {
      tti20 := {
        {
          tb_Size := 60,
          numberOfTbSizeList := {
            { zero := NULL },
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := half
      },
      rateMatchingAttribute := 235,
      crc_Size := crc0
    }
  };

  template (value) CommonOrDedicatedTFS_TDD cs_DCH_60_TFS_TDD :=
  {
    tfsMode := {dedicatedTransChTFS := cs_DCH_60_TFS_UE}
  };

  // =============================================================================
  // ASN.1 Type Constraint
  // *** Comments:
  // transport format set for RAB subflow#1 on dedicated channel
  // *** additional Notes:
  // TS 34.108 cl. 6.10.2.4.1.4:
  // TTI = 20 ms;
  // three transport formats: TransportBlocks = 0, TB size = 81 bits; TransportBlocks = 1, TB size = 39 bits; TansportBlock = 1, Size = 81.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 12;
  // RateMatching = 200
  // -----------------------------------------------------------------------------
  template (value) CommonOrDedicatedTFS cs_DCH_81_TFS_FDD :=
  {
    tti := {
      tti20 := {
        {
          tb_Size := 81,
          numberOfTbSizeList := {
            { zero := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        },
        {
          tb_Size := 39,
          numberOfTbSizeList := {
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        },
        {
          tb_Size := 81,
          numberOfTbSizeList := {
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := third
      },
      rateMatchingAttribute := 200,
      crc_Size := crc12
    }
  };

  template (value) CommonOrDedicatedTFS_TDD cs_DCH_81_TFS_TDD :=
  {
    tfsMode := {dedicatedTransChTFS := cs_DCH_81_TFS_UE}
  };

  template (value) CommonOrDedicatedTFS_TDD cs_DCH_148_TFS_UL_TDD :=
  {
    tfsMode := {dedicatedTransChTFS := cs_DCH_148_TFS_UL_UE}
  };

  //* @desc ASN.1 Type Constraint for transport format set for signalling bearer on dedicated channel
  //* additional Notes:
  // TS 34.108  cl. 6.11.5.4.1.2:
  // TTI = 40 ms;
  // two transport formats: TransportBlocks = 1, TB size = 148 bits; TansportBlock = 0, Size = 148. rlc_Size = RLC PDU size =148 bits.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 16;
  // RateMatching = 165
  template (value) DedicatedTransChTFS cs_DCH_148_TFS_UL_UE :=
  {
    tti := {
      tti20 := {
        {
          rlc_Size := {
            bitMode := {
              sizeType2:= {
                part1 := 2,
                part2 := omit
              }
            }
          },
          numberOfTbSizeList := {
            { zero := NULL },
            { one := NULL }},
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {convolutional := third},
      rateMatchingAttribute := 165,
      crc_Size := crc16
    }
  };

  // =============================================================================
  // ASN.1 Type Constraint
  // *** Comments:
  // transport format set for signalling bearer on dedicated channel
  // *** additional Notes:
  // TS 34.108  cl. 6.10.2.4.1.2:
  // TTI = 40 ms;
  // two transport formats: TransportBlocks = 1, TB size = 148 bits; TansportBlock = 0, Size = 148. rlc_Size = RLC PDU size =148 bits.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 16;
  // RateMatching = 170
  // -----------------------------------------------------------------------------
  template (value) CommonOrDedicatedTFS cs_DCH_148_TFS_UL_FDD :=
  {
    tti := {
      tti40 := {
        {
          tb_Size := 148,
          numberOfTbSizeList := {
            { zero := NULL },
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := third
      },
      rateMatchingAttribute := 170,
      crc_Size := crc16
    }
  };

  template (value) TFCS cs_TFCS_Cmpl0_1_11_12_13_23_Rx :=
  {
    normalTFCI_Signalling := {
      complete := {
        ctfcSize := {
          ctfc6Bit := {
            {
              ctfc6 := 0,
              powerOffsetInformation := omit
            },
            {
              ctfc6 := 1,
              powerOffsetInformation := omit
            },
            {
              ctfc6 := 11,
              powerOffsetInformation := omit
            },
            {
              ctfc6 := 12,
              powerOffsetInformation := omit
            },
            {
              ctfc6 := 13,
              powerOffsetInformation := omit
            },
            {
              ctfc6 := 23,
              powerOffsetInformation := omit
            }
          }
        }
      }
    }
  };


  template (value) TrCHInfo cs_TrChInfoUL_122_AMR_FDD :=
  {
    ulconnectedTrCHList := {
      {
        trchid := tsc_UL_DCH1,
        transportChannelInfo := cs_DCH_81_TFS_FDD
      },
      {
        trchid := tsc_UL_DCH2,
        transportChannelInfo := cs_DCH_103_TFS_FDD
      },
      {
        trchid := tsc_UL_DCH3,
        transportChannelInfo := cs_DCH_60_TFS_FDD
      },
      {
        trchid := tsc_UL_DCH5,
        transportChannelInfo := cs_DCH_148_TFS_UL_FDD
      }
    },
    ulTFCS := cs_TFCS_Cmpl0_1_11_12_13_23_Rx,
    dlconnectedTrCHList := omit,
    dlTFCS := omit,
    hsDSCHMacdFlows := omit,
    ehs_DSCH_Flows := omit,
    ehs_DSCH_CommonFlows := omit
  };

  template (value) TrCHInfo_TDD cs_TrChInfoUL_122_AMR_TDD :=
  {
    ulconnectedTrCHList := {
      {
        trchid := tsc_UL_DCH1,
        transportChannelInfo := cs_DCH_81_TFS_TDD
      },
      {
        trchid := tsc_UL_DCH2,
        transportChannelInfo := cs_DCH_103_TFS_TDD
      },
      {
        trchid := tsc_UL_DCH3,
        transportChannelInfo := cs_DCH_60_TFS_TDD
      },
      {
        trchid := tsc_UL_DCH5,
        transportChannelInfo := cs_DCH_148_TFS_UL_TDD
      }
    },
    ulTFCS := cs_TFCS_Cmpl0_1_11_12_13_23_Rx,
    dlconnectedTrCHList := omit,
    dlTFCS := omit,
    hsDSCHMacdFlows := omit
  };

  template (value) RRCDataReqType cs_Disconnect ( template (value) TI p_Ti ) := {
    disconnectDL := {
      Ti                       := p_Ti,
      cC_ProtocolDiscriminator := '0011'B,
      msgType                  := '00100101'B,
      cau                      := cs_CauNormCallClear,
      facility                 := omit,
      progInd                  := omit,
      userUser                 := omit,
      allowedAction            := omit
    }
  }

  template RRCDataIndType cr_Rel ( template TI p_Ti ) := {
    releaseUL := {
      ti                       := p_Ti,
      cC_ProtocolDiscriminator := '0011'B,
      msgType                  := '??101101'B,
      cau                      := cr_CauAny ifpresent,
      cau2                     := cr_CauAny ifpresent,
      facility                 := cr_Facility_Any ifpresent,
      userUser                 := cr_UserUserAny ifpresent,
      sS_VersionInd            := cr_SS_VersionIndAny ifpresent
    }
  }

  template (value) RRCDataReqType cs_RelCmpl ( template (value) TI p_Ti ) := {
    releaseCompleteDL := {
      ti                       := p_Ti,
      cC_ProtocolDiscriminator := '0011'B,
      msgType                  := '00101010'B,
      cau                      := omit,
      facility                 := omit,
      userUser                 := omit
    }
  }

//----------------------------------------------------------------------
// Stop: Templates used for SPEECH RAB
//----------------------------------------------------------------------


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

  template (value) UL_DL_Mode cs_UL_DL_Mode_UL_HLS := {
    ul := higherLayerScheduling
  }

  template (value) UL_DL_Mode cs_UL_DL_Mode_ULDL_HLS := {
    ul_and_dl := {
      ul := higherLayerScheduling,
      dl := higherLayerScheduling
    }
  }

  template (value) UL_DL_Mode cs_UL_DL_Mode_DL_HLS := {
    dl := higherLayerScheduling
  }

  template (value) DPCHInfo_r5OrLater cs_DPCHInfo_DL ( template (value) DL_DPCHInfo_r8 p_DL_DPCHInfo ) := {
    r8 := {
      ul_DPCHInfo := omit,
      dl_DPCHInfo := p_DL_DPCHInfo,
      hs_DPCCHInd := omit,
      ss_UL_DPCCH_DRX_Info := omit,
      ss_DRX_Info := omit
    }
  }

  template UL_DCCH_Message cr_PhysicalChannelReconfigurationComplete ( RRC_TransactionIdentifier p_RRC_TI ) :=
  /* Values according to 36.508 Table 4.7B.1-6: PHYSICAL CHANNEL RECONFIGURATION COMPLETE */
  {
    integrityCheckInfo := *,
    message_ := {
      physicalChannelReconfigurationComplete := {
        rrc_TransactionIdentifier  := p_RRC_TI,
        ul_IntegProtActivationInfo := *,
        ul_TimingAdvance           := *,
        count_C_ActivationTime     := *,
        dummy                      := *,
        ul_CounterSynchronisationInfo := *,
        laterNonCriticalExtensions    := {
          physicalChannelReconfigurationComplete_r3_add_ext   := *,
          v770NonCriticalExtensions := {
            physicalChannelReconfigurationComplete_v770ext := {
              ext_UL_TimingAdvance := omit,
              deferredMeasurementControlReading := omit
            },
            nonCriticalExtensions := omit
          }
        }
      }
    }
  }

  // =============================================================================
  // ASN.1 Type Constraint
  // *** Comments:
  // transport format set for RAB subflow#2 on dedicated channel
  // *** additional Notes:
  // TS 34.108 cl. 6.10.2.4.1.4:
  // TTI = 20 ms;
  // two transport formats: TransportBlocks = 0, TB size = 103 bits; TansportBlock = 1, Size = 103.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = N/A;
  // RateMatching = 190
  // -----------------------------------------------------------------------------
  template (value) CommonOrDedicatedTFS cs_DCH_103_TFS_FDD :=
  {
    tti := {
      tti20 := {
        {
          tb_Size := 103,
          numberOfTbSizeList := {
            { zero := NULL },
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := third
      },
      rateMatchingAttribute := 190,
      crc_Size := crc0
    }
  };

  template (value) CommonOrDedicatedTFS_TDD cs_DCH_103_TFS_TDD :=
  {
    tfsMode := {dedicatedTransChTFS := cs_DCH_103_TFS_UE}
  };

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

  template (value) TrCHInfo_TDD.dlconnectedTrCHList cs_TrChInfoDL_34_StandAlone_TDD := {
    {
      trchid := tsc_DL_DCH5,
      transportChannelInfo := cs_DCH_148_TFS_DL_TDD
    }
  };

  //* @desc ASN.1 Type Constraint for transport format set for signalling bearer on dedicated channel
  //* additional Notes:
  //* TS 34.108  cl. 6.10.2.4.1.2:
  //* TTI = 40 ms;
  //* two transport formats: TransportBlocks = 1, TB size = 148 bits; TansportBlock = 0, Size = 148. rlc_Size = RLC PDU size =148 bits.
  //* coding = convolutional;
  //* coding rate = 1/3;
  //* CRCsize = 16;
  //* RateMatching = 170
  template (value) CommonOrDedicatedTFS cs_DCH_148_TFS_DL_FDD :=
  {
    tti := {
      tti40 := {
        {
          tb_Size := 148,
          numberOfTbSizeList := {
            { zero := NULL },
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := third
      },
      rateMatchingAttribute := 170,
      crc_Size := crc16
    }
  };

    template (value) CommonOrDedicatedTFS_TDD cs_DCH_148_TFS_DL_TDD :=
  {
    tfsMode := {dedicatedTransChTFS := cs_DCH_148_TFS_DL_TDD_UE}
  };

  // @desc ASN.1 Type Constraint for transport format set for signalling bearer on dedicated channel
  // additional Notes:
  // TS 34.108  cl. 6.11.5.4.1.2:
  // TTI = 40 ms;
  // two transport formats: TransportBlocks = 1, TB size = 148 bits; TansportBlock = 0, Size = 148. rlc_Size = RLC PDU size =148 bits.
  // coding = convolutional;
  // coding rate = 1/3;
  // CRCsize = 16;
  // RateMatching = 165
  template (value) DedicatedTransChTFS cs_DCH_148_TFS_DL_TDD_UE :=
  {
    tti := {
      tti40 := {
        {
          rlc_Size := {
            bitMode := {
              sizeType2:= {
                part1 := 2,
                part2 := omit
              }
            }
          },
          numberOfTbSizeList := {
            { zero := NULL },
            { one := NULL }
          },
          logicalChannelList := {
            allSizes := NULL
          }
        }
      }
    },
    semistaticTF_Information := {
      channelCodingType := {
        convolutional := third
      },
      rateMatchingAttribute := 165,
      crc_Size := crc16
    }
  };

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

//----------------------------------------------------------------------
// Start: Templates to be removed
//----------------------------------------------------------------------

  /*template (value) DPCHInfo_r5OrLater cs_DPCHInfo_UL ( template (value) UL_DPCH_Info_r7 p_UL_DPCH_Info ) := {
    r8 := {
      ul_DPCHInfo := p_UL_DPCH_Info,
      dl_DPCHInfo := omit,
      hs_DPCCHInd := omit,
      ss_UL_DPCCH_DRX_Info := omit,
      ss_DRX_Info := omit
    }
  }*/

  // TFCS information with power offset information  - for transmitter
  /*template (value) TFCS cs_TFCS_Cmpl0_1_Tx ( template (value) PowerOffsetInformation p_PowerOffsetInformation ) :=
  {
    normalTFCI_Signalling := {
      complete := {
        ctfcSize := {
          ctfc2Bit := {
            {
              ctfc2 := 0,
              powerOffsetInformation := cs_PowerOffsetInfoComputed
            },
            {
              ctfc2 := 1,
              powerOffsetInformation := p_PowerOffsetInformation
            }
          }
        }
      }
    }
  };*/

//----------------------------------------------------------------------
// Stop: Templates to be removed
//----------------------------------------------------------------------
}
