/******************************************************************************/
// @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-10 15:33:02 +0200 (Fri, 10 Sep 2010) $
// $Rev: 3842 $
/******************************************************************************/
module RRC_ConnRel_C2K_CDMA2000 {
  import from CommonIratDefs all;
  import from CDMA2000_CellInfo all;
  import from CDMA2000_CommonFunctions all;
  import from CDMA2000_Component all;
  import from CDMA2000_CommonDefs all;

//==============================================================================
// Functions
//==============================================================================

  /*
   * @desc      REFERENCE TS 36.523-1 clause 8.1.3.9
   * RRC connection release / Redirection from E-UTRAN to CDMA2000-HRPD
   * @status
   */
  function f_TC_8_1_3_9_CDMA2000 ( ) runs on CDMA2000_PTC {
    
    var boolean v_TriggerRxd := false;
    
    ///Initialise test case
    f_CDMA2000_Init ( EUTRA_CDMA2000 );
    // Set MAX reference power corresponding to Tor/Ioc =-5 and -20 for cell 15 and 16 respectively
    // Note as cell 15 and 16 are on different frequency the
    f_CDMA2000_CellInfo_InitMaxReferencePower(cdma2000_Cell15, cs_CDMA2000_AbsoluteCellPowerDef(-55, -55));    //Ioc =-55, Ior/Ioc=-0, Pilot offset =-7
    
    //Send Sys info for ARFCN
    f_CDMA2000_Send_IR_SysInfoToEUTRA (cdma2000_Cell15 );
    
    //Create CDMA2000 cell15 and broadcast System Infomation
    f_CDMA2000CreateCell ( cdma2000_Cell15 );
    
    //First Trigger: to Change cell power according to T0 after EUTRA Registration
    v_TriggerRxd := f_WaitForIRATCoOrd_Trigger (EUTRA);
    
    f_CDMA2000_TestBody_Set( true );
    f_CDMA2000_SetCellPower( cdma2000_Cell15, -60 );//i.e attenuation of 5, Ior =-60 , Ioc=-55, results in Pilot Ec/Io = -13
    
    //@siclog "Step 2" siclog@
    //Step 2: Check if UE camps on Cell 15
    f_CDMA2000_RegisterHRPDCell (cdma2000_Cell15);
    f_CDMA2000_PreliminaryPass(__FILE__, __LINE__, "UE has sent the Access probe and registered on HRPD cell");
    
    //End TestBody
    //------------------------------------------------
    f_CDMA2000_TestBody_Set ( false );
    // send coordination message for end of test case
    f_SendIRATCoOrd ( EUTRA, cms_IRAT_Trigger );
    // Swith off/power off and release cells
    
    f_CDMA2000_Postamble (cdma2000_Cell15
                       //UE is active and connected state
                       );
  }

}
