rf_sn_sweep.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:4k
源码类别:

MTK

开发平台:

C++ Builder

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2001
  8. *
  9. *****************************************************************************/
  10. /*****************************************************************************
  11.  *
  12.  * Filename:
  13.  * ---------
  14.  *   rf_sn_sweep.h
  15.  *
  16.  * Project:
  17.  * --------
  18.  *   Maui META APP
  19.  *
  20.  * Description:
  21.  * ------------
  22.  *  RF saturate and noise floor sweep header
  23.  *
  24.  * Author:
  25.  * -------
  26.  *  Andy Ueng (mtk00490)
  27.  *
  28.  *============================================================================
  29.  *             HISTORY
  30.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  31.  *------------------------------------------------------------------------------
  32.  * $Revision$
  33.  * $Modtime$
  34.  * $Log$
  35.  *
  36.  *------------------------------------------------------------------------------
  37.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  38.  *============================================================================
  39.  ****************************************************************************/
  40. //---------------------------------------------------------------------------
  41. #ifndef _RF_SN_SWEEP_H_
  42. #define _RF_SN_SWEEP_H_
  43. #include "age1960.h"
  44. #include "meta_rf_cfg.h"
  45. #ifndef  _RF_PM_H_
  46. #include "rf_pm.h"
  47. #endif
  48. #include "rf_stop.h"
  49. #ifndef  _RCT_CTRL_H_
  50. #include "rct_ctrl.h"
  51. #endif
  52. //----------------------------------------------------------------------------
  53. //----------------------------------------------------------------------------
  54. //----------------------------------------------------------------------------
  55. typedef struct
  56. {
  57.     AnsiString as_ADDR;
  58.     int i_TimeOut;
  59.     E_DEVICE_TYPE e_device_type;
  60.     TNotifyEvent ne_onTermSuccess;
  61.     TNotifyEvent ne_onTermByUser;
  62.     AnsiString  as_Log;
  63.     TMETA_rf_cfg *rf_cfg;
  64.     TStringList *st_Log;
  65.     E_BANDSEL e_band;
  66.     short s_arfcn;
  67.     unsigned int  pm_count;
  68.     int  pm_per_frame;
  69.     int  max_gain;
  70.     int  min_gain;
  71.     int  gain_step;
  72.     double d_min_P_DL;
  73.     double d_max_P_DL;
  74.     double d_P_DL_step;
  75.     double d_threshold;
  76.     bool   b_gain_change_first;
  77. }S_SNSweep;
  78. typedef struct
  79. {
  80.     int i_band_idx;
  81.     int i_arfcn;
  82.    // double d_dsp_power;
  83.     int i_saturate_used_gain;
  84.     double d_saturate_equ_power;
  85.     double d_noise_floor_equ_power;
  86.     double d_saturate_antpwr;
  87.     double d_saturate_dsppwr;
  88.     int i_noise_floor_used_gain;
  89.     double d_noise_floor_dsppwr;
  90.     double d_noise_floor_antpwr;
  91.     double d_linear_range;
  92. }S_SNResult;
  93. //---------------------------------------------------------------------------
  94. class CRF_SN_SWEEP : public TThread
  95. {
  96. private:
  97.      bool b_title;
  98.      S_SNSweep  *p_sn_sweep;
  99.      AnsiString as_Msg;
  100.      bool  tb_title;
  101.      S_SNResult  ts_snresult;
  102.      S_RCT rct;
  103.      CRCTCTRL  rct_ctrl;
  104.      CRFPM    RF_PM_Object;
  105.      CRFSTOP  RF_STOP_Object;
  106. protected:
  107.      void __fastcall Execute();
  108. public:
  109.     __fastcall CRF_SN_SWEEP(
  110.                                            bool CreateSuspended,
  111.                                            S_SNSweep *p_sn_sweep
  112.                                           );
  113.     bool __fastcall SN_CfgRead( void );
  114.     bool __fastcall SN_Sweep( void );
  115.     void _fastcall ShowMsg();
  116.     void _fastcall SyncShowMsg(AnsiString as);
  117.     void _fastcall FillSNResult( void );
  118.     void _fastcall SyncFillSNResult(bool  is_title, S_SNResult &sn_result);
  119. };
  120. #endif