/******************************************************************************/
// @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-01-12 18:20:57 +0100 (Tue, 12 Jan 2010) $
// $Rev: 2335 $
/******************************************************************************/

module GERAN_CellInfo {

  import from GERAN_TypeDefs all;
  import from CommonDefs all;
  import from NAS_CommonTypeDefs all;
  import from NAS_24008TypeDefs all;
  import from GERAN_Parameters all;
  import from Parameters all;
  import from CommonIratDefs all;
  import from NAS_AuxiliaryDefsAndFunctions all;
  import from GERAN_Templates all;
  import from NAS_CommonTemplates all;

  const integer tsc_GERAN_NumberOfCells := 3;   /* @status    APPROVED */

  type record GERAN_CellInfo_Type {             /* @status    APPROVED */
    GERAN_CommonCellInfo_Type  info,
    GERAN_CellInfo_Freq_Type   freq,
    GERAN_SystemInformation_Type sysInfo
  };

  type record length (tsc_GERAN_NumberOfCells) of GERAN_CellInfo_Type GERAN_CellArray_Type;   /* @status    APPROVED */

  type record GERAN_CellInfo_Freq_Type {        /* @status    APPROVED */
    B10_Type            bCCH_Freq,              // BCCH/CCCH carrier frequency (ARFCN) for current cell. None hopping
    B10_Type            gPRSCh_Freq optional,   // ARFCN of the GPRS channel, if none hopping
    CellChDescr         cellAllocation,         // cell allocation, 3GPP TS 44.018 clause 10.5.2.1b  with IEI omitted
    NeighCellDescr      neighBCCHFreqList,      // neighbour cell BCCH/CCCH ARFCN's, 3GPP TS 44.018 clause 10.5.2.22 with IEI omitted.
    CoOrd_GERANNeighCell_Type arfcnList,              // List of the 8 neighbour cells to send to LTE
    NeighCellDescr      extNeighBCCHFreqList  optional,  // extended neighbour cell BCCH/CCCH ARFCN's in SI2bis, 3GPP TS 44.018 clause 10.5.2.22 with IEI omitted.
    B1_Type             bandIndicator           // ARFCN band. 0= DCS1800 band; 1= PCS1900 band.
  };

  type record GERAN_SystemInformation_Type {    /* @status    APPROVED */
    SYSTEMINFORMATIONTYPE1  si1,
    SYSTEMINFORMATIONTYPE2  si2,
    SYSTEMINFORMATIONTYPE2bis  si2bis optional,
    SYSTEMINFORMATIONTYPE2quater  si2quater_1,
    SYSTEMINFORMATIONTYPE2quater  si2quater_2  optional, // only need 2nd instance if UTRAN present too
    SYSTEMINFORMATIONTYPE3  si3,
    SYSTEMINFORMATIONTYPE4  si4,
    SYSTEMINFORMATIONTYPE5  si5,
    SYSTEMINFORMATIONTYPE5bis  si5bis,
    SYSTEMINFORMATIONTYPE6  si6,
    SYSTEMINFORMATIONTYPE13  si13,
    SYSTEMINFORMATIONTYPE15  si15 optional //Only for 710 and 810
  };

  type record GERAN_CommonCellInfo_Type {       /* @status    APPROVED */
    B5_Type              gamma optional,
    integer              downlinkPowerLevel,    // Downlink transmission power level in dB?Vemf(). Default = 63
    O2_Type              cellIdentity,          // cell identity, 3GPP TS 24.008 clause 10.5.1.1. Default = '0001'O
    hexstring            mcc length (3),        // mobile country code, 3 digits. 3GPP TS 24.008 clause 10.5.1.3. Default = 001 (decimal)
    hexstring            mnc length (3),        // mobile network code, 2 BCD digits. 3GPP TS 24.008 clause 10.5.1.3. Default = 01 (decimal)
    octetstring          plmn length (3),       // plmn
    O2_Type              lac,                   // location area code. 3GPP TS 24.008 clause 10.5.1.3. Default = '0001'O
    O1_Type              rac,                   // routing area code. Default = '05'O
    B2_Type              nmo,                   // network mode of operation. Default = '00'B
    B3_Type              ncc,                   // PLMN colour code,  3GPP TS 23.003 clause 4.3.2. Default = '001'B
    B3_Type              bcc,                   // BS colour code, 3GPP TS 23.003 clause 4.3.2. Default = '101'B
    B2_Type              dTX,                   // Uplink discontinuous transmission indecation, 3GPP TS 44.018 clause 10.5.2.3. Dfault = MS must not use
    B1_Type              dtx8,                  // Uplink discontinuous transmission indecation, 3GPP TS 44.018 clause 10.5.2.3a.
    B2_Type              dtx65,                 // Uplink discontinuous transmission indecation, 3GPP TS 44.018 clause 10.5.2.3a.
    DRXparameter         splitPGcycle,          // 3GPP TS 24.008 clause 10.5.5.6.
    O1_Type              timingAdvance,         // timing advance value, 3GPP TS 44.018 clause 10.5.2.40
    B3_Type              tSC,                   // training sequence code for dedicated channels. TSC of broadcast channel and common channel shall be equal to BCC.
    ControlChDescr       controlChDesr,         // Control channel description 44.018, clause 10.5.2.11
    RACHControlParam     rachCtrlParams,        // RACH control Parameters 44.018 clause 10.5.2.29
    CellSelParam         cellSelParams,         // Cell Selection Parameters 44.018 clause 10.5.2.4
    B4_Type              radioLinkTimeout,      // RADIO-LINK-TIMEOUT, 3GPP TS 44.018 clause 10.5.2.3. Default = 8
    O1_Type              nccPermitted,          // NCC permitted. 3GPP TS 44.018 clause 10.5.2.27
    B1_Type              dN_Ind,                // dynamic ARFCN mapping indecator. 3GPP TS 44.018 clause 10.5.2.3
    TLLI                 tlli,
    TLLI                 oldTlli
    // B1_Type              pwrc,                  // power control indication, default ='0' PWRC is not set.
    // CellConfiguration cellConfiguration    // current configuration of the cell, used to control the behaviour of postamble
  };

  type record GERAN_SecurityInfo_Type {         /* @status    APPROVED */
    Common_AuthenticationParams_Type authPS,
    Common_AuthenticationParams_Type authCS,
    B64_Type             cipherKey,             // cipher key
    CipherModeSetting    cipherMode,            // ciphering algorithm and cipher starting flag, 3GPP TS 44.018 clause 10.5.2.9
    GPRS_CipherAlg       gprsCipherAlg
  };

  group Freq_Templates
  {
  // =============================================================================
  // for cell A  in RR testing of GSM 450 with the ARFCN list = 263, 267, 275 and 279
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGSM450 :=
  {
    iei             := omit,
    refFreqList     := '8C838CE0400000000000000000000000'O // ARFCNs : 263, 267, 275 and 279
    // 128 range
  };

  // =============================================================================
  // for cell A  in RR testing of GSM 480 with the ARFCN list = {310, 315, 322 and 326}..
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGSM480 :=
  {
    iei             := omit,
    refFreqList     := '8C9B0CE4400000000000000000000000'O // ARFCNs : 310, 315, 322 and 326  // 128 range
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.1.1 {10, 37, 40, 50, 60, 80} bitmap 0
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS900_Cell24 :=
  {
    iei             := omit,
    refFreqList     := '00000000000080000802009000000200'O // reference frequency list, the first octet is length
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.1.1 {520, 530, 540, 550} range 512
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS1800_1900_Cell24 :=
  {
    iei             := omit,
    refFreqList     := '8904053D828000000000000000000000'O // reference frequency list, the first octet is length
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.1.1 {447, 457, 477, 487, 497, 509} range 128
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS700_Cell24 :=
  {
    iei             := omit,
    refFreqList     := '8CDFA8D9665000000000000000000000'O // reference frequency list, the first octet is length
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.1.1 {159, 161, 163, 165, 187, 207}
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS850_Cell24 :=
  {
    iei             := omit,
    refFreqList     := '8C4F86FAAF3000000000000000000000'O // reference frequency list
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.2 {15, 70, 97, 100, 110, 120} bitmap 0
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS900_Cell26 :=
  {
    iei             := omit,
    refFreqList     := '00802009000000200000000000004000'O // reference frequency list
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.2 {560, 570, 580, 585} range 512
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS1800_1900_Cell26 :=
  {
    iei             := omit,
    refFreqList     := '8918053D814000000000000000000000'O // reference frequency list, the first octet is length
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.2 {439, 441, 443, 445} range 128
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS700_Cell26 :=
  {
    iei             := omit,
    refFreqList     := '8CDB84F8200000000000000000000000'O // reference frequency list
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.2 {179, 181, 183, 185} range 128
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS850_Cell26 :=
  {
    iei             := omit,
    refFreqList     := '8C5984F8200000000000000000000000'O // reference frequency list
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.4 {22, 42, 62, 82, 102, 122} bitmap 0
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS900_Cell25 :=
  {
    iei             := omit,
    refFreqList     := '02000020000200002000020000200000'O // reference frequency list
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.4 {640, 655, 660, 670} range 512
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS1800_1900_Cell25 :=
  {
    iei             := omit,
    refFreqList     := '8940053EC28000000000000000000000'O // reference frequency list
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.4 {459, 461, 463, 465} range 128
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS700_Cell25 :=
  {
    iei             := omit,
    refFreqList     := '8CE584F8200000000000000000000000'O // reference frequency list
  };

  // =============================================================================
  // As specified in 51.010, clause 40.2.1.4 {139, 141, 143, 145} range 128
  // -----------------------------------------------------------------------------
  template (value) CellChDescr cs_CellAllocGPRS850_Cell25 :=
  {
    iei             := omit,
    refFreqList     := '8C4584F8200000000000000000000000'O // reference frequency list
  };

  // =============================================================================
  // range 256, ARFCN = 985, 989, 995, 1010, 1014
  // -----------------------------------------------------------------------------
  template (value) NeighCellDescr cs_ExtNeighBCCH_FreqList2bis :=
  {
    rfl2            := '10'B,                        // bits 128-127
    extind          := '1'B,                         // extension indication
    baind           := '0'B,                         // bcch allocation sequence number indication
    rfl4            := '1011'B,                      // bits 124-121
    rfl             := 'EC8CF109D000000000000000000000'O // bits 120-0
  };

  // =============================================================================
  // for GSM 700 cell A. ARFCN = 438,447,457,467,477,487,497,502,507 Values are taken from 51.010 Table 40.1.1
  // -----------------------------------------------------------------------------
  template (value) NeighCellDescr cs_NeighBCCH_FreqListGPRS700 :=
  {
    rfl2            := '10'B,                        // range 128 format
    extind          := '0'B,                         // complete BA
    baind           := '0'B,                         // bcch allocation sequence number indication
    rfl4            := '1100'B,
    rfl             := 'DB31B0FB6D45600000000000000000'O // ARFCN: 438,447,457,467,477,487,497,502,507
  };

  // =============================================================================
  // for GSM 900 GPRS cell A. ARFCN = 5,20, 80,90,100, 110,120,122,124. Values are taken from 51.010 Table 40.2.1.1.1
  // -----------------------------------------------------------------------------
  template (value) NeighCellDescr cs_NeighBCCH_FreqListGPRS900 :=
  {
    rfl2            := '00'B,                        // bit map 0 format
    extind          := '1'B,                         // incomplete BA
    baind           := '0'B,                         // bcch allocation sequence number indication
    rfl4            := '1010'B,                      // bits 124-121
    rfl             := '802008020080000000000000080010'O // bits 120-0
  };

  // =============================================================================
  // for GSM 1800 cell. ARFCN = 515, 590, 600, 700, 780, 810 870, 875, 885. Values are taken from 51.010 Table 40.2.1.1.1
  // -----------------------------------------------------------------------------
  template (value) NeighCellDescr cs_NeighBCCH_FreqListGPRS1800 :=
  {
    rfl2            := '10'B,                        // range 512 format
    extind          := '0'B,                         // complete BA
    baind           := '0'B,                         // bcch allocation sequence number indication
    rfl4            := '1001'B,
    rfl             := '0195452D3DB0147A80000000000000'O // ARFCN = 515, 590, 600, 700, 780, 810 870, 875, 885
  };

  // =============================================================================
  // for GSM 1900 cell. ARFCN = 515, 590, 600, 655, 700, 710, 740, 780, 810. Values are taken from 51.010 Table 40.2.1.1.1
  // -----------------------------------------------------------------------------
  template (value) NeighCellDescr cs_NeighBCCH_FreqListGPRS1900 :=
  {
    rfl2            := '10'B,                        // range 512 format
    extind          := '0'B,                         // complete BA
    baind           := '0'B,                         // bcch allocation sequence number indication
    rfl4            := '1001'B,
    rfl             := '01B0F251A4D85A7B60000000000000'O // ARFCN = 515, 590, 600, 655, 700, 710, 740, 780, 810.
  };

  // =============================================================================
  // for GSM 450 cell A. ARFCN = 259, 263, 269, 275, 279, 283, 287 and 292
  // -----------------------------------------------------------------------------
  template (value) NeighCellDescr cs_NeighBCCH_FreqListGPRS450 :=
  {
    rfl2            := '10'B,                        // range 128 format
    extind          := '0'B,                         // complete BA
    baind           := '0'B,                         // bcch allocation sequence number indication
    rfl4            := '1100'B,
    rfl             := '8194D88D70C5000000000000000000'O // ARFCN: 259, 263, 269, 275, 279, 283, 287 and 292
  };

  // =============================================================================
  // for GSM 480 cell A. ARFCN = 306, 310, 316, 322, 326, 330, 334 and 339
  // -----------------------------------------------------------------------------
  template (value) NeighCellDescr cs_NeighBCCH_FreqListGPRS480 :=
  {
    rfl2            := '10'B,                        // range 128 format
    extind          := '0'B,                         // complete BA
    baind           := '0'B,                         // bcch allocation sequence number indication
    rfl4            := '1100'B,
    rfl             := '9914D88D70C5000000000000000000'O // ARFCN: 306, 310, 316, 322, 326, 330, 334 and 339
  };

  // =============================================================================
  // for GSM 850 cell A. ARFCN = 137,147,157,177,197,207,217,227,237. Values are taken from 51.010 Table 40.2.1.1.1
  // -----------------------------------------------------------------------------
  template (value) NeighCellDescr cs_NeighBCCH_FreqListGPRS850 :=
  {
    rfl2            := '10'B,                        // range 128 format
    extind          := '0'B,                         // complete BA
    baind           := '0'B,                         // bcch allocation sequence number indication
    rfl4            := '1100'B,
    rfl             := '44C6394B5A8A300000000000000000'O // ARFCN: 137,147,157,177,197,207,217,227,237
  };

  template (value) GERAN_CommonCellInfo_Type cs_G_CommonCellConfigInfoDef (O2_Type  p_CellIdentity):=
  {
    gamma := omit,
    downlinkPowerLevel := 63,                        // Downlink transmission power level Vemf().
    cellIdentity    := p_CellIdentity,               // cell identity
    mcc             := '001'H,                       // mobile country code = 001 (decimal)
    mnc             := '01F'H,                       // mobile network code = 01 (decimal)
    plmn            := '00F110'O,                    // PLMN
    lac             := '0001'O,                      // location area code = '0001'O
    rac             := '05'O,                        // routing area code. Default = '05'O
    nmo             := '00'B,                        // network mode of operation. Default = '00'B
    ncc             := '001'B,                       // PLMN colour code = '001'B
    bcc             := '101'B,                       // BS colour code = '101'B
    dTX             := '10'B,                        // Uplink discontinuous transmission not used. (indecation in BCCH)
    dtx8            := '0'B,                         // Uplink discontinuous transmission not used. (indecation in SACHH)
    dtx65           := '10'B,                        // Uplink discontinuous transmission not used. (indecation in SACHH)
    splitPGcycle    := cs_SplitPGCycleInitial,       // no split pg cycle on CCCH. value taken from PIXIT. (shall be PICS qustion?)
    timingAdvance   := '1F'O,                        // timing advance value = 30 * 48/13 us
    tSC             := px_TSC,                       // training sequence code for dedicated channels.
    controlChDesr   := {
      mSCRelease := '1'B,                            // MSC release
      att       := '1'B,                             // attach-detach allowed
      bS_AG_BLKS_RES := '010'B,                      // base station access grant blocks reservation
      cCCH_CONF := '001'B,                           // CCCH configuration
      spareBits := '000'B,                           // spare bits
      cBQ2      := '00'B,                            // cell bar qualify 2
      bS_PA_MFRMS := '100'B,                         // number of multiframes for paging request
      t3212     :=  '00'O                            // t3212 value
    },         // Control channel description 44.018, clause 10.5.2.11
    rachCtrlParams  := {
      maxretx    := '00'B,                           // maximum retransmissions
      txInteger  := '0010'B,                         // Tx integer, number of slots to spread transmission
      cellBarAccess := '0'B,                         // cell barred for access
      re         := '1'B,                            // call reestablishment allowed
      acc_2      := '00000'B,                        // access control class 15-11
      ec         := '0'B,                            // emergency call allowed
      acc_1      :=  '0000000000'B                   // access control class 9-0
    },        // RACH control Parameters 44.018 clause 10.5.2.29
    cellSelParams   := {
      cellReselHysteresis := '110'B,                 // cell reselected hysteresis
      mS_TXPWR_MAX_CCH := px_MS_TXPWR_MAX_CCH,       // MS maximum TX power for CCH
      acs              := '0'B,                      // additional reselect parameter indicator
      neci             := '1'B,                      // half rate support
      rXLEV_ACCESS_MIN := px_RXLEV_ACCESS_MIN        // MS minimum received signal level
    },         // Cell Selection Parameters 44.018 clause 10.5.2.4
    radioLinkTimeout := '0001'B,                     // RADIO-LINK-TIMEOUT = 8 SACCH blocks
    nccPermitted := '02'O,                           // NCC permitted = 0000 0010
    dN_Ind       := '0'B,                            // dynamic ARFCN mapping not used
    tlli         := tsc_TLLI_Initial,
    oldTlli      := tsc_TLLI_Initial
  };

  template (value) DRXparameter cs_SplitPGCycleInitial := {
    iei         := omit,
    splitPGcycleCode := '00000000'B,                 // Split PG cycle code
    cnDRXcoef   := '0000'B,                          // CN specific DRX cycle length coefficient
    splitOnCCCH := px_SplitOnCCCH,                   // Split on CCCCH
    nonDRXtimer := '000'B                            // non-DRX timer
  };


  } // end group Freq_templates

  //----------------------------------------------------------------------------
  // Access to Cell Array
  function f_GERAN_CellInfo_GetIndex (GERAN_CellId_Type p_CellId) return integer
  {
    select (p_CellId)
    {
      case (geran_Cell24) {
        return 0;
      } case (geran_Cell25) {
        return 1;
      } case (geran_Cell26) {
        return 2;
      } case else {
        FatalError (__FILE__, __LINE__, "Invalid CellId");
        return 0;
      }
    }
  }

  function f_GERAN_CellInfo_GetCellIdentity(GERAN_CellId_Type p_CellId) return O2_Type
  {
    select (p_CellId)
    {
      case (geran_Cell24) {
        return '0001'O;
      } case (geran_Cell25) {
      return '0002'O;
      } case (geran_Cell26) {
        return '0003'O;
      } case else {
        FatalError (__FILE__, __LINE__, "Invalid CellId");
        return '0000'O;
      }
    }
  }

  function f_GERAN_CellArray_Init () return GERAN_CellArray_Type
  {
    var template (value) GERAN_CellArray_Type v_GERAN_Cells;
    var O2_Type v_CellId;
    var integer v_Index;

    // fill in frequencies first
    v_GERAN_Cells := f_GERAN_CellInfoFrequencies_Init ();

    // then do the rest for each cell
    v_Index := f_GERAN_CellInfo_GetIndex (geran_Cell24);
    v_CellId := f_GERAN_CellInfo_GetCellIdentity (geran_Cell24);
    v_GERAN_Cells[0].info := cs_G_CommonCellConfigInfoDef (v_CellId);

    v_Index := f_GERAN_CellInfo_GetIndex (geran_Cell25);
    v_CellId := f_GERAN_CellInfo_GetCellIdentity (geran_Cell25);
    v_GERAN_Cells[1].info := cs_G_CommonCellConfigInfoDef (v_CellId);
    v_GERAN_Cells[1].info.lac := '0002'O; // LAC should be different in every cell

    v_Index := f_GERAN_CellInfo_GetIndex (geran_Cell26);
    v_CellId := f_GERAN_CellInfo_GetCellIdentity (geran_Cell26);
    v_GERAN_Cells[2].info := cs_G_CommonCellConfigInfoDef (v_CellId);
    v_GERAN_Cells[2].info.lac := '0003'O; // LAC should be different in every cell

    return valueof(v_GERAN_Cells);
  }

  function f_GERAN_CellInfoFrequencies_Init() return GERAN_CellArray_Type
  { // This initialises the global array with values specified in 51.010-1, clause 40

    var template (value) GERAN_CellArray_Type v_FreqList;

    select (px_GERAN_BandUnderTest)
    {
      case (GSM_P900, GSM_E900)
        {
          v_FreqList[0].freq.bCCH_Freq := '0000010100'B;   // Serving cell: 20
          v_FreqList[0].freq.gPRSCh_Freq := '0000011110'B; // GPRS Ch: 30
          v_FreqList[0].freq.cellAllocation := cs_CellAllocGPRS900_Cell24;
          v_FreqList[0].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS900;
          v_FreqList[0].freq.arfcnList := {5, 80,90,100, 110,120,122,124};
          v_FreqList[0].freq.extNeighBCCHFreqList := cs_ExtNeighBCCH_FreqList2bis;
          v_FreqList[0].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[1].freq.bCCH_Freq := '0001101110'B;    // Serving cell: 110
          v_FreqList[1].freq.gPRSCh_Freq := '0000100011'B; // GPRS Ch: 35
          v_FreqList[1].freq.cellAllocation := cs_CellAllocGPRS900_Cell25;
          v_FreqList[1].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS900;
          v_FreqList[1].freq.arfcnList := {5, 20, 80,90,100, 120,122,124};
          v_FreqList[1].freq.extNeighBCCHFreqList := cs_ExtNeighBCCH_FreqList2bis;
          v_FreqList[1].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[2].freq.bCCH_Freq := '0000000101'B; //5
          v_FreqList[2].freq.gPRSCh_Freq := '0000111100'B; // GPRS Ch: 60
          v_FreqList[2].freq.cellAllocation := cs_CellAllocGPRS900_Cell26;
          v_FreqList[2].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS900;
          v_FreqList[2].freq.arfcnList := {20, 80,90,100, 110,120,122,124};
          v_FreqList[2].freq.extNeighBCCHFreqList := cs_ExtNeighBCCH_FreqList2bis;
          v_FreqList[2].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band
        }
      case (DCS1800)
        {
          v_FreqList[0].freq.bCCH_Freq := '1001001110'B; // Serving cell: 590
          v_FreqList[0].freq.gPRSCh_Freq := '1010001010'B; // GPRS Ch: 650
          v_FreqList[0].freq.cellAllocation := cs_CellAllocGPRS1800_1900_Cell24;
          v_FreqList[0].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS1800;
          v_FreqList[0].freq.arfcnList := {515, 600, 700, 780, 810, 870, 875, 885};
          v_FreqList[0].freq.extNeighBCCHFreqList := omit;
          v_FreqList[0].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[1].freq.bCCH_Freq := '1010111100'B;  // 700
          v_FreqList[1].freq.gPRSCh_Freq := '1011010101'B; // GPRS Ch: 725
          v_FreqList[1].freq.cellAllocation := cs_CellAllocGPRS1800_1900_Cell25;
          v_FreqList[1].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS1800;
          v_FreqList[1].freq.arfcnList := {515, 590, 600, 780, 810, 870, 875, 885};
          v_FreqList[1].freq.extNeighBCCHFreqList := omit;
          v_FreqList[1].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[2].freq.bCCH_Freq := '1000000011'B; // Serving cell: 515
          v_FreqList[2].freq.gPRSCh_Freq := '1011101110'B; // GPRS Ch: 750
          v_FreqList[2].freq.cellAllocation := cs_CellAllocGPRS1800_1900_Cell26;
          v_FreqList[2].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS1800;
          v_FreqList[2].freq.arfcnList := {590, 600, 700, 780, 810, 870, 875, 885};
          v_FreqList[2].freq.extNeighBCCHFreqList := omit;
          v_FreqList[2].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band
        }
      case (PCS1900)
        {
          v_FreqList[0].freq.bCCH_Freq := '1001001110'B;  // Serving cell: 590
          v_FreqList[0].freq.gPRSCh_Freq := '1010001010'B; // GPRS Ch: 650
          v_FreqList[0].freq.cellAllocation := cs_CellAllocGPRS1800_1900_Cell24;
          v_FreqList[0].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS1900;
          v_FreqList[0].freq.arfcnList := {515, 600, 655, 700, 710, 740, 780, 810};
          v_FreqList[0].freq.extNeighBCCHFreqList := omit;
          v_FreqList[0].freq.bandIndicator := '1'B;                         // ARFCN band = PCS1900 band

          v_FreqList[1].freq.bCCH_Freq := '1010111100'B; // 700
          v_FreqList[1].freq.gPRSCh_Freq := '1011010101'B; // GPRS Ch: 725
          v_FreqList[1].freq.cellAllocation := cs_CellAllocGPRS1800_1900_Cell25;
          v_FreqList[1].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS1900;
          v_FreqList[1].freq.arfcnList := {515, 590, 600, 655, 710, 740, 780, 810};
          v_FreqList[1].freq.extNeighBCCHFreqList := omit;
          v_FreqList[1].freq.bandIndicator := '1'B;                         // ARFCN band = PCS1900 band

          v_FreqList[2].freq.bCCH_Freq := '1000000011'B; //Serving cell: 515
          v_FreqList[2].freq.gPRSCh_Freq := '1011110011'B; // GPRS Ch: 755
          v_FreqList[2].freq.cellAllocation := cs_CellAllocGPRS1800_1900_Cell26;
          v_FreqList[2].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS1900;
          v_FreqList[2].freq.arfcnList := {590, 600, 655, 700, 710, 740, 780, 810};
          v_FreqList[2].freq.extNeighBCCHFreqList := omit;
          v_FreqList[2].freq.bandIndicator := '1'B;                         // ARFCN band = PCS1900 band
        }
      case (GSM450)
        {
          v_FreqList[0].freq.bCCH_Freq := '0100001111'B;    // Serving cell: 271
          v_FreqList[0].freq.gPRSCh_Freq := '0100010100'B;  // GPRS Ch: 276
          v_FreqList[0].freq.cellAllocation := cs_CellAllocGSM450;
          v_FreqList[0].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS450;
          v_FreqList[0].freq.arfcnList := {259, 263, 269, 275, 279, 283, 287, 292};
          v_FreqList[0].freq.extNeighBCCHFreqList := omit;
          v_FreqList[0].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[1].freq.bCCH_Freq := '0100100000'B; //288
          v_FreqList[1].freq.gPRSCh_Freq := '0100011100'B;  // GPRS Ch: 284
          v_FreqList[1].freq.cellAllocation := cs_CellAllocGSM450;
          v_FreqList[1].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS450;
          v_FreqList[1].freq.arfcnList := {259, 263, 269, 275, 279, 283, 287, 292};
          v_FreqList[1].freq.extNeighBCCHFreqList := omit;
          v_FreqList[1].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[2].freq.bCCH_Freq := '0100000100'B; // Serving cell: 260
          v_FreqList[2].freq.gPRSCh_Freq := '0100001000'B;  // GPRS Ch: 264
          v_FreqList[2].freq.cellAllocation := cs_CellAllocGSM450;
          v_FreqList[2].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS450;
          v_FreqList[2].freq.arfcnList := {259, 263, 269, 275, 279, 283, 287, 292};
          v_FreqList[2].freq.extNeighBCCHFreqList := omit;
          v_FreqList[2].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band
        }
      case (GSM480)
        {
          v_FreqList[0].freq.bCCH_Freq := '0101001000'B;  // Serving cell: 328
          v_FreqList[0].freq.gPRSCh_Freq := '0101000100'B; // GPRS Ch: 324
          v_FreqList[0].freq.cellAllocation := cs_CellAllocGSM480;
          v_FreqList[0].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS480;
          v_FreqList[0].freq.arfcnList := {306, 310, 316, 322, 326, 330, 334, 339};
          v_FreqList[0].freq.extNeighBCCHFreqList := omit;
          v_FreqList[0].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[1].freq.bCCH_Freq := '0101010000'B; //336
          v_FreqList[1].freq.gPRSCh_Freq := '0101001100'B; // GPRS Ch: 332
          v_FreqList[1].freq.cellAllocation := cs_CellAllocGSM480;
          v_FreqList[1].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS480;
          v_FreqList[1].freq.arfcnList := {306, 310, 316, 322, 326, 330, 334, 339};
          v_FreqList[1].freq.extNeighBCCHFreqList := omit;
          v_FreqList[1].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[2].freq.bCCH_Freq := '0100110100'B;   // Serving cell: 308
          v_FreqList[2].freq.gPRSCh_Freq := '0100111000'B; // GPRS Ch: 312
          v_FreqList[2].freq.cellAllocation := cs_CellAllocGSM480;
          v_FreqList[2].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS480;
          v_FreqList[2].freq.arfcnList := {306, 310, 316, 322, 326, 330, 334, 339};
          v_FreqList[2].freq.extNeighBCCHFreqList := omit;
          v_FreqList[2].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band
        }
      case (GSM850)
        {
          v_FreqList[0].freq.bCCH_Freq := '0010010011'B;  // Serving cell: 147
          v_FreqList[0].freq.gPRSCh_Freq := '0010011101'B; // GPRS Ch: 157
          v_FreqList[0].freq.cellAllocation := cs_CellAllocGPRS850_Cell24;
          v_FreqList[0].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS850;
          v_FreqList[0].freq.arfcnList := {137,157,177,197,207,217,227,237};
          v_FreqList[0].freq.extNeighBCCHFreqList := omit;
          v_FreqList[0].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[1].freq.bCCH_Freq := '0011011001'B;  //217
          v_FreqList[1].freq.gPRSCh_Freq := '0011011110'B; // GPRS Ch: 222
          v_FreqList[1].freq.cellAllocation := cs_CellAllocGPRS850_Cell25;
          v_FreqList[1].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS850;
          v_FreqList[1].freq.arfcnList := {137,147,157,177,197,207,227,237};
          v_FreqList[1].freq.extNeighBCCHFreqList := omit;
          v_FreqList[1].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[2].freq.bCCH_Freq := '0010001001'B; // Serving cell: 137
          v_FreqList[2].freq.gPRSCh_Freq := '0011110010'B; // GPRS Ch: 242
          v_FreqList[2].freq.cellAllocation := cs_CellAllocGPRS850_Cell26;
          v_FreqList[2].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS850;
          v_FreqList[2].freq.arfcnList := {147,157,177,197,207,217,227,237};
          v_FreqList[2].freq.extNeighBCCHFreqList := omit;
          v_FreqList[2].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band
        }
      case (GSM710, GSM750, T_GSM810)
        {
          v_FreqList[0].freq.bCCH_Freq := '0111001001'B;   // Serving cell: 457
          v_FreqList[0].freq.gPRSCh_Freq := '0111010011'B; // GPRS channel : 467
          v_FreqList[0].freq.cellAllocation := cs_CellAllocGPRS700_Cell24;
          v_FreqList[0].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS700;
          v_FreqList[0].freq.arfcnList := {438,447,467,477,487,497,502,507};
          v_FreqList[0].freq.extNeighBCCHFreqList := omit;
          v_FreqList[0].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[1].freq.bCCH_Freq := '0111011101'B; // 477
          v_FreqList[1].freq.gPRSCh_Freq := '0111001001'B; // GPRS Ch: 457
          v_FreqList[1].freq.cellAllocation := cs_CellAllocGPRS700_Cell25;
          v_FreqList[1].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS700;
          v_FreqList[1].freq.arfcnList := {438,447,457,467,487,497,502,507};
          v_FreqList[1].freq.extNeighBCCHFreqList := omit;
          v_FreqList[1].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band

          v_FreqList[2].freq.bCCH_Freq := '0110111111'B; //447
          v_FreqList[2].freq.gPRSCh_Freq := '0110110110'B; // GPRS Ch: 438
          v_FreqList[2].freq.cellAllocation := cs_CellAllocGPRS700_Cell26;
          v_FreqList[2].freq.neighBCCHFreqList := cs_NeighBCCH_FreqListGPRS700;
          v_FreqList[2].freq.arfcnList := {438,457,467,477,487,497,502,507};
          v_FreqList[2].freq.extNeighBCCHFreqList := omit;
          v_FreqList[2].freq.bandIndicator := '0'B;                         // ARFCN band = DCS1800 band
        }
    } // end of select
    return valueof(v_FreqList);

  } // end of f_GERAN_CellInfoFrequencies_Init

  function f_GERAN_Security_Init() return GERAN_SecurityInfo_Type
  {
    var template (value) GERAN_SecurityInfo_Type v_SecurityInfo;

    v_SecurityInfo.authPS     := cs_CommonAuthParams_Init(px_eAuthRAND);
    v_SecurityInfo.authCS     := cs_CommonAuthParams_Init(px_eAuthRAND);
    v_SecurityInfo.cipherKey  := px_CipherKey;                 // cipher key
    v_SecurityInfo.cipherMode := cs_CipherModeSettingGSM;            // ciphering algorithm and cipher starting flag, 3GPP TS 44.018 clause 10.5.2.9
    v_SecurityInfo.gprsCipherAlg := '000'B;

    return valueof(v_SecurityInfo);
  }

  function f_GERAN_SystemInformation_Init ( GERAN_CellArray_Type p_CellArray, IRAT_CoOrd_SysInfo_List_Type p_SysInfoList) return GERAN_CellArray_Type
  {
    var CoOrd_EUTRASysInfo_List_Type v_EUTRA_SysInfo;
    var CoOrd_UTRANSysInfo_List_Type v_UTRAN_SysInfo;
    var GERAN_CellArray_Type v_CellArray := p_CellArray;
    var template (value) GERAN_SystemInformation_Type v_SysInfo;
    var template (value) LocAreaId v_LAI;
    var template (value) EUTRANMeasParams_SI2 v_EUTRA_SI2;
    var integer v_Index := 0;
    var integer v_NoOfPTCs := sizeof (p_SysInfoList);

    select (v_NoOfPTCs) {
      case (1) {
        v_EUTRA_SysInfo := p_SysInfoList[0].Eutra;
      }
      case (2) {
        if (ischosen(p_SysInfoList[0].Eutra)) {
          v_EUTRA_SysInfo := p_SysInfoList[0].Eutra;
          v_UTRAN_SysInfo := p_SysInfoList[1].Utran;
        }
        else {
          v_UTRAN_SysInfo := p_SysInfoList[0].Utran;
          v_EUTRA_SysInfo := p_SysInfoList[1].Eutra;
        }
      }
      case else {
        FatalError (__FILE__, __LINE__, "wrong PTC configuration specified in test case");
      }
    }

    for (v_Index := 0; v_Index < tsc_GERAN_NumberOfCells; v_Index := v_Index + 1)
      {
        v_LAI := cs_LAI (omit, v_CellArray[v_Index].info.plmn, v_CellArray[v_Index].info.lac);

        v_SysInfo.si1 := cs_SysInfoType1(v_CellArray[v_Index].freq.cellAllocation, v_CellArray[v_Index].info.rachCtrlParams, v_CellArray[v_Index].freq.bandIndicator);
        v_SysInfo.si2 := cs_SysInfoType2(v_CellArray[v_Index].freq.neighBCCHFreqList, v_CellArray[v_Index].info.nccPermitted, v_CellArray[v_Index].info.rachCtrlParams);
        v_SysInfo.si2bis := cs_SysInfoType2bis(v_CellArray[v_Index].freq.extNeighBCCHFreqList, v_CellArray[v_Index].info.rachCtrlParams);
        v_SysInfo.si3 := cs_SysInfoType3(v_CellArray[v_Index].info.cellIdentity,
                                         v_LAI,
                                         v_CellArray[v_Index].info.controlChDesr,
                                         cs_CellOptionBCCH( v_CellArray[v_Index].info.dN_Ind, v_CellArray[v_Index].info.dTX,  v_CellArray[v_Index].info.radioLinkTimeout),
                                         v_CellArray[v_Index].info.cellSelParams, v_CellArray[v_Index].info.rachCtrlParams,
                                         cs_SI3RO_GPRS_SI2quater);
        v_SysInfo.si4 := cs_SysInfoType4(v_LAI, v_CellArray[v_Index].info.cellSelParams, v_CellArray[v_Index].info.rachCtrlParams, cs_SI4_RO_GPRS);
        v_SysInfo.si5 := cs_SysInfoType5(v_CellArray[v_Index].freq.neighBCCHFreqList);
        v_SysInfo.si5bis := cs_SysInfoType5bis(v_CellArray[v_Index].freq.extNeighBCCHFreqList);
        v_SysInfo.si6 := cs_SysInfoType6(v_CellArray[v_Index].info.cellIdentity,
                                         v_LAI,
                                         cs_CellOptionSACCH( v_CellArray[v_Index].info.dtx8, v_CellArray[v_Index].info.dtx65, v_CellArray[v_Index].info.radioLinkTimeout),
                                         v_CellArray[v_Index].info.nccPermitted,
                                         cs_SI6_RO_Spare(v_CellArray[v_Index].freq.bandIndicator));
        v_SysInfo.si13 := cs_SysInfoType13(cs_SI13_RO_GPRS(v_CellArray[v_Index].info.rac, v_CellArray[v_Index].info.nmo));
        v_SysInfo.si15 := cs_SysInfoType15(cs_SI15_RO('0110'B));  // value for GSM 700.  This will be changed according to the band under test when sent, if required

        if (sizeof(v_EUTRA_SysInfo)==4) {
          v_EUTRA_SI2 := cs_EUTRAN_MeasParams_SI2 (cs_RptdEARFCNList4(int2bit(v_EUTRA_SysInfo[0].Arfcn,16), int2bit(v_EUTRA_SysInfo[1].Arfcn,16), int2bit(v_EUTRA_SysInfo[2].Arfcn,16), int2bit(v_EUTRA_SysInfo[3].Arfcn,16)));
        } else {
          v_EUTRA_SI2 := cs_EUTRAN_MeasParams_SI2 (cs_RptdEARFCNList5(int2bit(v_EUTRA_SysInfo[0].Arfcn,16), int2bit(v_EUTRA_SysInfo[1].Arfcn,16), int2bit(v_EUTRA_SysInfo[2].Arfcn,16), int2bit(v_EUTRA_SysInfo[3].Arfcn,16), int2bit(v_EUTRA_SysInfo[4].Arfcn,16)));
        }
        if (v_NoOfPTCs == 2) {
          if (ischosen(v_UTRAN_SysInfo[0].FDD)) {
            v_SysInfo.si2quater_1 := cs_SysInfoType2quater(cs_SI2quaterRO('0000'B,
                                                                          '0001'B,
                                                                          '1'B,
                                                                          cs_SI2quater_3G_4N_3FCell(int2bit(v_UTRAN_SysInfo[0].FDD.Freq, 14),
                                                                                                    int2bit(v_UTRAN_SysInfo[1].FDD.Freq, 14),
                                                                                                    int2bit( v_UTRAN_SysInfo[1].FDD.ScramblingCode, 9) & '0'B,
                                                                                                    int2bit(v_UTRAN_SysInfo[2].FDD.Freq, 14),
                                                                                                    int2bit( v_UTRAN_SysInfo[1].FDD.ScramblingCode, 9) & '0'B,
                                                                                                    int2bit(v_UTRAN_SysInfo[3].FDD.Freq, 14),
                                                                                                    int2bit( v_UTRAN_SysInfo[1].FDD.ScramblingCode, 9) & '0'B),
                                                                          '0'B, omit,
                                                                          '0'B, omit,
                                                                          omit));  // Can't fit everything in one instance, so have to split it up
            v_SysInfo.si2quater_2 := cs_SysInfoType2quater(cs_SI2quaterRO('0001'B, '0001'B,'0'B, omit,
                                                                          '1'B, cs_SI2quaterMeasParams3G_ISHO,
                                                                          '0'B, omit,
                                                                          v_EUTRA_SI2));
          } else { //TDD
            v_SysInfo.si2quater_1 := cs_SysInfoType2quater(cs_SI2quaterRO('0000'B,
                                                                          '0001'B,
                                                                          '1'B,
                                                                          cs_SI2quater_3G_4N_3FCell_TDD(int2bit(v_UTRAN_SysInfo[0].TDD.Freq, 14),
                                                                                                        int2bit(v_UTRAN_SysInfo[1].TDD.Freq, 14),
                                                                                                        int2bit( v_UTRAN_SysInfo[1].TDD.CellParametersID, 7)& v_UTRAN_SysInfo[1].TDD.Tstd& v_UTRAN_SysInfo[1].TDD.Diversity,
                                                                                                        int2bit(v_UTRAN_SysInfo[2].TDD.Freq, 14),
                                                                                                        int2bit( v_UTRAN_SysInfo[1].TDD.CellParametersID, 7)& v_UTRAN_SysInfo[1].TDD.Tstd& v_UTRAN_SysInfo[1].TDD.Diversity,
                                                                                                        int2bit(v_UTRAN_SysInfo[3].TDD.Freq, 14),
                                                                                                        int2bit( v_UTRAN_SysInfo[1].TDD.CellParametersID, 7)& v_UTRAN_SysInfo[1].TDD.Tstd& v_UTRAN_SysInfo[1].TDD.Diversity),
                                                                          '0'B, omit,
                                                                          '0'B, omit,
                                                                          omit));  // Can't fit everything in one instance, so have to split it up
            v_SysInfo.si2quater_2 := cs_SysInfoType2quater(cs_SI2quaterRO('0001'B, '0001'B,'0'B, omit,
                                                                          '1'B, cs_SI2quaterMeasParams3G_ISHO,
                                                                          '0'B, omit,
                                                                          v_EUTRA_SI2));
          }
        } else { // No UTRAN
          v_SysInfo.si2quater_1 := cs_SysInfoType2quater(cs_SI2quaterRO('0000'B, '0000'B,'0'B, omit,
                                                                        '0'B, omit,
                                                                        '0'B, omit,
                                                                        v_EUTRA_SI2));
          v_SysInfo.si2quater_2 := omit;  // so everything can fit in one instance
        }
        v_CellArray[v_Index].sysInfo := valueof(v_SysInfo);
      }
    return v_CellArray;
  }
  //----------------------------------------------------------------------------
  function f_GERAN_IR_SysInfoInit (GERAN_CellArray_Type p_CellInfo)
    return template (value) IRAT_CoOrd_SysInfo_Type
  {
    var template (value) CoOrd_GERANSysInfo_Type v_Cellf11;
    var template (value) CoOrd_GERANSysInfo_Type v_Cellf12;
    var template (value) CoOrd_GERANSysInfo_Type v_Cellf13;
    var integer v_Index_Cell24 := f_GERAN_CellInfo_GetIndex(geran_Cell24);
    var integer v_Index_Cell25 := f_GERAN_CellInfo_GetIndex(geran_Cell25);
    var integer v_Index_Cell26 := f_GERAN_CellInfo_GetIndex(geran_Cell26);

    v_Cellf11 := cs_CoOrdGERANSysInfo(bit2int(p_CellInfo[v_Index_Cell24].freq.bCCH_Freq),
                                      p_CellInfo[v_Index_Cell24].freq.arfcnList,
                                      p_CellInfo[v_Index_Cell24].info.ncc,
                                      p_CellInfo[v_Index_Cell24].info.bcc,
                                      p_CellInfo[v_Index_Cell24].info.cellIdentity,
                                      p_CellInfo[v_Index_Cell24].freq.bandIndicator);

    v_Cellf12 := cs_CoOrdGERANSysInfo(bit2int(p_CellInfo[v_Index_Cell25].freq.bCCH_Freq),
                                      p_CellInfo[v_Index_Cell25].freq.arfcnList,
                                      p_CellInfo[v_Index_Cell25].info.ncc,
                                      p_CellInfo[v_Index_Cell25].info.bcc,
                                      p_CellInfo[v_Index_Cell24].info.cellIdentity,
                                      p_CellInfo[v_Index_Cell24].freq.bandIndicator);

    v_Cellf13 := cs_CoOrdGERANSysInfo(bit2int(p_CellInfo[v_Index_Cell26].freq.bCCH_Freq),
                                      p_CellInfo[v_Index_Cell26].freq.arfcnList,
                                      p_CellInfo[v_Index_Cell26].info.ncc,
                                      p_CellInfo[v_Index_Cell26].info.bcc,
                                      p_CellInfo[v_Index_Cell24].info.cellIdentity,
                                      p_CellInfo[v_Index_Cell24].freq.bandIndicator);

    return cs_CoOrdGERAN_SysInfo(v_Cellf11, v_Cellf12, v_Cellf13);
  }
  //----------------------------------------------------------------------------
} // End of module

