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

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) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  *   T_CFG_handle.cpp
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   Maui META APP
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *  Calibration CFG file handle source
  48.  *
  49.  * Author:
  50.  * -------
  51.  *  Andy Ueng (mtk00490)
  52.  *
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * $Revision$
  58.  * $Modtime$
  59.  * $Log$
  60.  * 
  61.  *------------------------------------------------------------------------------
  62.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  63.  *============================================================================
  64. ****************************************************************************/
  65. #pragma hdrstop
  66. #ifndef _T_META_FACTORY_CALIBRATION_H_
  67. #include  "T_META_factory_calibration.H"
  68. #endif
  69. #ifndef  _META_UTILS_H_
  70. #include "meta_utils.h"
  71. #endif
  72. #ifndef  _RCT_COMMON_H_
  73. #include "rct_common.h"
  74. #endif
  75. #ifndef  _TIME_UTILS_H_
  76. #include "time_utils.h"
  77. #endif
  78. //===========================================================================
  79. void __fastcall T_META_factory_calibration::Read_Common_CFG(void)
  80. {
  81.     if (AGILENT_8960 == m_pRct->device_type)
  82.     {
  83.         cfg->getGSM400_CableLoss(m_pRct->age.d400);
  84.         cfg->getGSM850_CableLoss(m_pRct->age.d850);
  85.         cfg->getGSM900_CableLoss(m_pRct->age.d900);
  86.         cfg->getDCS1800_CableLoss(m_pRct->age.d1800);
  87.         cfg->getPCS1900_CableLoss(m_pRct->age.d1900);
  88.         cfg->getTimeOut(m_pRct->age.TMO);
  89.         cfg->getGPIB_Addr(m_pRct->age.ADD);
  90.     }
  91.     else // CMU 200
  92.     {
  93.         cfg->getCMU200_INPUT_GSM850_CableLoss(m_pRct->cmu.loss_gsm850_i);
  94.         cfg->getCMU200_INPUT_GSM900_CableLoss(m_pRct->cmu.loss_gsm_i);
  95.         cfg->getCMU200_INPUT_DCS1800_CableLoss(m_pRct->cmu.loss_dcs_i);
  96.         cfg->getCMU200_INPUT_PCS1900_CableLoss(m_pRct->cmu.loss_pcs_i);
  97.         cfg->getCMU200_OUTPUT_GSM850_CableLoss( m_pRct->cmu.loss_gsm850_o );
  98.         cfg->getCMU200_OUTPUT_GSM900_CableLoss( m_pRct->cmu.loss_gsm_o );
  99.         cfg->getCMU200_OUTPUT_DCS1800_CableLoss( m_pRct->cmu.loss_dcs_o );
  100.         cfg->getCMU200_OUTPUT_PCS1900_CableLoss( m_pRct->cmu.loss_pcs_o );
  101.         cfg->getCMU200_TimeOut( m_pRct->cmu.TMO );
  102.         cfg->getCMU200_GPIB_Addr( m_pRct->cmu.ADD );
  103.         m_pRct->cmu.ADD = m_pRct->cmu.ADD.SubString(0, m_pRct->cmu.ADD.Pos("::INSTR")-1);
  104.         
  105.     }
  106.     cfg->getFreqBank( m_asFreqBank );
  107.     cfg->getARFCN_C0_GSM850( m_sARFCN_C0_GSM850 );
  108.     cfg->getARFCN_C0_GSM( m_sARFCN_C0_GSM );
  109.     cfg->getARFCN_C0_DCS( m_sARFCN_C0_DCS );
  110.     cfg->getARFCN_C0_PCS( m_sARFCN_C0_PCS );
  111.     cfg->getTSC(m_cTSC);
  112.     cfg->getP_DL(d_P_DL);
  113. }
  114. //---------------------------------------------------------------------------
  115. void __fastcall T_META_factory_calibration::Read_AFC_CFG(void)
  116. {
  117.     cfg->getAFC_BAND(m_asAFC_BAND);
  118.     cfg->getAFC_ARFCN(m_sAFC_ARFCN);
  119.     cfg->get_DAC1(m_sDAC1);
  120.     cfg->get_DAC2(m_sDAC2);
  121.     cfg->get_CRYSTAL_DAC1(m_sCRYSTAL_DAC1);
  122.     cfg->get_CRYSTAL_DAC2(m_sCRYSTAL_DAC2);
  123.     cfg->getN_AFC(m_sN_AFC);
  124.     // check
  125.     cfg->get_MAX_INIT_AFC_DAC(m_sMaxInitAfcDac);
  126.     cfg->get_MIN_INIT_AFC_DAC(m_sMinInitAfcDac);
  127.     cfg->get_MAX_AFC_SLOPE(d_max_AfcSlope);
  128.     cfg->get_MIN_AFC_SLOPE(d_min_AfcSlope);
  129. }
  130. //---------------------------------------------------------------------------
  131. void __fastcall T_META_factory_calibration::Read_CrystalAFC_CFG(void)
  132. {
  133.     cfg->get_CRYSTAL_AFC_BAND(as_CRYSTAL_AFC_BAND);
  134.     cfg->get_CRYSTAL_AFC_ARFCN(m_sCRYSTAL_AFC_ARFCN);
  135.     cfg->get_CRYSTAL_AFC_TCH_P_DL(d_CRYSTAL_AFC_TCH_P_DL);
  136.     cfg->get_CRYSTAL_AFC_GSM850_PCL(i_CRYSTAL_AFC_GSM850_PCL);
  137.     cfg->get_CRYSTAL_AFC_GSM900_PCL(i_CRYSTAL_AFC_GSM900_PCL);
  138.     cfg->get_CRYSTAL_AFC_DCS1800_PCL(i_CRYSTAL_AFC_DCS1800_PCL);
  139.     cfg->get_CRYSTAL_AFC_PCS1900_PCL(i_CRYSTAL_AFC_PCS1900_PCL);
  140.     cfg->get_CRYSTAL_AFC_CAL_DAC(m_sCRYSTAL_AFC_CAL_DAC);
  141.     // MIN_CHECK_DAC
  142.     cfg->get_CRYSTAL_AFC_CHECK_DAC1(m_sCHECK_DAC[0]);
  143.     // CRYSTAL_AFC_MAX_CHECK_DAC
  144.     cfg->get_CRYSTAL_AFC_CHECK_DAC2(m_sCHECK_DAC[1]);
  145.     cfg->get_CRYSTAL_AFC_MIN_FREQ_ERR_PPM(d_CRYSTAL_AFC_MIN_FREQ_ERR_PPM);
  146.     cfg->get_CRYSTAL_AFC_MAX_FREQ_ERR_PPM(d_CRYSTAL_AFC_MAX_FREQ_ERR_PPM);
  147.     cfg->get_CRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR(m_dCRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR);
  148.     cfg->get_CRYSTAL_AFC_FREQ_ERR_MEASUSE_COUNT(m_sCRYSTAL_AFC_FREQ_ERR_MEASUSE_COUNT);
  149.     cfg->get_CRYSTAL_AFC_RECURSIVE_TIMES(m_sCRYSTAL_AFC_RECURSIVE_TIMES);
  150. }
  151. //------------------------------------------------------------------------
  152. void __fastcall T_META_factory_calibration::Read_RxPathLoss_CFG(void)
  153. {
  154.     cfg->getN_PM(iN_PM);
  155.     cfg->getM_PM(cM_PM);
  156.     // check
  157.     if ( IsFreqBankSupported(m_asFreqBank, FrequencyBand850) )
  158.     {
  159.         cfg->getGSM850_MAX_RX_LOSS( as_gsm850_max_rx_loss_p );
  160.         cfg->getGSM850_MIN_RX_LOSS( as_gsm850_min_rx_loss_p );
  161.     }
  162.     if ( IsFreqBankSupported(m_asFreqBank, FrequencyBand900) )
  163.     {
  164.         cfg->getGSM900_MAX_RX_LOSS( as_gsm900_max_rx_loss_p );
  165.         cfg->getGSM900_MIN_RX_LOSS( as_gsm900_min_rx_loss_p );
  166.     }
  167.     if ( IsFreqBankSupported(m_asFreqBank, FrequencyBand1800) )
  168.     {
  169.         cfg->getDCS1800_MAX_RX_LOSS( as_dcs1800_max_rx_loss_p );
  170.         cfg->getDCS1800_MIN_RX_LOSS( as_dcs1800_min_rx_loss_p );
  171.     }
  172.     if ( IsFreqBankSupported(m_asFreqBank, FrequencyBand1900) )
  173.     {
  174.         cfg->getPCS1900_MAX_RX_LOSS( as_pcs1900_max_rx_loss_p );
  175.         cfg->getPCS1900_MIN_RX_LOSS( as_pcs1900_min_rx_loss_p );
  176.     }
  177. }
  178. //---------------------------------------------------------------------------
  179. void __fastcall T_META_factory_calibration::Read_TXPCL_CFG(void)
  180. {
  181.     if (IsFreqBankSupported(m_asFreqBank, FrequencyBand850))
  182.     {
  183.         cfg->getGSM850_CAL_PCL( m_as_gsm850_tx_cal_pcl );
  184.         cfg->getGSM850_2CAL_PCL(m_as_gsm850_tx_2cal_pcl);
  185.         cfg->getGSM850_4CAL_PCL(m_as_gsm850_tx_4cal_pcl);
  186.         cfg->getGSM850_6CAL_PCL(m_as_gsm850_tx_6cal_pcl);
  187.         cfg->getGSM850_6CAL_DAC(m_as_gsm850_tx_6cal_dac);
  188.         cfg->getGSM850_PCL( m_as_gsm850_tx_pcl );
  189.         cfg->getGSM850_CHECK_PCL( m_as_gsm850_tx_check_pcl );
  190.         cfg->getGSM850_MAX_P( m_as_gsm850_max_p );
  191.         cfg->getGSM850_WANTED_P( m_as_gsm850_wanted_p );
  192.         cfg->getGSM850_MIN_P( m_as_gsm850_min_p );
  193.         cfg->getGSM850_C( m_as_gsm850_c );
  194.         cfg->getGSM850_CORRECTION( m_as_gsm850_correction );
  195.     }
  196.     if ( IsFreqBankSupported(m_asFreqBank, FrequencyBand900) )
  197.     {
  198.         cfg->getGSM900_CAL_PCL(m_as_gsm900_tx_cal_pcl);
  199.         cfg->getGSM900_2CAL_PCL(m_as_gsm900_tx_2cal_pcl);
  200.         cfg->getGSM900_4CAL_PCL(m_as_gsm900_tx_4cal_pcl);
  201.         cfg->getGSM900_6CAL_PCL(m_as_gsm900_tx_6cal_pcl);
  202.         cfg->getGSM900_6CAL_DAC(m_as_gsm900_tx_6cal_dac);
  203.         cfg->getGSM900_PCL( m_as_gsm900_tx_pcl );
  204.         cfg->getGSM900_CHECK_PCL( m_as_gsm900_tx_check_pcl );
  205.         cfg->getGSM900_MAX_P( m_as_gsm900_max_p );
  206.         cfg->getGSM900_WANTED_P( m_as_gsm900_wanted_p );
  207.         cfg->getGSM900_MIN_P( m_as_gsm900_min_p );
  208.         cfg->getGSM900_C( m_as_gsm900_c );
  209.         cfg->getGSM900_CORRECTION( m_as_gsm900_correction );
  210.     }
  211.     if (IsFreqBankSupported(m_asFreqBank, FrequencyBand1800))
  212.     {
  213.         cfg->getDCS1800_CAL_PCL(m_as_dcs1800_tx_cal_pcl);
  214.         cfg->getDCS1800_2CAL_PCL(m_as_dcs1800_tx_2cal_pcl);
  215.         cfg->getDCS1800_4CAL_PCL(m_as_dcs1800_tx_4cal_pcl);
  216.         cfg->getDCS1800_6CAL_PCL(m_as_dcs1800_tx_6cal_pcl);
  217.         cfg->getDCS1800_6CAL_DAC(m_as_dcs1800_tx_6cal_dac);
  218.         cfg->getDCS1800_PCL( m_as_dcs1800_tx_pcl );
  219.         cfg->getDCS1800_CHECK_PCL( m_as_dcs1800_tx_check_pcl );
  220.         cfg->getDCS1800_MAX_P( m_as_dcs1800_max_p );
  221.         cfg->getDCS1800_WANTED_P( m_as_dcs1800_wanted_p );
  222.         cfg->getDCS1800_MIN_P( m_as_dcs1800_min_p );
  223.         cfg->getDCS1800_C( m_as_dcs1800_c );
  224.         cfg->getDCS1800_CORRECTION( m_as_dcs1800_correction );
  225.     }
  226.     if (IsFreqBankSupported(m_asFreqBank, FrequencyBand1900))
  227.     {
  228.         cfg->getPCS1900_CAL_PCL(m_as_pcs1900_tx_cal_pcl);
  229.         cfg->getPCS1900_2CAL_PCL(m_as_pcs1900_tx_2cal_pcl);
  230.         cfg->getPCS1900_4CAL_PCL(m_as_pcs1900_tx_4cal_pcl);
  231.         cfg->getPCS1900_6CAL_PCL(m_as_pcs1900_tx_6cal_pcl);
  232.         cfg->getPCS1900_6CAL_DAC(m_as_pcs1900_tx_6cal_dac);
  233.         cfg->getPCS1900_PCL(m_as_pcs1900_tx_pcl);
  234.         cfg->getPCS1900_CHECK_PCL(m_as_pcs1900_tx_check_pcl);
  235.         cfg->getPCS1900_MAX_P(m_as_pcs1900_max_p);
  236.         cfg->getPCS1900_WANTED_P(m_as_pcs1900_wanted_p);
  237.         cfg->getPCS1900_MIN_P(m_as_pcs1900_min_p);
  238.         cfg->getPCS1900_C(m_as_pcs1900_c);
  239.         cfg->getPCS1900_CORRECTION(m_as_pcs1900_correction);
  240.     }
  241.     cfg->get_MAX_APC_DAC(m_sMAX_APC_DAC);
  242.     cfg->getTXlevelRecursiveTimes(i_TXlevelRecusiveTimes);
  243.     cfg->getAPC_Delta(m_dAPC_Delta);
  244.     cfg->getAPC_Check(m_asAPC_Check);
  245.     cfg->getSKY77328_DAC_Delta(i_SKY77328_DAC_Delta);
  246.     cfg->getSKY77328_GSM850_MAX_HIGH_APC_DC_OFFSET_P(m_dSKY77328_GSM850_MAX_HIGH_APC_DC_OFFSET_P);
  247.     cfg->getSKY77328_GSM850_WANTED_HIGH_APC_DC_OFFSET_P(m_dSKY77328_GSM850_WANTED_HIGH_APC_DC_OFFSET_P);
  248.     cfg->getSKY77328_GSM850_MIN_HIGH_APC_DC_OFFSET_P(m_dSKY77328_GSM850_MIN_HIGH_APC_DC_OFFSET_P);
  249.     cfg->getSKY77328_GSM900_MAX_HIGH_APC_DC_OFFSET_P(m_dSKY77328_GSM900_MAX_HIGH_APC_DC_OFFSET_P);
  250.     cfg->getSKY77328_GSM900_WANTED_HIGH_APC_DC_OFFSET_P(m_dSKY77328_GSM900_WANTED_HIGH_APC_DC_OFFSET_P);
  251.     cfg->getSKY77328_GSM900_MIN_HIGH_APC_DC_OFFSET_P(m_dSKY77328_GSM900_MIN_HIGH_APC_DC_OFFSET_P);
  252.     cfg->getSKY77328_DCS1800_MAX_HIGH_APC_DC_OFFSET_P(m_dSKY77328_DCS1800_MAX_HIGH_APC_DC_OFFSET_P);
  253.     cfg->getSKY77328_DCS1800_WANTED_HIGH_APC_DC_OFFSET_P(m_dSKY77328_DCS1800_WANTED_HIGH_APC_DC_OFFSET_P);
  254.     cfg->getSKY77328_DCS1800_MIN_HIGH_APC_DC_OFFSET_P(m_dSKY77328_DCS1800_MIN_HIGH_APC_DC_OFFSET_P);
  255.     cfg->getSKY77328_PCS1900_MAX_HIGH_APC_DC_OFFSET_P(m_dSKY77328_PCS1900_MAX_HIGH_APC_DC_OFFSET_P);
  256.     cfg->getSKY77328_PCS1900_WANTED_HIGH_APC_DC_OFFSET_P(m_dSKY77328_PCS1900_WANTED_HIGH_APC_DC_OFFSET_P);
  257.     cfg->getSKY77328_PCS1900_MIN_HIGH_APC_DC_OFFSET_P(m_dSKY77328_PCS1900_MIN_HIGH_APC_DC_OFFSET_P);
  258.     cfg->getSKY77328_GSM850_MAX_LOW_APC_DC_OFFSET_P(m_dSKY77328_GSM850_MAX_LOW_APC_DC_OFFSET_P);
  259.     cfg->getSKY77328_GSM850_WANTED_LOW_APC_DC_OFFSET_P(m_dSKY77328_GSM850_WANTED_LOW_APC_DC_OFFSET_P);
  260.     cfg->getSKY77328_GSM850_MIN_LOW_APC_DC_OFFSET_P(m_dSKY77328_GSM850_MIN_LOW_APC_DC_OFFSET_P);
  261.     cfg->getSKY77328_GSM900_MAX_LOW_APC_DC_OFFSET_P(m_dSKY77328_GSM900_MAX_LOW_APC_DC_OFFSET_P);
  262.     cfg->getSKY77328_GSM900_WANTED_LOW_APC_DC_OFFSET_P(m_dSKY77328_GSM900_WANTED_LOW_APC_DC_OFFSET_P);
  263.     cfg->getSKY77328_GSM900_MIN_LOW_APC_DC_OFFSET_P(m_dSKY77328_GSM900_MIN_LOW_APC_DC_OFFSET_P);
  264.     cfg->getSKY77328_DCS1800_MAX_LOW_APC_DC_OFFSET_P(m_dSKY77328_DCS1800_MAX_LOW_APC_DC_OFFSET_P);
  265.     cfg->getSKY77328_DCS1800_WANTED_LOW_APC_DC_OFFSET_P(m_dSKY77328_DCS1800_WANTED_LOW_APC_DC_OFFSET_P);
  266.     cfg->getSKY77328_DCS1800_MIN_LOW_APC_DC_OFFSET_P(m_dSKY77328_DCS1800_MIN_LOW_APC_DC_OFFSET_P);
  267.     cfg->getSKY77328_PCS1900_MAX_LOW_APC_DC_OFFSET_P(m_dSKY77328_PCS1900_MAX_LOW_APC_DC_OFFSET_P);
  268.     cfg->getSKY77328_PCS1900_WANTED_LOW_APC_DC_OFFSET_P(m_dSKY77328_PCS1900_WANTED_LOW_APC_DC_OFFSET_P);
  269.     cfg->getSKY77328_PCS1900_MIN_LOW_APC_DC_OFFSET_P(m_dSKY77328_PCS1900_MIN_LOW_APC_DC_OFFSET_P);
  270.     cfg->getSKY77328_GSM850_M (d_SKY77328_GSM850_M);
  271.     cfg->getSKY77328_GSM900_M (d_SKY77328_GSM900_M);
  272.     cfg->getSKY77328_DCS1800_M(d_SKY77328_DCS1800_M);
  273.     cfg->getSKY77328_PCS1900_M(d_SKY77328_PCS1900_M);
  274.     cfg->getSKY77328_GSM850_TARGET_PCL (i_SKY77328_GSM850_TARGET_PCL);
  275.     cfg->getSKY77328_GSM900_TARGET_PCL (i_SKY77328_GSM900_TARGET_PCL);
  276.     cfg->getSKY77328_DCS1800_TARGET_PCL(i_SKY77328_DCS1800_TARGET_PCL);
  277.     cfg->getSKY77328_PCS1900_TARGET_PCL(i_SKY77328_PCS1900_TARGET_PCL);
  278.     // Axiom 502 releated cfg
  279.     cfg->get_AXIOM502_GSM850_SWITCH_PCL(m_asAXIOM502_GSM850_SWITCH_PCL);
  280.     cfg->get_AXIOM502_GSM900_SWITCH_PCL(m_asAXIOM502_GSM900_SWITCH_PCL);
  281.     cfg->get_AXIOM502_DCS1800_SWITCH_PCL(m_asAXIOM502_DCS1800_SWITCH_PCL);
  282.     cfg->get_AXIOM502_PCS1900_SWITCH_PCL(m_asAXIOM502_PCS1900_SWITCH_PCL);
  283. }
  284. //---------------------------------------------------------------------------
  285. void __fastcall T_META_factory_calibration::Read_EPSK_TXPCL_CFG(void)
  286. {
  287.     if (IsFreqBankSupported(m_asFreqBank, FrequencyBand850))
  288.     {
  289.         cfg->getGSM850_EPSK_1CAL_PCL(m_s_gsm850_epsk_tx_1cal_pcl);
  290.         cfg->getGSM850_EPSK_CAL_PCL(m_as_gsm850_epsk_tx_cal_pcl);
  291.         cfg->getGSM850_EPSK_2CAL_PCL(m_as_gsm850_epsk_tx_2cal_pcl);
  292.         cfg->getGSM850_EPSK_4CAL_PCL(m_as_gsm850_epsk_tx_4cal_pcl);
  293.         cfg->getGSM850_EPSK_PCL(m_as_gsm850_epsk_tx_pcl);
  294.         cfg->getGSM850_EPSK_CHECK_PCL(m_as_gsm850_epsk_tx_check_pcl);
  295.         cfg->getGSM850_EPSK_MAX_P(m_as_gsm850_epsk_max_p);
  296.         cfg->getGSM850_EPSK_WANTED_P(m_as_gsm850_epsk_wanted_p);
  297.         cfg->getGSM850_EPSK_MIN_P(m_as_gsm850_epsk_min_p);
  298.         cfg->getGSM850_EPSK_C(m_as_gsm850_epsk_c);
  299.         cfg->getGSM850_EPSK_CORRECTION(m_as_gsm850_epsk_correction);
  300.     }
  301.     if (IsFreqBankSupported(m_asFreqBank, FrequencyBand900))
  302.     {
  303.         cfg->getGSM900_EPSK_CAL_PCL(m_as_gsm900_epsk_tx_cal_pcl);
  304.         cfg->getGSM900_EPSK_1CAL_PCL(m_s_gsm900_epsk_tx_1cal_pcl);
  305.         cfg->getGSM900_EPSK_2CAL_PCL(m_as_gsm900_epsk_tx_2cal_pcl);
  306.         cfg->getGSM900_EPSK_4CAL_PCL(m_as_gsm900_epsk_tx_4cal_pcl);
  307.         cfg->getGSM900_EPSK_PCL(m_as_gsm900_epsk_tx_pcl);
  308.         cfg->getGSM900_EPSK_CHECK_PCL(m_as_gsm900_epsk_tx_check_pcl);
  309.         cfg->getGSM900_EPSK_MAX_P(m_as_gsm900_epsk_max_p);
  310.         cfg->getGSM900_EPSK_WANTED_P(m_as_gsm900_epsk_wanted_p);
  311.         cfg->getGSM900_EPSK_MIN_P(m_as_gsm900_epsk_min_p);
  312.         cfg->getGSM900_EPSK_C(m_as_gsm900_epsk_c);
  313.         cfg->getGSM900_EPSK_CORRECTION(m_as_gsm900_epsk_correction);
  314.     }
  315.     if (IsFreqBankSupported(m_asFreqBank, FrequencyBand1800))
  316.     {
  317.         cfg->getDCS1800_EPSK_1CAL_PCL(m_s_dcs1800_epsk_tx_1cal_pcl);
  318.         cfg->getDCS1800_EPSK_CAL_PCL(m_as_dcs1800_epsk_tx_cal_pcl);
  319.         cfg->getDCS1800_EPSK_2CAL_PCL(m_as_dcs1800_epsk_tx_2cal_pcl);
  320.         cfg->getDCS1800_EPSK_4CAL_PCL(m_as_dcs1800_epsk_tx_4cal_pcl);
  321.         cfg->getDCS1800_EPSK_PCL(m_as_dcs1800_epsk_tx_pcl);
  322.         cfg->getDCS1800_EPSK_CHECK_PCL(m_as_dcs1800_epsk_tx_check_pcl);
  323.         cfg->getDCS1800_EPSK_MAX_P(m_as_dcs1800_epsk_max_p);
  324.         cfg->getDCS1800_EPSK_WANTED_P(m_as_dcs1800_epsk_wanted_p);
  325.         cfg->getDCS1800_EPSK_MIN_P(m_as_dcs1800_epsk_min_p);
  326.         cfg->getDCS1800_EPSK_C(m_as_dcs1800_epsk_c);
  327.         cfg->getDCS1800_EPSK_CORRECTION(m_as_dcs1800_epsk_correction);
  328.     }
  329.     if (IsFreqBankSupported(m_asFreqBank, FrequencyBand1900))
  330.     {
  331.         cfg->getPCS1900_EPSK_1CAL_PCL(m_s_pcs1900_epsk_tx_1cal_pcl);
  332.         cfg->getPCS1900_EPSK_CAL_PCL(m_as_pcs1900_epsk_tx_cal_pcl);
  333.         cfg->getPCS1900_EPSK_2CAL_PCL(m_as_pcs1900_epsk_tx_2cal_pcl);
  334.         cfg->getPCS1900_EPSK_4CAL_PCL(m_as_pcs1900_epsk_tx_4cal_pcl);
  335.         cfg->getPCS1900_EPSK_PCL(m_as_pcs1900_epsk_tx_pcl);
  336.         cfg->getPCS1900_EPSK_CHECK_PCL(m_as_pcs1900_epsk_tx_check_pcl);
  337.         cfg->getPCS1900_EPSK_MAX_P(m_as_pcs1900_epsk_max_p);
  338.         cfg->getPCS1900_EPSK_WANTED_P(m_as_pcs1900_epsk_wanted_p);
  339.         cfg->getPCS1900_EPSK_MIN_P(m_as_pcs1900_epsk_min_p);
  340.         cfg->getPCS1900_EPSK_C(m_as_pcs1900_epsk_c);
  341.         cfg->getPCS1900_EPSK_CORRECTION(m_as_pcs1900_epsk_correction);
  342.     }
  343.     cfg->getTXlevelRecursiveTimes(i_TXlevelRecusiveTimes);
  344.     cfg->getAPC_Delta(m_dAPC_Delta);
  345. }
  346. //------------------------------------------------------------------------
  347. void __fastcall T_META_factory_calibration::Read_IP2_CFG(void)
  348. {
  349.     cfg->get_IP2_arfcn_C0_GSM850(m_sIP2_arfcn_C0_GSM850);
  350.     cfg->get_IP2_arfcn_C0_GSM(m_sIP2_arfcn_C0_GSM);
  351.     cfg->get_IP2_arfcn_C0_DCS(m_sIP2_arfcn_C0_DCS);
  352.     cfg->get_IP2_arfcn_C0_PCS(m_sIP2_arfcn_C0_PCS);
  353.     //cfg->get_IP2_arfcn_TCH_GSM850(m_sIP2_arfcn_TCH_GSM850);
  354.     //cfg->get_IP2_arfcn_TCH_DCS(m_sIP2_arfcn_TCH_DCS);
  355.     //cfg->get_IP2_arfcn_TCH_PCS(m_sIP2_arfcn_TCH_PCS);
  356.     //cfg->get_IP2_arfcn_TCH_GSM(m_sIP2_arfcn_TCH_GSM);
  357.     cfg->get_IP2_CAL_P_DL_ON_SKY(d_IP2_CAL_P_DL_ON_SKY);
  358.     cfg->get_IP2_CAL_P_DL_ON_MT(d_IP2_CAL_P_DL_ON_MT);
  359.     cfg->get_IP2_CAL_P_DL_OFF_SKY(d_IP2_CAL_P_DL_OFF_SKY);
  360.     cfg->get_IP2_CAL_P_DL_OFF_MT(d_IP2_CAL_P_DL_OFF_MT);
  361.     cfg->get_IP2_CHECK_P_DL_ON(d_IP2_CHECK_P_DL_ON);
  362.     cfg->get_IP2_CHECK_P_DL_OFF(d_IP2_CHECK_P_DL_OFF);
  363.     cfg->get_IP2_GAIN(d_IP2_GAIN);
  364.     cfg->get_IP2_N_PM(i_IP2_N_PM);
  365.     cfg->get_IP2_M_PM(c_IP2_M_PM);
  366.     cfg->get_IP2_ICORRECTION1_SKY74045(i_IP2_ICORRECTION1_SKY74045);
  367.     cfg->get_IP2_QCORRECTION1_SKY74045(i_IP2_QCORRECTION1_SKY74045);
  368.     cfg->get_IP2_ICORRECTION2_SKY74045(i_IP2_ICORRECTION2_SKY74045);
  369.     cfg->get_IP2_QCORRECTION2_SKY74045(i_IP2_QCORRECTION2_SKY74045);
  370.     cfg->get_IP2_ICORRECTION1_SKY74117(i_IP2_ICORRECTION1_SKY74117);
  371.     cfg->get_IP2_QCORRECTION1_SKY74117(i_IP2_QCORRECTION1_SKY74117);
  372.     cfg->get_IP2_ICORRECTION2_SKY74117(i_IP2_ICORRECTION2_SKY74117);
  373.     cfg->get_IP2_QCORRECTION2_SKY74117(i_IP2_QCORRECTION2_SKY74117);
  374.     cfg->get_IP2_AMCODEI1(i_IP2_AMCODEI1);
  375.     cfg->get_IP2_AMCODEQ1(i_IP2_AMCODEQ1);
  376.     cfg->get_IP2_AMCODEI2(i_IP2_AMCODEI2);
  377.     cfg->get_IP2_AMCODEQ2(i_IP2_AMCODEQ2);
  378.     cfg->get_IP2_MAX_IDC_SKY74045(m_iIP2_MAX_IDC_SKY74045);
  379.     cfg->get_IP2_MAX_QDC_SKY74045(m_iIP2_MAX_QDC_SKY74045);
  380.     cfg->get_IP2_MAX_IDC_SKY74117(m_iIP2_MAX_IDC_SKY74117);
  381.     cfg->get_IP2_MAX_QDC_SKY74117(m_iIP2_MAX_QDC_SKY74117);
  382.     cfg->get_IP2_MAX_IDC_MT6139(m_iIP2_MAX_IDC_MT6139);
  383.     cfg->get_IP2_MAX_QDC_MT6139(m_iIP2_MAX_QDC_MT6139);
  384. }
  385. //-------------------------------------------------------------------------
  386. //bool __fastcall T_META_factory_calibration::Read_TxPhaseError_CFG( void )
  387. //{
  388. //    cfg->get_PHASE_ERROR_BAND( as_PHASE_ERROR_BAND );
  389. //
  390. //    cfg->get_PHASE_ERROR_ARFCN( m_sPHASE_ERROR_ARFCN );
  391. //
  392. //    cfg->get_PHASE_ERROR_PCL( i_PHASE_ERROR_PCL );
  393. //
  394. //    cfg->get_PHASE_ERROR_RMS_ERROR( d_PHASE_ERROR_RMS_ERROR );
  395. //
  396. //    return true;
  397. //}
  398. //-------------------------------------------------------------------------
  399. void __fastcall T_META_factory_calibration::Read_TxIq_CFG(void)
  400. {
  401.     cfg->get_TX_IQ_MEASUREMENT_COUNT( m_uiTX_IQ_MEASUREMENT_COUNT );
  402.     cfg->get_TX_IQ_BAND( m_asTX_IQ_BAND );
  403.     cfg->get_TX_IQ_ARFCN( m_sTX_IQ_ARFCN );
  404.     cfg->get_TX_IQ_PCL( m_sTX_IQ_PCL );
  405.     cfg->get_TX_IQ_DC_OFFSET_MAX( m_dTX_IQ_DC_OFFSET_MAX );
  406.     cfg->get_TX_IQ_GAIN_IMBALANCE_MAX( m_dTX_IQ_GAIN_IMBALANCE_MAX);
  407.     // high band parameter
  408.     cfg->get_TX_IQ_BAND_HIGH( m_asTX_IQ_BAND_HIGH );
  409.     cfg->get_TX_IQ_ARFCN_HIGH( m_sTX_IQ_ARFCN_HIGH );
  410.     cfg->get_TX_IQ_PCL_HIGH( m_sTX_IQ_PCL_HIGH );
  411.     cfg->get_TX_IQ_DC_OFFSET_MAX_HIGH( m_dTX_IQ_DC_OFFSET_MAX_HIGH );
  412.     cfg->get_TX_IQ_GAIN_IMBALANCE_MAX_HIGH( m_dTX_IQ_GAIN_IMBALANCE_MAX_HIGH );
  413. }
  414. //-------------------------------------------------------------------------
  415. void __fastcall T_META_factory_calibration::Read_ADC_CFG(void)
  416. {
  417.     cfg->getADC_V1(i_ADC_V1);
  418.     cfg->getADC_V2( i_ADC_V2);
  419.     cfg->getADC_CHECK_VOLTAGE( i_ADC_CHECK_VOLTAGE);
  420.     cfg->get_NORMAL_VOLTAGE( i_NORMAL_VOLTAGE);
  421.     cfg->get_CURRENT_LIMIT(i_CURRENT_LIMIT);
  422.     cfg->get_MAX_BATTERY_ADC_SLOPE(i_MAX_BATTERY_ADC_SLOPE);
  423.     cfg->get_MIN_BATTERY_ADC_SLOPE(i_MIN_BATTERY_ADC_SLOPE);
  424.     cfg->get_MAX_BATTERY_ADC_OFFSET(i_MAX_BATTERY_ADC_OFFSET);
  425.     cfg->get_MIN_BATTERY_ADC_OFFSET(i_MIN_BATTERY_ADC_OFFSET);
  426.     cfg->get_BATTERY_CHANNEL( i_BATTERY_CHANNEL );
  427.     cfg->get_CHARGER_CHANNEL(i_CHARGER_CHANNEL);
  428.     cfg->get_ADC_RESISTANCE(d_ADC_RESISTANCE);
  429.     cfg->get_MAX_VOLTAGE_DIFFERENCE(d_MAX_VOLTAGE_DIFFERENCE);
  430.     cfg->get_MAX_CURRENT_DIFFERENCE(d_MAX_CURRENT_DIFFERENCE);
  431.     cfg->get_ADC_MEASUREMENT_COUNT(i_ADC_MEASUREMENT_COUNT);
  432. }
  433. //-------------------------------------------------------------------------
  434. void __fastcall T_META_factory_calibration::Read_CV_CFG(void)
  435. {
  436.     cfg->get_MAX_CV_STEP(m_cMAX_CV_STEP);
  437.     cfg->get_MIN_CV_STEP(m_cMIN_CV_STEP);
  438. }