- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2001
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * rf_sn_sweep.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * RF saturate and noise floor sweep header
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- //---------------------------------------------------------------------------
- #ifndef _RF_SN_SWEEP_H_
- #define _RF_SN_SWEEP_H_
- #include "age1960.h"
- #include "meta_rf_cfg.h"
- #ifndef _RF_PM_H_
- #include "rf_pm.h"
- #endif
- #include "rf_stop.h"
- #ifndef _RCT_CTRL_H_
- #include "rct_ctrl.h"
- #endif
- //----------------------------------------------------------------------------
- //----------------------------------------------------------------------------
- //----------------------------------------------------------------------------
- typedef struct
- {
- AnsiString as_ADDR;
- int i_TimeOut;
- E_DEVICE_TYPE e_device_type;
- TNotifyEvent ne_onTermSuccess;
- TNotifyEvent ne_onTermByUser;
- AnsiString as_Log;
- TMETA_rf_cfg *rf_cfg;
- TStringList *st_Log;
- E_BANDSEL e_band;
- short s_arfcn;
- unsigned int pm_count;
- int pm_per_frame;
- int max_gain;
- int min_gain;
- int gain_step;
- double d_min_P_DL;
- double d_max_P_DL;
- double d_P_DL_step;
- double d_threshold;
- bool b_gain_change_first;
- }S_SNSweep;
- typedef struct
- {
- int i_band_idx;
- int i_arfcn;
- // double d_dsp_power;
- int i_saturate_used_gain;
- double d_saturate_equ_power;
- double d_noise_floor_equ_power;
- double d_saturate_antpwr;
- double d_saturate_dsppwr;
- int i_noise_floor_used_gain;
- double d_noise_floor_dsppwr;
- double d_noise_floor_antpwr;
- double d_linear_range;
- }S_SNResult;
- //---------------------------------------------------------------------------
- class CRF_SN_SWEEP : public TThread
- {
- private:
- bool b_title;
- S_SNSweep *p_sn_sweep;
- AnsiString as_Msg;
- bool tb_title;
- S_SNResult ts_snresult;
- S_RCT rct;
- CRCTCTRL rct_ctrl;
- CRFPM RF_PM_Object;
- CRFSTOP RF_STOP_Object;
- protected:
- void __fastcall Execute();
- public:
- __fastcall CRF_SN_SWEEP(
- bool CreateSuspended,
- S_SNSweep *p_sn_sweep
- );
- bool __fastcall SN_CfgRead( void );
- bool __fastcall SN_Sweep( void );
- void _fastcall ShowMsg();
- void _fastcall SyncShowMsg(AnsiString as);
- void _fastcall FillSNResult( void );
- void _fastcall SyncFillSNResult(bool is_title, S_SNResult &sn_result);
- };
- #endif