META_factory_cfg.cpp
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:248k
- {
- m_dTX_IQ_GAIN_IMBALANCE_MAX = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_TX_IQ_BAND_HIGH(AnsiString &as)
- {
- as = m_asTX_IQ_BAND_HIGH;
- }
- //-----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_TX_IQ_BAND_HIGH(AnsiString as)
- {
- m_asTX_IQ_BAND_HIGH = as;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_TX_IQ_ARFCN_HIGH(short &s)
- {
- s = m_sTX_IQ_ARFCN_HIGH;
- }
- //-----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_TX_IQ_ARFCN_HIGH(short s)
- {
- m_sTX_IQ_ARFCN_HIGH = s;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_TX_IQ_PCL_HIGH(short &s)
- {
- s = m_sTX_IQ_PCL_HIGH;
- }
- //-----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_TX_IQ_PCL_HIGH(short s)
- {
- m_sTX_IQ_PCL_HIGH = s;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_TX_IQ_DC_OFFSET_MAX_HIGH(double &d)
- {
- d = m_dTX_IQ_DC_OFFSET_MAX_HIGH;
- }
- //-----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_TX_IQ_DC_OFFSET_MAX_HIGH(double d)
- {
- m_dTX_IQ_DC_OFFSET_MAX_HIGH = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_TX_IQ_GAIN_IMBALANCE_MAX_HIGH(double &d)
- {
- d = m_dTX_IQ_GAIN_IMBALANCE_MAX_HIGH;
- }
- //-----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_TX_IQ_GAIN_IMBALANCE_MAX_HIGH(double d)
- {
- m_dTX_IQ_GAIN_IMBALANCE_MAX_HIGH = d;
- }
- //==============================================================================
- ///////////////////////// TX IQ imbalance calibration ///////////////////////
- //==============================================================================
- //void TMETA_factory_cfg::get_TX_IQ_IMBALANCE_BAND(AnsiString &as)
- //{
- // as = as_TX_IQ_IMBALANCE_BAND;
- //}
- //-----------------------------------------------------------------------------
- //void TMETA_factory_cfg::set_TX_IQ_IMBALANCE_BAND(AnsiString as)
- //{
- // as_TX_IQ_IMBALANCE_BAND = as;
- //}
- //==============================================================================
- //void TMETA_factory_cfg::get_TX_IQ_IMBALANCE_ARFCN(short &s)
- //{
- // s = m_sTX_IQ_IMBALANCE_ARFCN;
- //}
- //-----------------------------------------------------------------------------
- //void TMETA_factory_cfg::set_TX_IQ_IMBALANCE_ARFCN(short s)
- //{
- // m_sTX_IQ_IMBALANCE_ARFCN = s;
- //}
- //==============================================================================
- //void TMETA_factory_cfg::get_TX_IQ_IMBALANCE_PCL(int &i)
- //{
- // i = i_TX_IQ_IMBALANCE_PCL;
- //}
- //-----------------------------------------------------------------------------
- //void TMETA_factory_cfg::set_TX_IQ_IMBALANCE_PCL(int i)
- //{
- // i_TX_IQ_IMBALANCE_PCL = i;
- //}
- //==============================================================================
- //void TMETA_factory_cfg::get_TX_IQ_IMBALANCE_MAX(double &d)
- //{
- // d = d_TX_IQ_IMBALANCE_MAX;
- //}
- //-----------------------------------------------------------------------------
- //void TMETA_factory_cfg::set_TX_IQ_IMBALANCE_MAX(double d)
- //{
- // d_TX_IQ_IMBALANCE_MAX = d;
- //}
- //=============================================================================
- unsigned short TMETA_factory_cfg::getFreqBankNum( AnsiString as)
- {
- unsigned short IntFreqBank = StrToInt(as);
- unsigned short IntFreqBankNum = 0;
- for(int i=0; i < sizeof(unsigned short)*8; i++)
- {
- if((IntFreqBank & 0x01) == 0x01)
- {
- IntFreqBankNum++;
- }
- IntFreqBank = IntFreqBank >> 1;
- if(IntFreqBank == 0)
- break;
- }
- return IntFreqBankNum;
- }
- //=============================================================================
- void TMETA_factory_cfg::get663x2_GPIB_Addr(AnsiString &as)
- {
- as = as_663x2_GPIB_Addr;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set663x2_GPIB_Addr(AnsiString as)
- {
- as_663x2_GPIB_Addr = as;
- }
- //=============================================================================
- void TMETA_factory_cfg::getADC_V1(int &i)
- {
- i = i_ADC_V1;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::setADC_V1(int i)
- {
- i_ADC_V1 = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::getADC_V2(int &i)
- {
- i = i_ADC_V2;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::setADC_V2(int i)
- {
- i_ADC_V2 = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::getADC_CHECK_VOLTAGE(int &i)
- {
- i = i_ADC_CHECK_VOLTAGE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::setADC_CHECK_VOLTAGE(int i)
- {
- i_ADC_CHECK_VOLTAGE = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_NORMAL_VOLTAGE(int &i)
- {
- i = i_NORMAL_VOLTAGE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_NORMAL_VOLTAGE(int i)
- {
- i_NORMAL_VOLTAGE = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_CURRENT_LIMIT(int &i)
- {
- i = i_CURRENT_LIMIT;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CURRENT_LIMIT(int i)
- {
- i_CURRENT_LIMIT = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_MAX_BATTERY_ADC_SLOPE(int &i)
- {
- i = i_MAX_BATTERY_ADC_SLOPE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MAX_BATTERY_ADC_SLOPE(int i)
- {
- i_MAX_BATTERY_ADC_SLOPE = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_MIN_BATTERY_ADC_SLOPE(int &i)
- {
- i = i_MIN_BATTERY_ADC_SLOPE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MIN_BATTERY_ADC_SLOPE(int i)
- {
- i_MIN_BATTERY_ADC_SLOPE = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_MAX_BATTERY_ADC_OFFSET(int &i)
- {
- i = i_MAX_BATTERY_ADC_OFFSET;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MAX_BATTERY_ADC_OFFSET(int i)
- {
- i_MAX_BATTERY_ADC_OFFSET = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_MIN_BATTERY_ADC_OFFSET(int &i)
- {
- i = i_MIN_BATTERY_ADC_OFFSET;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MIN_BATTERY_ADC_OFFSET(int i)
- {
- i_MIN_BATTERY_ADC_OFFSET = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_BATTERY_CHANNEL(int &i)
- {
- i = i_BATTERY_CHANNEL;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_BATTERY_CHANNEL(int i)
- {
- i_BATTERY_CHANNEL = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_CHARGER_CHANNEL(int &i)
- {
- i = i_CHARGER_CHANNEL;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CHARGER_CHANNEL(int i)
- {
- i_CHARGER_CHANNEL = i;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_ADC_RESISTANCE(double &d)
- {
- d = d_ADC_RESISTANCE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_ADC_RESISTANCE(double d)
- {
- d_ADC_RESISTANCE = d;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_MAX_VOLTAGE_DIFFERENCE(double &d)
- {
- d = d_MAX_VOLTAGE_DIFFERENCE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MAX_VOLTAGE_DIFFERENCE(double d)
- {
- d_MAX_VOLTAGE_DIFFERENCE = d;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_MAX_CURRENT_DIFFERENCE(double &d)
- {
- d = d_MAX_CURRENT_DIFFERENCE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MAX_CURRENT_DIFFERENCE(double d)
- {
- d_MAX_CURRENT_DIFFERENCE = d;
- }
- //=============================================================================
- void TMETA_factory_cfg::get_ADC_MEASUREMENT_COUNT(int &i)
- {
- i = i_ADC_MEASUREMENT_COUNT;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_ADC_MEASUREMENT_COUNT(int i)
- {
- i_ADC_MEASUREMENT_COUNT = i;
- }
- //===========================================================================
- /////////////////////////// CV /////////////////////
- //===========================================================================
- void TMETA_factory_cfg::get_MAX_CV_STEP(char &c)
- {
- c = m_cMAX_CV_STEP;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MAX_CV_STEP(char c)
- {
- m_cMAX_CV_STEP = c;
- }
- //============================================================================
- void TMETA_factory_cfg::get_MIN_CV_STEP(char &c)
- {
- c = m_cMIN_CV_STEP;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MIN_CV_STEP(char c)
- {
- m_cMIN_CV_STEP = c;
- }
- //===========================================================================
- /////////////////////////// WiFi common /////////////////////
- //===========================================================================
- void TMETA_factory_cfg::get_WiFi_Support(AnsiString &as)
- {
- as = m_asWiFi_Support;
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::set_WiFi_Support(AnsiString as)
- {
- m_asWiFi_Support = as;
- }
- //===========================================================================
- /////////////////////////// WiFi TX power calibration /////////////////////
- //===========================================================================
- void TMETA_factory_cfg::get_CCK_MAX_P(double &d)
- { d = m_dCCK_MAX_P;
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CCK_MAX_P(double d)
- { m_dCCK_MAX_P = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_CCK_WANTED_P(double &d)
- { d = m_dCCK_WANTED_P;
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CCK_WANTED_P(double d)
- { m_dCCK_WANTED_P = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_CCK_MIN_P(double &d)
- { d = m_dCCK_MIN_P;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CCK_MIN_P(double d)
- { m_dCCK_MIN_P = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_CCK_Delta(double &d)
- { d = m_dCCK_Delta;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CCK_Delta(double d)
- { m_dCCK_Delta = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_CCK_C(int &i)
- { i = m_iCCK_C;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CCK_C(int i)
- { m_iCCK_C = i;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_802_11B_CAL_CHANNEL(AnsiString &as)
- {
- as = m_as802_11B_CAL_CHANNEL;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_802_11B_CAL_CHANNEL(AnsiString as)
- {
- m_as802_11B_CAL_CHANNEL = as;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_802_11B_CHECK_CHANNEL(AnsiString &as)
- {
- as = m_as802_11B_CHECK_CHANNEL;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_802_11B_CHECK_CHANNEL(AnsiString as)
- {
- m_as802_11B_CHECK_CHANNEL = as;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_CCK_CAL_RATE(double &d)
- {
- d = m_dCCK_CAL_RATE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CCK_CAL_RATE(double d)
- {
- m_dCCK_CAL_RATE = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_CCK_CHECK_RATE(double &d)
- {
- d = m_dCCK_CHECK_RATE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_CCK_CHECK_RATE(double d)
- {
- m_dCCK_CHECK_RATE = d;
- }
- void TMETA_factory_cfg::get_OFDM_MAX_P(double &d)
- { d = m_dOFDM_MAX_P;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_OFDM_MAX_P(double d)
- { m_dOFDM_MAX_P = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_OFDM_WANTED_P(double &d)
- { d = m_dOFDM_WANTED_P;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_OFDM_WANTED_P(double d)
- { m_dOFDM_WANTED_P = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_OFDM_MIN_P(double &d)
- { d = m_dOFDM_MIN_P;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_OFDM_MIN_P(double d)
- { m_dOFDM_MIN_P = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_OFDM_Delta(double &d)
- { d = m_dOFDM_Delta;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_OFDM_Delta(double d)
- { m_dOFDM_Delta = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_OFDM_C(int &i)
- { i = m_iOFDM_C;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_OFDM_C(int i)
- { m_iOFDM_C = i;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_802_11G_CAL_CHANNEL(AnsiString &as)
- {
- as = m_as802_11G_CAL_CHANNEL;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_802_11G_CAL_CHANNEL(AnsiString as)
- {
- m_as802_11G_CAL_CHANNEL = as;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_802_11G_CHECK_CHANNEL(AnsiString &as)
- {
- as = m_as802_11G_CHECK_CHANNEL;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_802_11G_CHECK_CHANNEL(AnsiString as)
- {
- m_as802_11G_CHECK_CHANNEL = as;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_OFDM_CAL_RATE(double &d)
- {
- d = m_dOFDM_CAL_RATE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_OFDM_CAL_RATE(double d)
- {
- m_dOFDM_CAL_RATE = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_OFDM_CHECK_RATE(double &d)
- {
- d = m_dOFDM_CHECK_RATE;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_OFDM_CHECK_RATE(double d)
- {
- m_dOFDM_CHECK_RATE = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_WiFiTxPRecursive_Times(int &i)
- { i = m_iWiFiTxPRecursive_Times;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_WiFiTxPRecursive_Times(int i)
- { m_iWiFiTxPRecursive_Times = i;
- }
- //============================================================================
- ///////////////////////////////////// BT //////////////////////////////////
- //============================================================================
- void TMETA_factory_cfg::get_BD_Address(AnsiString &as)
- {
- as = m_asBD_Address;
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::set_BD_Address(AnsiString as)
- {
- m_asBD_Address = as;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_Inquiry_Enable(AnsiString &as)
- {
- as = m_asInquiry_Enable;
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::set_Inquiry_Enable(AnsiString as)
- {
- m_asInquiry_Enable = as;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_BT_DOWNLINK_POWER(double &d)
- {
- d = m_dBT_DOWNLINK_POWER;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_BT_DOWNLINK_POWER(double d)
- {
- m_dBT_DOWNLINK_POWER = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_BT_CRYSTAL_CAP_ID1(unsigned char &uc)
- {
- uc = m_ucBT_CRYSTAL_CAP_ID1;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_BT_CRYSTAL_CAP_ID1(unsigned char uc)
- {
- m_ucBT_CRYSTAL_CAP_ID1 = uc;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_BT_CRYSTAL_CAP_ID2(unsigned char &uc)
- {
- uc = m_ucBT_CRYSTAL_CAP_ID2;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_BT_CRYSTAL_CAP_ID2(unsigned char uc)
- {
- m_ucBT_CRYSTAL_CAP_ID2 = uc;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_BT_CRYSTAL_CHANNEL(unsigned short &us)
- {
- us = m_usBT_CRYSTAL_CHANNEL;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_BT_CRYSTAL_CHANNEL(unsigned short us)
- {
- m_usBT_CRYSTAL_CHANNEL = us;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_BT_CRYSTAL_MAX_FREQ_ACCURACY(double &d)
- {
- d = m_dBT_CRYSTAL_MAX_FREQ_ACCURACY;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_BT_CRYSTAL_MAX_FREQ_ACCURACY(double d)
- {
- m_dBT_CRYSTAL_MAX_FREQ_ACCURACY = d;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_MIN_POLL_COUNT(unsigned int &ui)
- {
- ui = m_uiMIN_POLL_COUNT;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MIN_POLL_COUNT(unsigned int ui)
- {
- m_uiMIN_POLL_COUNT = ui;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TMETA_factory_cfg::get_MAX_POLL_COUNT(unsigned int &ui)
- {
- ui = m_uiMAX_POLL_COUNT;
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::set_MAX_POLL_COUNT(unsigned int ui)
- {
- m_uiMIN_POLL_COUNT = ui;
- }
- //=============================================================================
- bool TMETA_factory_cfg::ReadFromIniFile(AnsiString as)
- {
- TIniFile *ini;
- ini = new TIniFile(as);
- if (NULL == ini)
- {
- return false;
- }
- // Equipment initialization
- ReadAge8960InitFromIniFile(ini);
- ReadCmu200InitFromIniFile(ini);
- ReadCBTInitFromIniFile(ini);
- ReadIQviewInitFromIniFile(ini);
- ReadAgilentN4010aInitFromIniFile(ini);
- ReadCommonFromIniFile(ini);
- ReadIP2FromIniFile(ini);
- ReadAfcFromIniFile(ini);
- ReadRxPathLossFromIniFile(ini);
- ReadTxIqFromIniFile(ini);
- ReadTxPclFromIniFile(ini);
- ReadAdcFromIniFile(ini);
- ReadCVFromIniFile(ini);
- ReadWiFiCommonFromIniFile(ini);
- ReadWiFiTxPowerFromIniFile(ini);
- ReadBTCommonFromIniFile(ini);
- ReadBTCrystalCAPIDFromIniFile(ini);
- delete ini;
- return true;
- }
- //=============================================================================
- void TMETA_factory_cfg::ReadCommonFromIniFile(TIniFile *ini)
- {
- // if( ini->SectionExists( "Frequency Bank" ) == false )
- // return false;
- as_FreqBank = ini->ReadString("Frequency Bank",
- "bank",
- "0x0C"
- );
- //if( ini->SectionExists( "C0 for each Bank" ) == false )
- // return false;
- m_sARFCN_C0_GSM400 = ini->ReadInteger("C0 for each Bank",
- "arfcn_C0_GSM400",
- 276
- );
- m_sARFCN_C0_GSM850 = ini->ReadInteger("C0 for each Bank",
- "arfcn_C0_GSM850",
- 190
- );
- m_sARFCN_C0_GSM = ini->ReadInteger("C0 for each Bank",
- "arfcn_C0_GSM",
- 70
- );
- m_sARFCN_C0_DCS = ini->ReadInteger("C0 for each Bank",
- "arfcn_C0_DCS",
- 700
- );
- m_sARFCN_C0_PCS = ini->ReadInteger("C0 for each Bank",
- "arfcn_C0_PCS",
- 660
- );
- //if( ini->SectionExists( "Downlink power" ) == false )
- // return false;
- AnsiString as_P_DL = ini->ReadString("Downlink power",
- "P_DL",
- "-60"
- );
- d_P_DL = atof(as_P_DL.c_str());
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadIP2FromIniFile(TIniFile *ini)
- {
- //////////////////////////////// IP2 //////////////////////////////////
- m_sIP2_arfcn_C0_GSM = ini->ReadInteger("IP2 table", "IP2_arfcn_C0_GSM", 100);
- m_sIP2_arfcn_C0_DCS = ini->ReadInteger("IP2 table", "IP2_arfcn_C0_DCS", 730);
- m_sIP2_arfcn_C0_PCS = ini->ReadInteger("IP2 table", "IP2_arfcn_C0_PCS", 690);
- m_sIP2_arfcn_C0_GSM850 = ini->ReadInteger("IP2 table", "IP2_arfcn_C0_GSM850", 220);
- //m_sIP2_arfcn_TCH_GSM = ini->ReadInteger("IP2 table", "IP2_arfcn_TCH_GSM", 0);
- //m_sIP2_arfcn_TCH_DCS = ini->ReadInteger("IP2 table", "IP2_arfcn_TCH_DCS", 512);
- //m_sIP2_arfcn_TCH_PCS = ini->ReadInteger("IP2 table", "IP2_arfcn_TCH_PCS", 512);
- //m_sIP2_arfcn_TCH_GSM850 = ini->ReadInteger("IP2 table", "IP2_arfcn_TCH_GSM850", 128);
- d_IP2_CAL_P_DL_ON_SKY = ini->ReadInteger("IP2 table", "IP2_CAL_P_DL_ON_SKY", -30);
- d_IP2_CAL_P_DL_OFF_SKY = ini->ReadInteger("IP2 table", "IP2_CAL_P_DL_OFF_SKY", -120);
- d_IP2_CAL_P_DL_ON_MT = ini->ReadInteger("IP2 table", "IP2_CAL_P_DL_ON_MT", -25);
- d_IP2_CAL_P_DL_OFF_MT = ini->ReadInteger("IP2 table", "IP2_CAL_P_DL_OFF_MT", -120);
- d_IP2_CHECK_P_DL_ON = ini->ReadInteger("IP2 table", "IP2_CHECK_P_DL_ON", -30);
- d_IP2_CHECK_P_DL_OFF = ini->ReadInteger("IP2 table", "IP2_CHECK_P_DL_OFF", -120);
- d_IP2_GAIN = ini->ReadInteger("IP2 table", "IP2_GAIN", 65);
- i_IP2_N_PM = ini->ReadInteger("IP2 table", "IP2_N_PM", 200);
- c_IP2_M_PM = ini->ReadInteger("IP2 table", "IP2_M_PM", 1);
- // as_IP2_BAND = ini->ReadString("IP2 table", "IP2_BAND", "GSM");
- // m_sIP2_ARFCN = ini->ReadInteger("IP2 table", "IP2_ARFCN", 70);
- i_IP2_ICORRECTION1_SKY74045 = ini->ReadInteger("IP2 table", "IP2_ICORRECTION1_SKY74045", -63);
- i_IP2_QCORRECTION1_SKY74045 = ini->ReadInteger("IP2 table", "IP2_QCORRECTION1_SKY74045", -63);
- i_IP2_ICORRECTION2_SKY74045 = ini->ReadInteger("IP2 table", "IP2_ICORRECTION2_SKY74045", 63);
- i_IP2_QCORRECTION2_SKY74045 = ini->ReadInteger("IP2 table", "IP2_QCORRECTION2_SKY74045", 63);
- i_IP2_ICORRECTION1_SKY74117 = ini->ReadInteger("IP2 table", "IP2_ICORRECTION1_SKY74117", -16);
- i_IP2_QCORRECTION1_SKY74117 = ini->ReadInteger("IP2 table", "IP2_QCORRECTION1_SKY74117", -16);
- i_IP2_ICORRECTION2_SKY74117 = ini->ReadInteger("IP2 table", "IP2_ICORRECTION2_SKY74117", 16);
- i_IP2_QCORRECTION2_SKY74117 = ini->ReadInteger("IP2 table", "IP2_QCORRECTION2_SKY74117", 16);
- i_IP2_AMCODEI1 = ini->ReadInteger("IP2 table", "IP2_AMCODEI1", 64);
- i_IP2_AMCODEQ1 = ini->ReadInteger("IP2 table", "IP2_AMCODEQ1", 64);
- i_IP2_AMCODEI2 = ini->ReadInteger("IP2 table", "IP2_AMCODEI2", 191);
- i_IP2_AMCODEQ2 = ini->ReadInteger("IP2 table", "IP2_AMCODEQ2", 191);
- m_iIP2_MAX_IDC_SKY74045 = ini->ReadInteger("IP2 table", "IP2_MAX_IDC_SKY74045", 0);
- m_iIP2_MAX_QDC_SKY74045 = ini->ReadInteger("IP2 table", "IP2_MAX_QDC_SKY74045", 0);
- m_iIP2_MAX_IDC_SKY74117 = ini->ReadInteger("IP2 table", "IP2_MAX_IDC_SKY74117", 0);
- m_iIP2_MAX_QDC_SKY74117 = ini->ReadInteger("IP2 table", "IP2_MAX_QDC_SKY74117", 0);
- m_iIP2_MAX_IDC_MT6139 = ini->ReadInteger("IP2 table", "IP2_MAX_IDC_MT6139", 0);
- m_iIP2_MAX_QDC_MT6139 = ini->ReadInteger("IP2 table", "IP2_MAX_QDC_MT6139", 0);
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadAfcFromIniFile(TIniFile *ini)
- {
- // AFC
- AnsiString as_CRYSTAL_AFC_MIN_FREQ_ERR_PPM;
- AnsiString as_CRYSTAL_AFC_MAX_FREQ_ERR_PPM;
- AnsiString as_CRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR;
- AnsiString as_MAX_INIT_AFC_DAC;
- AnsiString as_MAX_AFC_SLOPE;
- AnsiString as_MIN_AFC_SLOPE;
- ////////////////////////// AFC ////////////////////////////////////////
- as_AFC_BAND = ini->ReadString("AFC Calibration",
- "AFC_BAND",
- "GSM"
- );
- m_sAFC_ARFCN = ini->ReadInteger("AFC Calibration",
- "AFC_ARFCN",
- 70
- );
- m_sN_AFC = ini->ReadInteger("AFC Calibration",
- "N_AFC",
- 10
- );
- m_sDAC1 = ini->ReadInteger("AFC Calibration",
- "DAC1",
- 4000
- );
- m_sDAC2 = ini->ReadInteger("AFC Calibration",
- "DAC2",
- 5000
- );
- m_sCRYSTAL_DAC1 = ini->ReadInteger("AFC Calibration",
- "CRYSTAL_DAC1",
- 3800
- );
- m_sCRYSTAL_DAC2 = ini->ReadInteger("AFC Calibration",
- "CRYSTAL_DAC2",
- 4200
- );
- m_sMAX_INIT_AFC_DAC = ini->ReadInteger("AFC table",
- "MAX_INIT_AFC_DAC",
- 65535
- );
- m_sMIN_INIT_AFC_DAC = ini->ReadInteger("AFC table",
- "MIN_INIT_AFC_DAC",
- 0
- );
- as_MAX_AFC_SLOPE = ini->ReadString("AFC table",
- "MAX_AFC_SLOPE",
- "5.0"
- );
- d_MAX_AFC_SLOPE = atof(as_MAX_AFC_SLOPE.c_str());
- as_MIN_AFC_SLOPE = ini->ReadString("AFC table",
- "MIN_AFC_SLOPE",
- "0.0"
- );
- d_MIN_AFC_SLOPE = atof(as_MIN_AFC_SLOPE.c_str());
- /////////////////////////////// crystal AFC //////////////////////////////
- as_CRYSTAL_AFC_BAND = ini->ReadString("Crystal AFC Calibration",
- "CRYSTAL_AFC_BAND",
- "GSM"
- );
- m_sCRYSTAL_AFC_ARFCN = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_ARFCN",
- 65
- );
- d_CRYSTAL_AFC_TCH_P_DL = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_TCH_P_DL",
- -70
- );
- i_CRYSTAL_AFC_GSM850_PCL = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_GSM850_PCL",
- 12
- );
- i_CRYSTAL_AFC_GSM900_PCL = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_GSM900_PCL",
- 12
- );
- i_CRYSTAL_AFC_DCS1800_PCL = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_DCS1800_PCL",
- 12
- );
- i_CRYSTAL_AFC_PCS1900_PCL = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_PCS1900_PCL",
- 12
- );
- m_sCRYSTAL_AFC_CAL_DAC = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_CAL_DAC",
- 4100
- );
- m_sCRYSTAL_AFC_CHECK_DAC1 = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_CHECK_DAC1",
- 0
- );
- m_sCRYSTAL_AFC_CHECK_DAC2 = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_CHECK_DAC2",
- 8000
- );
- as_CRYSTAL_AFC_MIN_FREQ_ERR_PPM = ini->ReadString("Crystal AFC Calibration",
- "CRYSTAL_AFC_MIN_FREQ_ERR_PPM",
- "-17.0"
- );
- d_CRYSTAL_AFC_MIN_FREQ_ERR_PPM = atof(as_CRYSTAL_AFC_MIN_FREQ_ERR_PPM.c_str());
- as_CRYSTAL_AFC_MAX_FREQ_ERR_PPM = ini->ReadString("Crystal AFC Calibration",
- "CRYSTAL_AFC_MAX_FREQ_ERR_PPM",
- "17.0"
- );
- d_CRYSTAL_AFC_MAX_FREQ_ERR_PPM = atof(as_CRYSTAL_AFC_MAX_FREQ_ERR_PPM.c_str());
- as_CRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR = ini->ReadString("Crystal AFC Calibration",
- "CRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR",
- "100.0"
- );
- m_dCRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR = atof(as_CRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR.c_str());
- m_sCRYSTAL_AFC_FREQ_ERR_MEASUSE_COUNT = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_FREQ_ERR_MEASUSE_COUNT",
- 10
- );
- m_sCRYSTAL_AFC_RECURSIVE_TIMES = ini->ReadInteger("Crystal AFC Calibration",
- "CRYSTAL_AFC_RECURSIVE_TIMES",
- 20
- );
- }
- //--------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadRxPathLossFromIniFile(TIniFile *ini)
- {
- i_N_PM = ini->ReadInteger("RX measurement samples",
- "N_PM",
- 5
- );
- c_M_PM = ini->ReadInteger("RX measurement samples",
- "M_PM",
- 4
- );
- // unsigned char pm_support_num = frmMainSel->Get_PmSupportNum();
- // if( c_M_PM > pm_support_num )
- // {
- // PostMessage(
- // handle,
- // WM_MF_RF_PM_SUPPORT_FAIL,
- // c_M_PM,
- // pm_support_num
- // );
- // }
- // if( ini->SectionExists( "RX path loss table" ) == false )
- // return false;
- as_GSM400_MAX_RX_LOSS = ini->ReadString("RX path loss table",
- "GSM400_MAX_RX_LOSS",
- "3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.0000,"
- );
- as_GSM400_MIN_RX_LOSS = ini->ReadString("RX path loss table",
- "GSM400_MIN_RX_LOSS",
- "-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.0000,"
- );
- as_GSM850_MAX_RX_LOSS = ini->ReadString("RX path loss table",
- "GSM850_MAX_RX_LOSS",
- "3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.0000,"
- );
- as_GSM850_MIN_RX_LOSS = ini->ReadString("RX path loss table",
- "GSM850_MIN_RX_LOSS",
- "-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.0000,"
- );
- as_GSM900_MAX_RX_LOSS = ini->ReadString("RX path loss table",
- "GSM900_MAX_RX_LOSS",
- "3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.0000,"
- );
- as_GSM900_MIN_RX_LOSS = ini->ReadString("RX path loss table",
- "GSM900_MIN_RX_LOSS",
- "-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.0000,"
- );
- as_DCS1800_MAX_RX_LOSS = ini->ReadString("RX path loss table",
- "DCS1800_MAX_RX_LOSS",
- "3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.0000,"
- );
- as_DCS1800_MIN_RX_LOSS = ini->ReadString("RX path loss table",
- "DCS1800_MIN_RX_LOSS",
- "-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.0000,"
- );
-
- as_PCS1900_MAX_RX_LOSS = ini->ReadString("RX path loss table",
- "PCS1900_MAX_RX_LOSS",
- "3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.000,3.0000,"
- );
- as_PCS1900_MIN_RX_LOSS = ini->ReadString("RX path loss table",
- "PCS1900_MIN_RX_LOSS",
- "-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.000,-3.0000,"
- );
- }
- //--------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadTxIqFromIniFile(TIniFile *ini)
- {
- AnsiString as;
- //////////////////////// TX DC offset ///////////////////////////////////
- m_uiTX_IQ_MEASUREMENT_COUNT = ini->ReadInteger("TX IQ table",
- "TX_IQ_MEASUREMENT_COUNT",
- 20
- );
- m_asTX_IQ_BAND = ini->ReadString("TX IQ table",
- "TX_IQ_BAND",
- "GSM"
- );
- m_sTX_IQ_ARFCN = ini->ReadInteger("TX IQ table",
- "TX_IQ_ARFCN",
- 70
- );
- m_sTX_IQ_PCL = ini->ReadInteger("TX IQ table",
- "TX_IQ_PCL",
- 10
- );
- as = ini->ReadString("TX IQ table",
- "TX_IQ_DC_OFFSET_MAX",
- "-40"
- );
- m_dTX_IQ_DC_OFFSET_MAX = atof(as.c_str());
- as = ini->ReadString("TX IQ table",
- "TX_IQ_GAIN_IMBALANCE_MAX",
- "-40"
- );
- m_dTX_IQ_GAIN_IMBALANCE_MAX = atof(as.c_str());
- m_asTX_IQ_BAND_HIGH = ini->ReadString("TX IQ table",
- "TX_IQ_BAND_HIGH",
- "DCS"
- );
- m_sTX_IQ_ARFCN_HIGH = ini->ReadInteger("TX IQ table",
- "TX_IQ_ARFCN_HIGH",
- 70
- );
- m_sTX_IQ_PCL_HIGH = ini->ReadInteger("TX IQ table",
- "TX_IQ_PCL_HIGH",
- 10
- );
- as = ini->ReadString("TX IQ table",
- "TX_IQ_DC_OFFSET_MAX_HIGH",
- "-40"
- );
- m_dTX_IQ_DC_OFFSET_MAX_HIGH = atof(as.c_str());
- as = ini->ReadString("TX IQ table",
- "TX_IQ_GAIN_IMBALANCE_MAX_HIGH",
- "-40"
- );
- m_dTX_IQ_GAIN_IMBALANCE_MAX_HIGH = atof(as.c_str());
- //////////////////////// TX IQ imbalance ///////////////////////////////////
- // as_TX_IQ_IMBALANCE_BAND = ini->ReadString("TX IQ imbalance table",
- // "TX_IQ_IMBALANCE_BAND",
- // "GSM"
- // );
- // m_sTX_IQ_IMBALANCE_ARFCN = ini->ReadInteger("TX IQ imbalance table",
- // "TX_IQ_IMBALANCE_ARFCN",
- // 70
- // );
- //
- // i_TX_IQ_IMBALANCE_PCL = ini->ReadInteger("TX IQ imbalance table",
- // "TX_IQ_IMBALANCE_PCL",
- // 10
- // );
- //
- //
- // d_TX_IQ_IMBALANCE_MAX = ini->ReadString("TX IQ imbalance table",
- // "TX_IQ_IMBALANCE_MAX",
- // -40
- // );
- }
- //--------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadTxPclFromIniFile(TIniFile *ini)
- {
- AnsiString as;
- //////////////////////////////// APC //////////////////////////////////
- // if( ini->SectionExists( "TX PCL table" ) == false )
- // return false;
- m_asGSM400_CAL_PCL = ini->ReadString("TX PCL table",
- "GSM400_CAL_PCL",
- "17, 12, 5,"
- );
- m_asGSM400_2CAL_PCL = ini->ReadString("TX PCL table",
- "GSM400_2CAL_PCL",
- "19, 5,"
- );
- m_asGSM400_4CAL_PCL = ini->ReadString("TX PCL table",
- "GSM400_4CAL_PCL",
- "15,12,10,6,"
- );
- m_asGSM400_PCL = ini->ReadString("TX PCL table",
- "GSM400_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM400_CHECK_PCL = ini->ReadString("TX PCL table",
- "GSM400_CHECK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM400_MAX_P = ini->ReadString("TX PCL table",
- "GSM400_MAX_P",
- "6, 8, 10,12,13.8,15.8,17.8,19.8,21.8,23.8,25.8,27.8,29.8,31.8,32.8,"
- );
- m_asGSM400_WANTED_P = ini->ReadString("TX PCL table",
- "GSM400_WANTED_P",
- "5.5,7.5,9.5,11.5,13.5,15.5,17.5,19.5,21.5,23.5,25.5,27.5,29.5,31.5,32.7,"
- );
- m_asGSM400_MIN_P = ini->ReadString("TX PCL table",
- "GSM400_MIN_P",
- "5.3,7.3,9.3,11.3,13.3,15,17,19,21,23,25,26.5,28.5,30.5,32.5,"
- );
- m_asGSM400_C = ini->ReadString("TX PCL table",
- "GSM400_C",
- "3,3,3,3,4,4,6,6,8,8,12,12,15,15,35,40"
- );
- m_asGSM400_CORRECTION = ini->ReadString("TX PCL table",
- "GSM400_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- m_asGSM400_EPSK_CAL_PCL = ini->ReadString("TX PCL table",
- "GSM400_EPSK_CAL_PCL",
- "17, 12, 5,"
- );
- m_asGSM400_EPSK_2CAL_PCL = ini->ReadString("TX PCL table",
- "GSM400_EPSK_2CAL_PCL",
- "19, 5,"
- );
- m_asGSM400_EPSK_PCL = ini->ReadString("TX PCL table",
- "GSM400_EPSK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM400_EPSK_CHECK_PCL = ini->ReadString("TX PCL table",
- "GSM400_EPSK_CHECK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM400_EPSK_MAX_P = ini->ReadString("TX PCL table",
- "GSM400_EPSK_MAX_P",
- "6, 8, 10,12,13.8,15.8,17.8,19.8,21.8,23.8,25.8,27.8,27.8,27.8,27.8,"
- );
- m_asGSM400_EPSK_WANTED_P = ini->ReadString("TX PCL table",
- "GSM400_EPSK_WANTED_P",
- "5.2,7,9,11,13,15,17,19,21,23,25,27,27,27,27,"
- );
- m_asGSM400_EPSK_MIN_P = ini->ReadString("TX PCL table",
- "GSM400_EPSK_MIN_P",
- "4,6,8,10,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,26.5,26.5,26.5,"
- );
- m_asGSM400_EPSK_C = ini->ReadString("TX PCL table",
- "GSM400_EPSK_C",
- "3,3,3,3,4,4,6,6,8,8,12,12,15,15,35,40,"
- );
- m_asGSM400_EPSK_CORRECTION = ini->ReadString("TX PCL table",
- "GSM400_EPSK_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- // GSM850
- m_asGSM850_CAL_PCL = ini->ReadString("TX PCL table",
- "GSM850_CAL_PCL",
- "17, 12, 5,"
- );
- m_asGSM850_2CAL_PCL = ini->ReadString("TX PCL table",
- "GSM850_2CAL_PCL",
- "19, 5,"
- );
- m_asGSM850_4CAL_PCL = ini->ReadString("TX PCL table",
- "GSM850_4CAL_PCL",
- "15,12,10,6,"
- );
- m_asGSM850_6CAL_PCL = ini->ReadString("TX PCL table",
- "GSM850_6CAL_PCL",
- "19,17,15,10,8,6,"
- );
- m_asGSM850_6CAL_DAC = ini->ReadString("TX PCL table",
- "GSM850_6CAL_DAC",
- "90,160,223,398,493,549,"
- );
- m_asGSM850_PCL = ini->ReadString("TX PCL table",
- "GSM850_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM850_CHECK_PCL = ini->ReadString("TX PCL table",
- "GSM850_CHECK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM850_MAX_P = ini->ReadString("TX PCL table",
- "GSM850_MAX_P",
- "6, 8, 10,12,13.8,15.8,17.8,19.8,21.8,23.8,25.8,27.8,29.8,31.8,32.8"
- );
- m_asGSM850_WANTED_P = ini->ReadString("TX PCL table",
- "GSM850_WANTED_P",
- "5.5,7.5,9.5,11.5,13.5,15.5,17.5,19.5,21.5,23.5,25.5,27.5,29.5,31.5,32.7,"
- );
- m_asGSM850_MIN_P = ini->ReadString("TX PCL table",
- "GSM850_MIN_P",
- "5.3,7.3,9.3,11.3,13.3,15,17,19,21,23,25,26.5,28.5,30.5,32.5,"
- );
- m_asGSM850_C = ini->ReadString("TX PCL table",
- "GSM850_C",
- "3,3,3,3,4,4,6,6,8,8,12,12,15,15,35,40"
- );
- m_asGSM850_CORRECTION = ini->ReadString("TX PCL table",
- "GSM850_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- m_asGSM850_EPSK_CAL_PCL = ini->ReadString("TX PCL table",
- "GSM850_EPSK_CAL_PCL",
- "17, 12, 5,"
- );
- m_sGSM850_EPSK_1CAL_PCL = ini->ReadInteger("TX PCL table",
- "GSM850_EPSK_1CAL_PCL",
- 19
- );
- m_asGSM850_EPSK_2CAL_PCL = ini->ReadString("TX PCL table",
- "GSM850_EPSK_2CAL_PCL",
- "19, 5,"
- );
- m_asGSM850_EPSK_4CAL_PCL = ini->ReadString("TX PCL table",
- "GSM850_EPSK_4CAL_PCL",
- "15,12,10,6,"
- );
- m_asGSM850_EPSK_PCL = ini->ReadString("TX PCL table",
- "GSM850_EPSK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM850_EPSK_CHECK_PCL = ini->ReadString("TX PCL table",
- "GSM850_EPSK_CHECK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM850_EPSK_MAX_P = ini->ReadString("TX PCL table",
- "GSM850_EPSK_MAX_P",
- "6, 8, 10,12,13.8,15.8,17.8,19.8,21.8,23.8,25.8,27.8,27.8,27.8,27.8,"
- );
- m_asGSM850_EPSK_WANTED_P = ini->ReadString("TX PCL table",
- "GSM850_EPSK_WANTED_P",
- "5.2,7,9,11,13,15,17,19,21,23,25,27,27,27,27,"
- );
- m_asGSM850_EPSK_MIN_P = ini->ReadString("TX PCL table",
- "GSM850_EPSK_MIN_P",
- "4,6,8,10,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,26.5,26.5,26.5,"
- );
- m_asGSM850_EPSK_C = ini->ReadString("TX PCL table",
- "GSM850_EPSK_C",
- "3,3,3,3,4,4,6,6,8,8,12,12,15,15,35,40"
- );
- m_asGSM850_EPSK_CORRECTION = ini->ReadString("TX PCL table",
- "GSM850_EPSK_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- // GSM900
- m_asGSM900_CAL_PCL = ini->ReadString("TX PCL table",
- "GSM900_CAL_PCL",
- "17, 12, 5,"
- );
- m_asGSM900_2CAL_PCL = ini->ReadString("TX PCL table",
- "GSM900_2CAL_PCL",
- "19, 5,"
- );
- m_asGSM900_4CAL_PCL = ini->ReadString("TX PCL table",
- "GSM900_4CAL_PCL",
- "15,12,10,6,"
- );
- m_asGSM900_6CAL_PCL = ini->ReadString("TX PCL table",
- "GSM900_6CAL_PCL",
- "19,17,15,10,8,6,"
- );
- m_asGSM900_6CAL_DAC = ini->ReadString("TX PCL table",
- "GSM900_6CAL_DAC",
- "90,160,223,398,493,549,"
- );
- m_asGSM900_PCL = ini->ReadString("TX PCL table",
- "GSM900_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5"
- );
- m_asGSM900_CHECK_PCL = ini->ReadString("TX PCL table",
- "GSM900_CHECK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM900_MAX_P = ini->ReadString("TX PCL table",
- "GSM900_MAX_P",
- "6, 8, 10,12,13.8,15.8,17.8,19.8,21.8,23.8,25.8,27.8,29.8,31.8,32.8,"
- );
- m_asGSM900_WANTED_P = ini->ReadString("TX PCL table",
- "GSM900_WANTED_P",
- "5.5,7.5,9.5,11.5,13.5,15.5,17.5,19.5,21.5,23.5,25.5,27.5,29.5,31.5,32.7,"
- );
- m_asGSM900_MIN_P = ini->ReadString("TX PCL table",
- "GSM900_MIN_P",
- "5.3,7.3,9.3,11.3,13.3,15,17,19,21,23,25,26.5,28.5,30.5,32.5,"
- );
- m_asGSM900_C = ini->ReadString("TX PCL table",
- "GSM900_C",
- "3,3,3,3,4,4,6,6,8,8,12,12,15,15,35,40"
- );
- m_asGSM900_CORRECTION = ini->ReadString("TX PCL table",
- "GSM900_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- m_asGSM900_EPSK_CAL_PCL = ini->ReadString("TX PCL table",
- "GSM900_EPSK_CAL_PCL",
- "17, 12, 5,"
- );
- m_sGSM900_EPSK_1CAL_PCL = ini->ReadInteger("TX PCL table",
- "GSM900_EPSK_1CAL_PCL",
- 19
- );
- m_asGSM900_EPSK_2CAL_PCL = ini->ReadString("TX PCL table",
- "GSM900_EPSK_2CAL_PCL",
- "19, 5,"
- );
- m_asGSM900_EPSK_4CAL_PCL = ini->ReadString("TX PCL table",
- "GSM900_EPSK_4CAL_PCL",
- "15,12,10,6,"
- );
- m_asGSM900_EPSK_PCL = ini->ReadString("TX PCL table",
- "GSM900_EPSK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5"
- );
- m_asGSM900_EPSK_CHECK_PCL = ini->ReadString("TX PCL table",
- "GSM900_EPSK_CHECK_PCL",
- "19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,"
- );
- m_asGSM900_EPSK_MAX_P = ini->ReadString("TX PCL table",
- "GSM900_EPSK_MAX_P",
- "6, 8, 10,12,13.8,15.8,17.8,19.8,21.8,23.8,25.8,27.8,27.8,27.8,27.8,"
- );
- m_asGSM900_EPSK_WANTED_P = ini->ReadString("TX PCL table",
- "GSM900_EPSK_WANTED_P",
- "5.2,7,9,11,13,15,17,19,21,23,25,27,27,27,27,"
- );
- m_asGSM900_EPSK_MIN_P = ini->ReadString("TX PCL table",
- "GSM900_EPSK_MIN_P",
- "4,6,8,10,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,26.5,26.5,26.5,"
- );
- m_asGSM900_EPSK_C = ini->ReadString("TX PCL table",
- "GSM900_EPSK_C",
- "3,3,3,3,4,4,6,6,8,8,12,12,15,15,35,40"
- );
- m_asGSM900_EPSK_CORRECTION = ini->ReadString("TX PCL table",
- "GSM900_EPSK_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- // DCS1800
- m_asDCS1800_CAL_PCL = ini->ReadString("TX PCL table",
- "DCS1800_CAL_PCL",
- "13, 8, 1,"
- );
- m_asDCS1800_2CAL_PCL = ini->ReadString("TX PCL table",
- "DCS1800_2CAL_PCL",
- "15, 0,"
- );
- m_asDCS1800_4CAL_PCL = ini->ReadString("TX PCL table",
- "DCS1800_4CAL_PCL",
- "14,11,9,5,"
- );
- m_asDCS1800_6CAL_PCL = ini->ReadString("TX PCL table",
- "DCS1800_6CAL_PCL",
- "13,10,8,5,3,1,"
- );
- m_asDCS1800_6CAL_DAC = ini->ReadString("TX PCL table",
- "DCS1800_6CAL_DAC",
- "75,178,250,404,495,548,"
- );
- m_asDCS1800_PCL = ini->ReadString("TX PCL table",
- "DCS1800_PCL",
- "15,14,13,12,11,10, 9, 8, 7, 6, 5,4,3,2,1,0,"
- );
- m_asDCS1800_CHECK_PCL = ini->ReadString("TX PCL table",
- "DCS1800_CHECK_PCL",
- "15,14,13,12,11,10, 9, 8, 7, 6, 5,4,3,2,1,0,"
- );
- m_asDCS1800_MAX_P = ini->ReadString("TX PCL table",
- "DCS1800_MAX_P",
- "1.5, 2.5, 4.5,6.5,8.5,10.5,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,28.5,31,"
- );
- m_asDCS1800_WANTED_P = ini->ReadString("TX PCL table",
- "DCS1800_WANTED_P",
- "1.0,2.5,4.5,6.5,8.5,10.5,12,14,16,18,20,22,24,25.5,28.2,29.9,"
- );
- m_asDCS1800_MIN_P = ini->ReadString("TX PCL table",
- "DCS1800_MIN_P",
- "0.5,2.2,4.2,6.2,8.2,10.2,12,14,16,18,20,22,24,25,28,29.8,"
- );
- m_asDCS1800_C = ini->ReadString("TX PCL table",
- "DCS1800_C",
- "3,3,3,3,4,4,6,6,8,8,12,12,15,15,35,40"
- );
- m_asDCS1800_CORRECTION = ini->ReadString("TX PCL table",
- "DCS1800_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- m_asDCS1800_EPSK_CAL_PCL = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_CAL_PCL",
- "13, 8, 1,"
- );
- m_sDCS1800_EPSK_1CAL_PCL = ini->ReadInteger("TX PCL table",
- "DCS1800_EPSK_1CAL_PCL",
- 15
- );
- m_asDCS1800_EPSK_2CAL_PCL = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_2CAL_PCL",
- "15, 0,"
- );
- m_asDCS1800_EPSK_4CAL_PCL = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_4CAL_PCL",
- "14,11,9,5,"
- );
- m_asDCS1800_EPSK_PCL = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_PCL",
- "15,14,13,12,11,10, 9, 8, 7, 6, 5,4,3,2,1,0,"
- );
- m_asDCS1800_EPSK_CHECK_PCL = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_CHECK_PCL",
- "15,14,13,12,11,10, 9, 8, 7, 6, 5,4,3,2,1,0,"
- );
- m_asDCS1800_EPSK_MAX_P = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_MAX_P",
- "2, 3.5, 5,7,9,11,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,26.5,26.5,"
- );
- m_asDCS1800_EPSK_WANTED_P = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_WANTED_P",
- "1.2,2.5,4.3,6.2,8,10,12,14,16,18,20,22,24,26,26,26,"
- );
- m_asDCS1800_EPSK_MIN_P = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_MIN_P",
- "-0.5,1.5,3.5,5,7,9,11.5,13.5,15.5,17.5,19.5,21.5,23.5,25,25,25,"
- );
- m_asDCS1800_EPSK_C = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_C",
- "3,3,3,3,4,4,6,6,8,8,12,12,15,15,35,40"
- );
- m_asDCS1800_EPSK_CORRECTION = ini->ReadString("TX PCL table",
- "DCS1800_EPSK_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- // PCS1900
- m_asPCS1900_CAL_PCL = ini->ReadString("TX PCL table",
- "PCS1900_CAL_PCL",
- "13, 8, 1,"
- );
- m_asPCS1900_2CAL_PCL = ini->ReadString("TX PCL table",
- "PCS1900_2CAL_PCL",
- "15, 0,"
- );
- m_asPCS1900_4CAL_PCL = ini->ReadString("TX PCL table",
- "PCS1900_4CAL_PCL",
- "14,11,9,5,"
- );
- m_asPCS1900_6CAL_PCL = ini->ReadString("TX PCL table",
- "PCS1900_6CAL_PCL",
- "13,10,8,5,3,1,"
- );
- m_asPCS1900_6CAL_DAC = ini->ReadString("TX PCL table",
- "PCS1900_6CAL_DAC",
- "75,178,250,404,495,548,"
- );
- m_asPCS1900_PCL = ini->ReadString("TX PCL table",
- "PCS1900_PCL",
- "15,14,13,12,11,10, 9, 8, 7, 6, 5,4,3,2,1,0,"
- );
- m_asPCS1900_CHECK_PCL = ini->ReadString("TX PCL table",
- "PCS1900_CHECK_PCL",
- "15,14,13,12,11,10, 9, 8, 7, 6, 5,4,3,2,1,0,"
- );
- m_asPCS1900_MAX_P = ini->ReadString("TX PCL table",
- "PCS1900_MAX_P",
- "0.5, 2.5, 4.5,6.5,8.5,10.5,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,28.5,30.5,"
- );
- m_asPCS1900_WANTED_P = ini->ReadString("TX PCL table",
- "PCS1900_WANTED_P",
- "0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,"
- );
- m_asPCS1900_MIN_P = ini->ReadString("TX PCL table",
- "PCS1900_MIN_P",
- "-0.5,1.5,3.5,5.5,7.5,9.5,11.5,13.5,15.5,17.5,19.5,21.5,23.5,25.5,27.5,29.5,"
- );
- m_asPCS1900_C = ini->ReadString("TX PCL table",
- "PCS1900_C",
- "1,2,2,3,4,5,7,9,10,13,13,13,14,14,15,20,"
- );
- m_asPCS1900_CORRECTION = ini->ReadString("TX PCL table",
- "PCS1900_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- m_asPCS1900_EPSK_CAL_PCL = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_CAL_PCL",
- "13, 8, 1,"
- );
- m_sPCS1900_EPSK_1CAL_PCL = ini->ReadInteger("TX PCL table",
- "PCS1900_EPSK_1CAL_PCL",
- 15
- );
- m_asPCS1900_EPSK_2CAL_PCL = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_2CAL_PCL",
- "15, 0,"
- );
- m_asPCS1900_EPSK_4CAL_PCL = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_4CAL_PCL",
- "14,11,9,5,"
- );
- m_asPCS1900_EPSK_PCL = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_PCL",
- "15,14,13,12,11,10, 9, 8, 7, 6, 5,4,3,2,1,0,"
- );
- m_asPCS1900_EPSK_CHECK_PCL = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_CHECK_PCL",
- "15,14,13,12,11,10, 9, 8, 7, 6, 5,4,3,2,1,0,"
- );
-
- m_asPCS1900_EPSK_MAX_P = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_MAX_P",
- "2, 3.5, 5,7,9,11,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,26.5,26.5,"
- );
- m_asPCS1900_EPSK_WANTED_P = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_WANTED_P",
- "1.2,2.5,4.3,6.2,8,10,12,14,16,18,20,22,24,26,26,26,"
- );
- m_asPCS1900_EPSK_MIN_P = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_MIN_P",
- "-0.5,1.5,3.5,5,7,9,11.5,13.5,15.5,17.5,19.5,21.5,23.5,25,25,25,"
- );
- m_asPCS1900_EPSK_C = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_C",
- "1,2,2,3,4,5,7,9,10,13,13,13,14,14,15,20,"
- );
- m_asPCS1900_EPSK_CORRECTION = ini->ReadString("TX PCL table",
- "PCS1900_EPSK_CORRECTION",
- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
- );
- m_sMAX_APC_DAC = ini->ReadInteger("TX PCL table",
- "MAX_APC_DAC",
- 1023
- );
- m_cTSC = ini->ReadInteger("TX PCL table",
- "TSC",
- 5
- );
- m_iRecursiveTimes = ini->ReadInteger("TX PCL table",
- "Recursive Times",
- 5
- );
- as = ini->ReadString("TX PCL table",
- "APC Delta",
- "0.1"
- );
- m_dAPC_Delta = atof(as.c_str());
- m_asAPC_Check = ini->ReadString("TX PCL table",
- "APC Check",
- "yes"
- );
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM850_MAX_HIGH_APC_DC_OFFSET_P",
- "-3.5"
- );
- m_dSKY77328_GSM850_MAX_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM850_WANTED_HIGH_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_GSM850_WANTED_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM850_MIN_HIGH_APC_DC_OFFSET_P",
- "-4.5"
- );
- m_dSKY77328_GSM850_MIN_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM850_MAX_LOW_APC_DC_OFFSET_P",
- "-3.5"
- );
- m_dSKY77328_GSM850_MAX_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM850_WANTED_LOW_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_GSM850_WANTED_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM850_MIN_LOW_APC_DC_OFFSET_P",
- "-4.5"
- );
- m_dSKY77328_GSM850_MIN_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM900_MAX_HIGH_APC_DC_OFFSET_P",
- "-3.5"
- );
- m_dSKY77328_GSM900_MAX_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM900_WANTED_HIGH_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_GSM900_WANTED_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM900_MIN_HIGH_APC_DC_OFFSET_P",
- "-4.5"
- );
- m_dSKY77328_GSM900_MIN_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM900_MAX_LOW_APC_DC_OFFSET_P",
- "-3.5"
- );
- m_dSKY77328_GSM900_MAX_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM900_WANTED_LOW_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_GSM900_WANTED_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM900_MIN_LOW_APC_DC_OFFSET_P",
- "-4.5"
- );
- m_dSKY77328_GSM900_MIN_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_DCS1800_MAX_HIGH_APC_DC_OFFSET_P",
- "-3.5"
- );
- m_dSKY77328_DCS1800_MAX_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_DCS1800_WANTED_HIGH_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_DCS1800_WANTED_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_DCS1800_MIN_HIGH_APC_DC_OFFSET_P",
- "-4.5"
- );
- m_dSKY77328_DCS1800_MIN_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_DCS1800_MAX_LOW_APC_DC_OFFSET_P",
- "-3.5"
- );
- m_dSKY77328_DCS1800_MAX_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_DCS1800_WANTED_LOW_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_DCS1800_WANTED_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_DCS1800_MIN_LOW_APC_DC_OFFSET_P",
- "-4.5"
- );
- m_dSKY77328_DCS1800_MIN_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_PCS1900_MAX_HIGH_APC_DC_OFFSET_P",
- "-3.5"
- );
- m_dSKY77328_PCS1900_MAX_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_PCS1900_WANTED_HIGH_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_PCS1900_WANTED_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_PCS1900_MIN_HIGH_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_PCS1900_MIN_HIGH_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_PCS1900_MAX_LOW_APC_DC_OFFSET_P",
- "-4.5"
- );
- m_dSKY77328_PCS1900_MAX_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_PCS1900_WANTED_LOW_APC_DC_OFFSET_P",
- "-4"
- );
- m_dSKY77328_PCS1900_WANTED_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_PCS1900_MIN_LOW_APC_DC_OFFSET_P",
- "-4.5"
- );
- m_dSKY77328_PCS1900_MIN_LOW_APC_DC_OFFSET_P = atof(as.c_str());
- m_iSKY77328_DAC_Delta = ini->ReadInteger("TX PCL table",
- "SKY77328_DAC_Delta",
- 10
- );
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM850_M",
- "16.8"
- );
- m_dSKY77328_GSM850_M = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_GSM900_M",
- "16.8"
- );
- m_dSKY77328_GSM900_M = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_DCS1800_M",
- "17.78"
- );
- m_dSKY77328_DCS1800_M = atof(as.c_str());
- as = ini->ReadString("TX PCL table",
- "SKY77328_PCS1900_M",
- 17.78
- );
- m_dSKY77328_PCS1900_M = atof(as.c_str());
- m_iSKY77328_GSM850_TARGET_PCL = ini->ReadInteger("TX PCL table",
- "SKY77328_GSM850_TARGET_PCL",
- 19
- );
- m_iSKY77328_GSM900_TARGET_PCL = ini->ReadInteger("TX PCL table",
- "SKY77328_GSM900_TARGET_PCL",
- 19
- );
- m_iSKY77328_DCS1800_TARGET_PCL = ini->ReadInteger("TX PCL table",
- "SKY77328_DCS1800_TARGET_PCL",
- 15
- );
- m_iSKY77328_PCS1900_TARGET_PCL = ini->ReadInteger("TX PCL table",
- "SKY77328_PCS1900_TARGET_PCL",
- 15
- );
- m_asAXIOM502_GSM850_SWITCH_PCL = ini->ReadString("TX PCL table",
- "AXIOM502_GSM850_SWITCH_PCL",
- "16,10,"
- );
- m_asAXIOM502_GSM900_SWITCH_PCL = ini->ReadString("TX PCL table",
- "AXIOM502_GSM900_SWITCH_PCL",
- "16,10,"
- );
- m_asAXIOM502_DCS1800_SWITCH_PCL = ini->ReadString("TX PCL table",
- "AXIOM502_DCS1800_SWITCH_PCL",
- "9,4,"
- );
- m_asAXIOM502_PCS1900_SWITCH_PCL = ini->ReadString("TX PCL table",
- "AXIOM502_PCS1900_SWITCH_PCL",
- "9,4,"
- );
- }
- //--------------------------------------------------------------------------
- //void TMETA_factory_cfg::ReadPhaseErrFromIniFile(TIniFile *ini)
- //{
- // //////////////////////// phase error ///////////////////////////////////
- // as_PHASE_ERROR_BAND = ini->ReadString("Phase error table",
- // "PHASE_ERROR_BAND",
- // "GSM"
- // );
- //
- // m_sPHASE_ERROR_ARFCN = ini->ReadInteger("Phase error table",
- // "PHASE_ERROR_ARFCN",
- // 70
- // );
- //
- // i_PHASE_ERROR_PCL = ini->ReadInteger("Phase error table",
- // "PHASE_ERROR_PCL",
- // 10
- // );
- //
- // i_PHASE_ERROR_MEASUSE_COUNT = ini->ReadInteger("Phase error table",
- // "PHASE_ERROR_MEASUSE_COUNT",
- // 10
- // );
- //
- // d_PHASE_ERROR_RMS_ERROR = ini->ReadString("Phase error table",
- // "PHASE_ERROR_RMS_ERROR",
- // 1.5
- // );
- //}
- //--------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadAdcFromIniFile(TIniFile *ini)
- {
- // ADC
- AnsiString as_ADC_RESISTANCE;
- AnsiString as_MAX_VOLTAGE_DIFFERENCE;
- AnsiString as_MAX_CURRENT_DIFFERENCE;
- float f_CURRENT_LIMIT;
- float f_MAX_BATTERY_ADC_SLOPE;
- float f_MIN_BATTERY_ADC_SLOPE;
- float f_MAX_BATTERY_ADC_OFFSET;
- float f_MIN_BATTERY_ADC_OFFSET;
- i_ADC_V1 = ini->ReadInteger("ADC table",
- "ADC_V1",
- 3400
- );
- i_ADC_V2 = ini->ReadInteger("ADC table",
- "ADC_V2",
- 4200
- );
- i_ADC_CHECK_VOLTAGE = ini->ReadInteger("ADC table",
- "ADC_CHECK_VOLTAGE",
- 3600
- );
- i_NORMAL_VOLTAGE = ini->ReadInteger("ADC table",
- "NORMAL_VOLTAGE",
- 3800
- );
- i_CURRENT_LIMIT = ini->ReadInteger("ADC table",
- "CURRENT_LIMIT",
- 3000
- );
- i_MAX_BATTERY_ADC_SLOPE = ini->ReadInteger("ADC table",
- "MAX_BATTERY_ADC_SLOPE",
- 5300
- );
- i_MIN_BATTERY_ADC_SLOPE = ini->ReadInteger("ADC table",
- "MIN_BATTERY_ADC_SLOPE",
- 5100
- );
- i_MAX_BATTERY_ADC_OFFSET = ini->ReadInteger("ADC table",
- "MAX_BATTERY_ADC_OFFSET",
- 1000000
- );
- i_MIN_BATTERY_ADC_OFFSET = ini->ReadInteger("ADC table",
- "MIN_BATTERY_ADC_OFFSET",
- -1000000
- );
- i_BATTERY_CHANNEL = ini->ReadInteger("ADC table",
- "BATTERY_CHANNEL",
- 0
- );
- i_CHARGER_CHANNEL = ini->ReadInteger("ADC table",
- "CHARGER_CHANNEL",
- 3
- );
- as_ADC_RESISTANCE = ini->ReadString("ADC table",
- "ADC_RESISTANCE",
- "0.33"
- );
- d_ADC_RESISTANCE = atof(as_ADC_RESISTANCE.c_str());
- as_MAX_VOLTAGE_DIFFERENCE = ini->ReadString("ADC table",
- "MAX_VOLTAGE_DIFFERENCE",
- "0.04"
- );
- d_MAX_VOLTAGE_DIFFERENCE = atof(as_MAX_VOLTAGE_DIFFERENCE.c_str());
- as_MAX_CURRENT_DIFFERENCE = ini->ReadString("ADC table",
- "MAX_CURRENT_DIFFERENCE",
- "0.04"
- );
- d_MAX_CURRENT_DIFFERENCE = atof(as_MAX_CURRENT_DIFFERENCE.c_str());
- i_ADC_MEASUREMENT_COUNT = ini->ReadInteger("ADC table",
- "ADC_MEASUREMENT_COUNT",
- 1000
- );
-
- //if (! is_MAX_WANTED_MIN_P_valid())
- // return false;
-
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadCVFromIniFile(TIniFile *ini)
- {
- m_cMAX_CV_STEP = ini->ReadInteger("CV table",
- "MAX_CV_STEP",
- 17);
- m_cMIN_CV_STEP = ini->ReadInteger("CV table",
- "MIN_CV_STEP",
- 11);
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadAge8960InitFromIniFile(TIniFile *ini)
- {
- AnsiString as;
- m_as8960_GPIB_Addr = ini->ReadString("8960 Initialization",
- "8960 GPIB Address",
- "GPIB0::15::INSTR"
- );
- m_iTimeOut = ini->ReadInteger("8960 Initialization",
- "Time Out",
- 7000
- );
- // dB
- as = ini->ReadString("8960 Initialization",
- "GSM400 cable loss",
- "-0.5"
- );
- m_dGSM400_CL = atof(as.c_str());
- as = ini->ReadString("8960 Initialization",
- "GSM850 cable loss",
- "-0.5"
- );
- m_dGSM850_CL = atof(as.c_str());
- as = ini->ReadString("8960 Initialization",
- "GSM900 cable loss",
- "-0.5"
- );
- m_dGSM900_CL = atof(as.c_str());
- as = ini->ReadString("8960 Initialization",
- "DCS1800 cable loss",
- "-1.0"
- );
- m_dDCS1800_CL = atof(as.c_str());
- as = ini->ReadString("8960 Initialization",
- "PCS1900 cable loss",
- "-1.0"
- );
- m_dPCS1900_CL = atof(as.c_str());
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadCmu200InitFromIniFile(TIniFile *ini)
- {
- AnsiString as;
- // CMU200 Initialization
- m_asCMU200_GPIB_Addr = ini->ReadString("CMU200 Initialization",
- "CMU200 GPIB Address",
- "GPIB0::20::INSTR"
- );
- m_iCMU200_TimeOut = ini->ReadInteger("CMU200 Initialization",
- "Time Out",
- 5000
- );
- // cable loss
- as = ini->ReadString("CMU200 Initialization",
- "GSM400 input cable loss",
- "1.0"
- );
- m_dCMU200_INPUT_GSM400_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "GSM850 input cable loss",
- "1.0"
- );
- m_dCMU200_INPUT_GSM850_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "GSM900 input cable loss",
- "1.2"
- );
- m_dCMU200_INPUT_GSM900_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "DCS1800 input cable loss",
- "1.8"
- );
- m_dCMU200_INPUT_DCS1800_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "PCS1900 input cable loss",
- "1.8"
- );
- m_dCMU200_INPUT_PCS1900_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "BT input cable loss",
- "1.5"
- );
- m_dCMU200_INPUT_BT_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "GSM400 output cable loss",
- "1.0"
- );
- m_dCMU200_OUTPUT_GSM400_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "GSM850 output cable loss",
- "1.0"
- );
- m_dCMU200_OUTPUT_GSM850_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "GSM900 output cable loss",
- "1.2"
- );
- m_dCMU200_OUTPUT_GSM900_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "DCS1800 output cable loss",
- "1.8"
- );
- m_dCMU200_OUTPUT_DCS1800_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "PCS1900 output cable loss",
- "1.8"
- );
- m_dCMU200_OUTPUT_PCS1900_CL = atof(as.c_str());
- as = ini->ReadString("CMU200 Initialization",
- "BT output cable loss",
- "1.5"
- );
- m_dCMU200_OUTPUT_BT_CL = atof(as.c_str());
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadCBTInitFromIniFile(TIniFile *ini)
- {
- AnsiString as;
- // CMU200 Initialization
- m_asCBT_GPIB_Addr = ini->ReadString("CBT Initialization",
- "CBT GPIB Address",
- "GPIB0::20::INSTR"
- );
- m_iCBT_TimeOut = ini->ReadInteger("CBT Initialization",
- "Time Out",
- 5000
- );
- // cable loss
- as = ini->ReadString("CBT Initialization",
- "BT input cable loss",
- "1.5"
- );
- m_dCBT_INPUT_BT_CL = atof(as.c_str());
- as = ini->ReadString("CBT Initialization",
- "BT output cable loss",
- "1.5"
- );
- m_dCBT_OUTPUT_BT_CL = atof(as.c_str());
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadIQviewInitFromIniFile(TIniFile *ini)
- {
- AnsiString as;
- m_asIQview_IP_Addr = ini->ReadString("IQview Initialization",
- "IQview IP Address",
- "192.168.100.254"
- );
- m_iIQview_TimeOut = ini->ReadInteger("IQview Initialization",
- "Time Out",
- 5000
- );
- as = ini->ReadString("IQview Initialization",
- "2.4G Cable loss",
- "-1.0"
- );
- m_dIQview_2_4G_CL = atof(as.c_str());
- as = ini->ReadString("IQview Initialization",
- "5G Cable loss",
- "-1.0"
- );
- m_dIQview_5G_CL = atof(as.c_str());
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadAgilentN4010aInitFromIniFile(TIniFile *ini)
- {
- AnsiString as;
- m_asN4010a_VISA_Alias_Name = ini->ReadString("Agilent N4010A Initialization",
- "VISA Alias Name",
- "UsbDevice1"
- );
- m_asN4010a_VISA_Address = ini->ReadString("Agilent N4010A Initialization",
- "VISA Address",
- "USB0::2391::4607:: JAGUAR::0::INSTR"
- );
- m_iN4010a_TimeOut = ini->ReadInteger("Agilent N4010A Initialization",
- "Time Out",
- 5000
- );
- as = ini->ReadString("Agilent N4010A Initialization",
- "2.4G Cable loss",
- "-1.0"
- );
- m_dN4010a_2_4G_CL = atof(as.c_str());
- as = ini->ReadString("Agilent N4010A Initialization",
- "5G Cable loss",
- "-1.0"
- );
- m_dN4010a_5G_CL = atof(as.c_str());
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadWiFiCommonFromIniFile(TIniFile *ini)
- {
- m_asWiFi_Support = ini->ReadString( "WiFi common",
- "WiFi_Support",
- "0x06"
- );
- }
- //---------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadWiFiTxPowerFromIniFile(TIniFile *ini)
- {
- AnsiString as;
- // WiFi TX power
- as = ini->ReadString("WiFi TX power table",
- "CCK_MAX_P",
- "15.0"
- );
- m_dCCK_MAX_P = atof(as.c_str());
- as = ini->ReadString("WiFi TX power table",
- "CCK_WANTED_P",
- "14.0"
- );
- m_dCCK_WANTED_P = atof(as.c_str());
- as = ini->ReadString("WiFi TX power table",
- "CCK_MIN_P",
- "13.0"
- );
- m_dCCK_MIN_P = atof(as.c_str());
- as = ini->ReadString("WiFi TX power table",
- "CCK_Delta",
- "0.1"
- );
- m_dCCK_Delta = atof(as.c_str());
- m_as802_11B_CAL_CHANNEL = ini->ReadString("WiFi TX power table",
- "802.11B_CAL_CHANNEL",
- "2412,2417,2422,2427,2432,2437,2442,2447,2452,2457,2462,2467,2472,2484,"
- );
- m_as802_11B_CHECK_CHANNEL = ini->ReadString("WiFi TX power table",
- "802.11B_CHECK_CHANNEL",
- "2412,2417,2422,2427,2432,2437,2442,2447,2452,2457,2462,2467,2472,2484,"
- );
-
- as = ini->ReadString("WiFi TX power table",
- "CCK_CAL_RATE",
- "1"
- );
- m_dCCK_CAL_RATE = atof(as.c_str());
- as = ini->ReadString("WiFi TX power table",
- "CCK_CHECK_RATE",
- "1");
- m_dCCK_CHECK_RATE = atof(as.c_str());
- m_iCCK_C = ini->ReadInteger("WiFi TX power table",
- "CCK_C",
- 3
- );
- as = ini->ReadString("WiFi TX power table",
- "OFDM_MAX_P",
- "12.0"
- );
- m_dOFDM_MAX_P = atof(as.c_str());
- as = ini->ReadString("WiFi TX power table",
- "OFDM_WANTED_P",
- "11.0"
- );
- m_dOFDM_WANTED_P = atof(as.c_str());
- as = ini->ReadString("WiFi TX power table",
- "OFDM_MIN_P",
- "10.0"
- );
- m_dOFDM_MIN_P = atof(as.c_str());
- as = ini->ReadString("WiFi TX power table",
- "OFDM_Delta",
- "0.1"
- );
- m_dOFDM_Delta = atof(as.c_str());
- m_iOFDM_C = ini->ReadInteger("WiFi TX power table",
- "OFDM_C",
- 3
- );
- m_as802_11G_CAL_CHANNEL = ini->ReadString("WiFi TX power table",
- "802.11G_CAL_CHANNEL",
- "2412,2417,2422,2427,2432,2437,2442,2447,2452,2457,2462,2467,2472,2484,"
- );
- m_as802_11G_CHECK_CHANNEL = ini->ReadString("WiFi TX power table",
- "802.11G_CHECK_CHANNEL",
- "2412,2417,2422,2427,2432,2437,2442,2447,2452,2457,2462,2467,2472,2484,"
- );
- as = ini->ReadString("WiFi TX power table",
- "OFDM_CAL_RATE",
- "54"
- );
- m_dOFDM_CAL_RATE = atof(as.c_str());
- as = ini->ReadString("WiFi TX power table",
- "OFDM_CHECK_RATE",
- "54"
- );
- m_dOFDM_CHECK_RATE = atof(as.c_str());
- m_iWiFiTxPRecursive_Times = ini->ReadInteger("WiFi TX power table",
- "Recursive Times",
- 10
- );
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadBTCommonFromIniFile(TIniFile *ini)
- {
- AnsiString as = ini->ReadString("BT common", "BT_DOWNLINK_POWER", "-70");
- m_dBT_DOWNLINK_POWER = atof(as.c_str());
-
- m_asBD_Address = ini->ReadString("BT common", "BD Address", "123456789012");
- m_asBD_Address = m_asBD_Address.UpperCase();
- m_asInquiry_Enable = ini->ReadString("BT common", "Inquiry enable", "yes");
- }
- //----------------------------------------------------------------------------
- void TMETA_factory_cfg::ReadBTCrystalCAPIDFromIniFile(TIniFile *ini)
- {
- m_ucBT_CRYSTAL_CAP_ID1 = ini->ReadInteger("BT crystal CAP ID table", "BT_CRYSTAL_CAP_ID1", 100);
- m_ucBT_CRYSTAL_CAP_ID2 = ini->ReadInteger("BT crystal CAP ID table", "BT_CRYSTAL_CAP_ID2", 127);
- m_usBT_CRYSTAL_CHANNEL = ini->ReadInteger("BT crystal CAP ID table", "BT_CRYSTAL_CHANNEL", 48);
- AnsiString as = ini->ReadString("BT crystal CAP ID table", "BT_CRYSTAL_MAX_FREQ_ACCURACY", 20);
- m_dBT_CRYSTAL_MAX_FREQ_ACCURACY = atof(as.c_str());
- m_uiMIN_POLL_COUNT = ini->ReadInteger("BT crystal CAP ID table", "MIN_POLL_COUNT", 399999);
- m_uiMAX_POLL_COUNT = ini->ReadInteger("BT crystal CAP ID table", "MIN_POLL_COUNT", 400001);
- }
- //=============================================================================
- bool TMETA_factory_cfg::SaveRxPathLossToCfgFile(AnsiString as_filename)
- {
- TIniFile *ini;
- ini = new TIniFile( as_filename );
- if(ini == NULL) return false;
- ini->WriteString( "RX measurement samples",
- "N_PM",
- IntToStr(i_N_PM)
- );
- ini->WriteString( "RX measurement samples",
- "M_PM",
- IntToStr(c_M_PM)
- );
- ini->WriteString( "RX path loss table",
- "GSM400_MAX_RX_LOSS",
- as_GSM400_MAX_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "GSM400_MIN_RX_LOSS",
- as_GSM400_MIN_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "GSM850_MAX_RX_LOSS",
- as_GSM850_MAX_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "GSM850_MIN_RX_LOSS",
- as_GSM850_MIN_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "GSM900_MAX_RX_LOSS",
- as_GSM900_MAX_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "GSM900_MIN_RX_LOSS",
- as_GSM900_MIN_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "DCS1800_MAX_RX_LOSS",
- as_DCS1800_MAX_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "DCS1800_MIN_RX_LOSS",
- as_DCS1800_MIN_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "PCS1900_MAX_RX_LOSS",
- as_PCS1900_MAX_RX_LOSS
- );
- ini->WriteString( "RX path loss table",
- "PCS1900_MIN_RX_LOSS",
- as_PCS1900_MIN_RX_LOSS
- );
- delete ini;
- return true;
- }
- //---------------------------------------------------------------------
- bool TMETA_factory_cfg::SaveCommonToCfgFile(AnsiString as_filename)
- {
- TIniFile *ini;
- ini = new TIniFile( as_filename );
- if(ini == NULL) return false;
- // 8960 initialization
- ini->WriteString( "8960 Initialization",
- "8960 GPIB Address",
- m_as8960_GPIB_Addr
- );
- ini->WriteString( "8960 Initialization",
- "Time Out",
- IntToStr(m_iTimeOut)
- );
- ini->WriteString( "8960 Initialization",
- "GSM400 cable loss",
- Double_To_AnsiString(m_dGSM400_CL)
- );
- ini->WriteString( "8960 Initialization",
- "GSM850 cable loss",
- Double_To_AnsiString(m_dGSM850_CL)
- );
- ini->WriteString( "8960 Initialization",
- "GSM900 cable loss",
- Double_To_AnsiString(m_dGSM900_CL)
- );
- ini->WriteString( "8960 Initialization",
- "DCS1800 cable loss",
- Double_To_AnsiString(m_dDCS1800_CL)
- );
- ini->WriteString( "8960 Initialization",
- "PCS1900 cable loss",
- Double_To_AnsiString(m_dPCS1900_CL)
- );
- // CMU200 Initialization
- ini->WriteString( "CMU200 Initialization",
- "CMU200 GPIB Address",
- m_asCMU200_GPIB_Addr
- );
- ini->WriteString( "CMU200 Initialization",
- "Time Out",
- IntToStr(m_iCMU200_TimeOut)
- );
- ini->WriteString( "CMU200 Initialization",
- "GSM400 input cable loss",
- Double_To_AnsiString(m_dCMU200_INPUT_GSM400_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "GSM850 input cable loss",
- Double_To_AnsiString(m_dCMU200_INPUT_GSM850_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "GSM900 input cable loss",
- Double_To_AnsiString(m_dCMU200_INPUT_GSM900_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "DCS1800 input cable loss",
- Double_To_AnsiString(m_dCMU200_INPUT_DCS1800_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "PCS1900 input cable loss",
- Double_To_AnsiString(m_dCMU200_INPUT_PCS1900_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "GSM400 output cable loss",
- Double_To_AnsiString(m_dCMU200_OUTPUT_GSM400_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "GSM850 output cable loss",
- Double_To_AnsiString(m_dCMU200_OUTPUT_GSM850_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "GSM900 output cable loss",
- Double_To_AnsiString(m_dCMU200_OUTPUT_GSM900_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "DCS1800 output cable loss",
- Double_To_AnsiString(m_dCMU200_OUTPUT_DCS1800_CL)
- );
- ini->WriteString( "CMU200 Initialization",
- "PCS1900 output cable loss",
- Double_To_AnsiString(m_dCMU200_OUTPUT_PCS1900_CL)
- );
- // Frequency Bank
- ini->WriteString( "Frequency Bank",
- "bank",
- as_FreqBank
- );
- // C0 for each Bank
- ini->WriteString( "C0 for each Bank",
- "arfcn_C0_GSM",
- IntToStr(m_sARFCN_C0_GSM)
- );
- ini->WriteString( "C0 for each Bank",
- "arfcn_C0_DCS",
- IntToStr(m_sARFCN_C0_DCS)
- );
- ini->WriteString( "C0 for each Bank",
- "arfcn_C0_PCS",
- IntToStr(m_sARFCN_C0_PCS)
- );
- ini->WriteString( "C0 for each Bank",
- "arfcn_C0_GSM850",
- IntToStr(m_sARFCN_C0_GSM850)
- );
- ini->WriteString( "C0 for each Bank",
- "arfcn_C0_GSM400",
- IntToStr(m_sARFCN_C0_GSM400)
- );
- // downlink power
- ini->WriteString( "Downlink power",
- "P_DL",
- Double_To_AnsiString(d_P_DL)
- );
- delete ini;
- return true;
- }
- //---------------------------------------------------------------------
- bool TMETA_factory_cfg::SaveAfcToCfgFile(AnsiString as_filename)
- {
- TIniFile *ini;
- ini = new TIniFile( as_filename );
- if(ini == NULL) return false;
- ini->WriteString( "AFC Calibration",
- "AFC_BAND",
- as_AFC_BAND
- );
- ini->WriteString( "AFC Calibration",
- "AFC_ARFCN",
- IntToStr(m_sAFC_ARFCN)
- );
- ini->WriteString( "AFC Calibration",
- "N_AFC",
- IntToStr(m_sN_AFC)
- );
- ini->WriteString( "AFC Calibration",
- "DAC1",
- IntToStr(m_sDAC1)
- );
- ini->WriteString( "AFC Calibration",
- "DAC2",
- IntToStr(m_sDAC2)
- );
- ini->WriteString( "AFC Calibration",
- "CRYSTAL_DAC1",
- IntToStr(m_sCRYSTAL_DAC1)
- );
- ini->WriteString( "AFC Calibration",
- "CRYSTAL_DAC2",
- IntToStr(m_sCRYSTAL_DAC2)
- );
- ini->WriteString( "AFC table",
- "MAX_INIT_AFC_DAC",
- IntToStr(m_sMAX_INIT_AFC_DAC)
- );
- ini->WriteString( "AFC table",
- "MIN_INIT_AFC_DAC",
- IntToStr(m_sMIN_INIT_AFC_DAC)
- );
- ini->WriteString( "AFC table",
- "MAX_AFC_SLOPE",
- Double_To_AnsiString(d_MAX_AFC_SLOPE)
- );
- ini->WriteString( "AFC table",
- "MIN_AFC_SLOPE",
- Double_To_AnsiString(d_MIN_AFC_SLOPE)
- );
- delete ini;
- return true;
- }
- //---------------------------------------------------------------------
- //bool TMETA_factory_cfg::SavePhErrToCfgFile(AnsiString as_filename)
- //{
- // TIniFile *ini;
- // ini = new TIniFile( as_filename );
- // if(ini == NULL) return false;
- //
- // ini->WriteString( "Phase error table",
- // "PHASE_ERROR_BAND",
- // as_PHASE_ERROR_BAND
- // );
- //
- // ini->WriteString( "Phase error table",
- // "PHASE_ERROR_ARFCN",
- // IntToStr(m_sPHASE_ERROR_ARFCN)
- // );
- //
- // ini->WriteString( "Phase error table",
- // "PHASE_ERROR_PCL",
- // IntToStr(i_PHASE_ERROR_PCL)
- // );
- //
- // ini->WriteString( "Phase error table",
- // "PHASE_ERROR_MEASUSE_COUNT",
- /// IntToStr(i_PHASE_ERROR_MEASUSE_COUNT)
- // );
- //
- // ini->WriteString( "Phase error table",
- // "PHASE_ERROR_RMS_ERROR",
- // Double_To_AnsiString(d_PHASE_ERROR_RMS_ERROR)
- // );
- //
- //
- // delete ini;
- //
- // return true;
- //}
- //---------------------------------------------------------------------
- bool TMETA_factory_cfg::SaveAdcToCfgFile(AnsiString as_filename)
- {
- TIniFile *ini;
- ini = new TIniFile( as_filename );
- if(ini == NULL) return false;
- ini->WriteString( "ADC table",
- "ADC_V1",
- IntToStr(i_ADC_V1)
- );
- ini->WriteString( "ADC table",
- "ADC_V2",
- IntToStr(i_ADC_V2)
- );
- ini->WriteString( "ADC table",
- "ADC_CHECK_VOLTAGE",
- IntToStr(i_ADC_CHECK_VOLTAGE)
- );
- ini->WriteString( "ADC table",
- "NORMAL_VOLTAGE",
- IntToStr(i_NORMAL_VOLTAGE)
- );
- ini->WriteString( "ADC table",
- "CURRENT_LIMIT",
- IntToStr(i_CURRENT_LIMIT)
- );
- ini->WriteString( "ADC table",
- "MAX_BATTERY_ADC_SLOPE",
- IntToStr(i_MAX_BATTERY_ADC_SLOPE)
- );
- ini->WriteString( "ADC table",
- "MIN_BATTERY_ADC_SLOPE",
- IntToStr(i_MIN_BATTERY_ADC_SLOPE)
- );
- ini->WriteString( "ADC table",
- "MAX_BATTERY_ADC_OFFSET",
- IntToStr(i_MAX_BATTERY_ADC_OFFSET)
- );
- ini->WriteString( "ADC table",
- "MIN_BATTERY_ADC_OFFSET",
- IntToStr(i_MIN_BATTERY_ADC_OFFSET)
- );
- ini->WriteString( "ADC table",
- "BATTERY_CHANNEL",
- IntToStr(i_BATTERY_CHANNEL)
- );
- ini->WriteString( "ADC table",
- "CHARGER_CHANNEL",
- IntToStr(i_CHARGER_CHANNEL)
- );
- ini->WriteString( "ADC table",
- "ADC_RESISTANCE",
- Double_To_AnsiString(d_ADC_RESISTANCE)
- );
- ini->WriteString( "ADC table",
- "MAX_VOLTAGE_DIFFERENCE",
- Double_To_AnsiString(d_MAX_VOLTAGE_DIFFERENCE)
- );
- ini->WriteString( "ADC table",
- "MAX_CURRENT_DIFFERENCE",
- Double_To_AnsiString(d_MAX_CURRENT_DIFFERENCE)
- );
- ini->WriteString( "ADC table",
- "ADC_MEASUREMENT_COUNT",
- IntToStr(i_ADC_MEASUREMENT_COUNT)
- );
- delete ini;
- return true;
- }
- //------------------------------------------------------------------------------
- bool TMETA_factory_cfg::SaveCrystalAfcToCfgFile(AnsiString as_filename)
- {
- TIniFile *ini;
- ini = new TIniFile( as_filename );
- if(ini == NULL) return false;
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_BAND",
- as_CRYSTAL_AFC_BAND
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_ARFCN",
- IntToStr(m_sCRYSTAL_AFC_ARFCN)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_TCH_P_DL",
- Double_To_AnsiString(d_CRYSTAL_AFC_TCH_P_DL)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_GSM850_PCL",
- IntToStr(i_CRYSTAL_AFC_GSM850_PCL)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_GSM900_PCL",
- IntToStr(i_CRYSTAL_AFC_GSM900_PCL)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_DCS1800_PCL",
- IntToStr(i_CRYSTAL_AFC_DCS1800_PCL)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_PCS1900_PCL",
- IntToStr(i_CRYSTAL_AFC_PCS1900_PCL)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_CAL_DAC",
- IntToStr(m_sCRYSTAL_AFC_CAL_DAC)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_CHECK_DAC1",
- IntToStr(m_sCRYSTAL_AFC_CHECK_DAC1)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_CHECK_DAC2",
- IntToStr(m_sCRYSTAL_AFC_CHECK_DAC2)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_MIN_FREQ_ERR_PPM",
- Double_To_AnsiString(d_CRYSTAL_AFC_MIN_FREQ_ERR_PPM)
- );
-
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_MAX_FREQ_ERR_PPM",
- Double_To_AnsiString(d_CRYSTAL_AFC_MAX_FREQ_ERR_PPM)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR",
- Double_To_AnsiString(m_dCRYSTAL_AFC_MAX_AFC_TRACK_INIT_FREQ_ERR)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_FREQ_ERR_MEASUSE_COUNT",
- IntToStr(m_sCRYSTAL_AFC_FREQ_ERR_MEASUSE_COUNT)
- );
- ini->WriteString( "Crystal AFC Calibration",
- "CRYSTAL_AFC_RECURSIVE_TIMES",
- IntToStr(m_sCRYSTAL_AFC_RECURSIVE_TIMES)
- );
- delete ini;
- return true;
- }
- //------------------------------------------------------------------------------
- bool TMETA_factory_cfg::SaveTxPclToCfgFile(AnsiString as_filename)
- {
- TIniFile *ini;
- ini = new TIniFile( as_filename );
- if(ini == NULL) return false;
- // GSM 400
- ini->WriteString( "TX PCL table",
- "GSM400_CAL_PCL",
- m_asGSM400_CAL_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM400_2CAL_PCL",
- m_asGSM400_2CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "GSM400_4CAL_PCL",
- m_asGSM400_4CAL_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM400_PCL",
- m_asGSM400_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM400_CHECK_PCL",
- m_asGSM400_CHECK_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM400_MAX_P",
- m_asGSM400_MAX_P
- );
- ini->WriteString( "TX PCL table",
- "GSM400_WANTED_P",
- m_asGSM400_WANTED_P
- );
- ini->WriteString( "TX PCL table",
- "GSM400_MIN_P",
- m_asGSM400_MIN_P
- );
- ini->WriteString( "TX PCL table",
- "GSM400_C",
- m_asGSM400_C
- );
- ini->WriteString( "TX PCL table",
- "GSM400_CORRECTION",
- m_asGSM400_CORRECTION
- );
- // GSM 850
- ini->WriteString( "TX PCL table",
- "GSM850_CAL_PCL",
- m_asGSM850_CAL_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM850_2CAL_PCL",
- m_asGSM850_2CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "GSM850_4CAL_PCL",
- m_asGSM850_4CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "GSM850_6CAL_PCL",
- m_asGSM850_6CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "GSM850_6CAL_DAC",
- m_asGSM850_6CAL_DAC
- );
- ini->WriteString( "TX PCL table",
- "GSM850_PCL",
- m_asGSM850_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM850_CHECK_PCL",
- m_asGSM850_CHECK_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM850_MAX_P",
- m_asGSM850_MAX_P
- );
- ini->WriteString( "TX PCL table",
- "GSM850_WANTED_P",
- m_asGSM850_WANTED_P
- );
- ini->WriteString( "TX PCL table",
- "GSM850_MIN_P",
- m_asGSM850_MIN_P
- );
- ini->WriteString( "TX PCL table",
- "GSM850_C",
- m_asGSM850_C
- );
- ini->WriteString( "TX PCL table",
- "GSM850_CORRECTION",
- m_asGSM850_CORRECTION
- );
- // GSM 900
- ini->WriteString( "TX PCL table",
- "GSM900_CAL_PCL",
- m_asGSM900_CAL_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM900_2CAL_PCL",
- m_asGSM900_2CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "GSM900_4CAL_PCL",
- m_asGSM900_4CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "GSM900_6CAL_PCL",
- m_asGSM900_6CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "GSM900_6CAL_DAC",
- m_asGSM900_6CAL_DAC
- );
- ini->WriteString( "TX PCL table",
- "GSM900_PCL",
- m_asGSM900_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM900_CHECK_PCL",
- m_asGSM900_CHECK_PCL
- );
- ini->WriteString( "TX PCL table",
- "GSM900_MAX_P",
- m_asGSM900_MAX_P
- );
- ini->WriteString( "TX PCL table",
- "GSM900_WANTED_P",
- m_asGSM900_WANTED_P
- );
- ini->WriteString( "TX PCL table",
- "GSM900_MIN_P",
- m_asGSM900_MIN_P
- );
- ini->WriteString( "TX PCL table",
- "GSM900_C",
- m_asGSM900_C
- );
- ini->WriteString( "TX PCL table",
- "GSM900_CORRECTION",
- m_asGSM900_CORRECTION
- );
- // DCS 1800
- ini->WriteString( "TX PCL table",
- "DCS1800_CAL_PCL",
- m_asDCS1800_CAL_PCL
- );
- ini->WriteString( "TX PCL table",
- "DCS1800_2CAL_PCL",
- m_asDCS1800_2CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "DCS1800_4CAL_PCL",
- m_asDCS1800_4CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "DCS1800_6CAL_PCL",
- m_asDCS1800_6CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "DCS1800_6CAL_DAC",
- m_asDCS1800_6CAL_DAC
- );
- ini->WriteString( "TX PCL table",
- "DCS1800_PCL",
- m_asDCS1800_PCL
- );
- ini->WriteString( "TX PCL table",
- "DCS1800_CHECK_PCL",
- m_asDCS1800_CHECK_PCL
- );
- ini->WriteString( "TX PCL table",
- "DCS1800_MAX_P",
- m_asDCS1800_MAX_P
- );
- ini->WriteString( "TX PCL table",
- "DCS1800_WANTED_P",
- m_asDCS1800_WANTED_P
- );
- ini->WriteString( "TX PCL table",
- "DCS1800_MIN_P",
- m_asDCS1800_MIN_P
- );
- ini->WriteString( "TX PCL table",
- "DCS1800_C",
- m_asDCS1800_C
- );
- ini->WriteString( "TX PCL table",
- "DCS1800_CORRECTION",
- m_asDCS1800_CORRECTION
- );
- // PCS 1900
- ini->WriteString( "TX PCL table",
- "PCS1900_CAL_PCL",
- m_asPCS1900_CAL_PCL
- );
- ini->WriteString( "TX PCL table",
- "PCS1900_2CAL_PCL",
- m_asPCS1900_2CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "PCS1900_4CAL_PCL",
- m_asPCS1900_4CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "PCS1900_6CAL_PCL",
- m_asPCS1900_6CAL_PCL
- );
- ini->WriteString("TX PCL table",
- "PCS1900_6CAL_DAC",
- m_asPCS1900_6CAL_DAC
- );
- ini->WriteString( "TX PCL table",
- "PCS1900_PCL",
- m_asPCS1900_PCL
- );
- ini->WriteString( "TX PCL table",
- "PCS1900_CHECK_PCL",
- m_asPCS1900_CHECK_PCL
- );
- ini->WriteString( "TX PCL table",
- "PCS1900_MAX_P",
- m_asPCS1900_MAX_P
- );
- ini->WriteString( "TX PCL table",
- "PCS1900_WANTED_P",
- m_asPCS1900_WANTED_P
- );
- ini->WriteString( "TX PCL table",
- "PCS1900_MIN_P",
- m_asPCS1900_MIN_P
- );
- ini->WriteString( "TX PCL table",
- "PCS1900_C",
- m_asPCS1900_C
- );
- ini->WriteString( "TX PCL table",
- "PCS1900_CORRECTION",
- m_asPCS1900_CORRECTION
- );
- ini->WriteString("TX PCL table",
- "MAX_APC_DAC",
- IntToStr(m_sMAX_APC_DAC)
- );
- ini->WriteString("TX PCL table",
- "TSC",
- IntToStr(m_cTSC)
- );
- ini->WriteString( "TX PCL table",
- "Recursive Times",
- IntToStr( m_iRecursiveTimes )
- );
- ini->WriteString( "TX PCL table",
- "APC Delta",
- Double_To_AnsiString( m_dAPC_Delta )
- );
- delete ini;
- return true;
- }
- //------------------------------------------------------------------------------
- bool TMETA_factory_cfg::is_MAX_WANTED_MIN_P_valid()
- {
- // PCL: GSM450,850,900 5~19 // total:15
- // PCL: DCS1800,PCS1900 0~15 // total:16
- AnsiString sub_max_p, sub_wanted_p, sub_min_p;
-
- ///////////////////////////////////////////////////////////////////////////
- if ( IsFreqBankSupported( as_FreqBank, FrequencyBand850))
- {
- for (int I=1; I<=15; I++)
- {
- if(! getAnsiStrSubItem( m_asGSM850_MAX_P, I,
- DEFAULT_SEP_CHAR, sub_max_p ))
- {
- Application->MessageBox( "Config file: Config file read GSM850_MAX_P fail.", "Fail", MB_OK );
- return false;
- }
- if(! getAnsiStrSubItem( m_asGSM850_MIN_P, I,
- DEFAULT_SEP_CHAR, sub_min_p ))
- {
- Application->MessageBox( "Config file: Config file read GSM850_MIN_P fail.", "Fail", MB_OK );
- return false;
- }
- if(! getAnsiStrSubItem( m_asGSM850_WANTED_P, I,
- DEFAULT_SEP_CHAR, sub_wanted_p ))
- {
- Application->MessageBox( "Config file: Config file read GSM850_WANTED_P fail.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_min_p.c_str()) > atof(sub_max_p.c_str()))
- {
- Application->MessageBox( "Config file: GSM850_MIN_P must <= GSM850_MAX_P.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_wanted_p.c_str()) > atof(sub_max_p.c_str()))
- {
- Application->MessageBox( "Config file: GSM850_WANTED_P must <= GSM850_MAX_P.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_wanted_p.c_str()) < atof(sub_min_p.c_str()))
- {
- Application->MessageBox( "Config file: GSM850_WANTED_P must >= GSM850_MIN_P.", "Fail", MB_OK );
- return false;
- }
- } // for
- } // if
- ////////////////////////////////////////////////////////////////////////////
- if ( IsFreqBankSupported( as_FreqBank, FrequencyBand900))
- {
- for (int I=1; I<=15; I++)
- {
- if(! getAnsiStrSubItem( m_asGSM900_MAX_P, I,
- DEFAULT_SEP_CHAR, sub_max_p ))
- {
- Application->MessageBox( "Config file read GSM900_MAX_P fail.", "Fail", MB_OK );
- return false;
- }
- if(! getAnsiStrSubItem( m_asGSM900_MIN_P, I,
- DEFAULT_SEP_CHAR, sub_min_p ))
- {
- Application->MessageBox( "Config file read GSM900_MIN_P fail.", "Fail", MB_OK );
- return false;
- }
- if(! getAnsiStrSubItem( m_asGSM900_WANTED_P, I,
- DEFAULT_SEP_CHAR, sub_wanted_p ))
- {
- Application->MessageBox( "Config file read GSM900_WANTED_P fail.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_min_p.c_str()) > atof(sub_max_p.c_str()))
- {
- Application->MessageBox( "Config file: GSM900_MIN_P must < GSM900_MAX_P.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_wanted_p.c_str()) > atof(sub_max_p.c_str()))
- {
- Application->MessageBox( "Config file: GSM900_WANTED_P must <= GSM900_MAX_P.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_wanted_p.c_str()) < atof(sub_min_p.c_str()))
- {
- Application->MessageBox( "Config file: GSM900_WANTED_P must >= GSM900_MIN_P.", "Fail", MB_OK );
- return false;
- }
- } // for
- } // if
- ////////////////////////////////////////////////////////////////////////////
- if ( IsFreqBankSupported( as_FreqBank, FrequencyBand1800))
- {
- for (int I=1; I<=16; I++)
- {
- if(! getAnsiStrSubItem( m_asDCS1800_MAX_P, I,
- DEFAULT_SEP_CHAR, sub_max_p ))
- {
- Application->MessageBox( "Config file read DCS1800_MAX_P fail.", "Fail", MB_OK );
- return false;
- }
- if(! getAnsiStrSubItem( m_asDCS1800_MIN_P, I,
- DEFAULT_SEP_CHAR, sub_min_p ))
- {
- Application->MessageBox( "Config file read DCS1800_MIN_P fail.", "Fail", MB_OK );
- return false;
- }
- if(! getAnsiStrSubItem( m_asDCS1800_WANTED_P, I,
- DEFAULT_SEP_CHAR, sub_wanted_p ))
- {
- Application->MessageBox( "Config file read DCS1800_WANTED_P fail.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_min_p.c_str()) > atof(sub_max_p.c_str()))
- {
- Application->MessageBox( "Config file: DCS1800_MIN_P must < DCS1800_MAX_P.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_wanted_p.c_str()) > atof(sub_max_p.c_str()))
- {
- Application->MessageBox( "Config file: DCS1800_WANTED_P must <= DCS1800_MAX_P.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_wanted_p.c_str()) < atof(sub_min_p.c_str()))
- {
- Application->MessageBox( "Config file: DCS1800_WANTED_P must >= DCS1800_MIN_P.", "Fail", MB_OK );
- return false;
- }
- } // for
- } // if
- ////////////////////////////////////////////////////////////////////////////
- if ( IsFreqBankSupported( as_FreqBank, FrequencyBand1900))
- {
- for (int I=1; I<=16; I++)
- {
- if(! getAnsiStrSubItem( m_asPCS1900_MAX_P, I,
- DEFAULT_SEP_CHAR, sub_max_p ))
- {
- Application->MessageBox( "Config file read PCS1900_MAX_P fail.", "Fail", MB_OK );
- return false;
- }
- if(! getAnsiStrSubItem( m_asPCS1900_MIN_P, I,
- DEFAULT_SEP_CHAR, sub_min_p ))
- {
- Application->MessageBox( "Config file read PCS1900_MIN_P fail.", "Fail", MB_OK );
- return false;
- }
- if(! getAnsiStrSubItem( m_asPCS1900_WANTED_P, I,
- DEFAULT_SEP_CHAR, sub_wanted_p ))
- {
- Application->MessageBox( "Config file read PCS1900_WANTED_P fail.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_min_p.c_str()) > atof(sub_max_p.c_str()))
- {
- Application->MessageBox( "Config file: PCS1900_MIN_P must < PCS1900_MAX_P.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_wanted_p.c_str()) > atof(sub_max_p.c_str()))
- {
- Application->MessageBox( "Config file: PCS1900_WANTED_P must <= PCS1900_MAX_P.", "Fail", MB_OK );
- return false;
- }
- if (atof(sub_wanted_p.c_str()) < atof(sub_min_p.c_str()))
- {
- Application->MessageBox( "Config file: PCS1900_WANTED_P must >= PCS1900_MIN_P.", "Fail", MB_OK );
- return false;
- }
- } // for
- } // if
- ////////////////////////////////////////////////////////////////////////////
- return true;
- }
- //------------------------------------------------------------------------------
- // added by Andy Ueng
- //------------------------------------------------------------------------------
- bool TMETA_factory_cfg::is_MAX_MIN_PX_PATH_LOSS_valid()
- {
- // PCL: GSM450,850,900 5~19 // total:15
- // PCL: DCS1800,PCS1900 0~15 // total:16
- AnsiString sub_max_rx_path_loss, sub_min_rx_path_loss;
-
- ///////////////////////////////////////////////////////////////////////////
- if ( IsFreqBankSupported( as_FreqBank, FrequencyBand850))
- {
- for (int I=1; I<PLTABLE_SIZE; I++)
- {
- if(! getAnsiStrSubItem( as_GSM850_MAX_RX_LOSS, I,
- DEFAULT_SEP_CHAR, sub_max_rx_path_loss ))
- {
- ShowMessage("Config file read GSM850_MAX_RX_LOSS fail.");
- return false;
- }
- if(! getAnsiStrSubItem( as_GSM850_MIN_RX_LOSS, I,
- DEFAULT_SEP_CHAR, sub_min_rx_path_loss ))
- {
- ShowMessage("Config file read GSM850_MIN_RX_LOSS fail.");
- return false;
- }
- if( sub_min_rx_path_loss != NULL && sub_max_rx_path_loss != NULL)
- {
- if (atof(sub_min_rx_path_loss.c_str()) > atof(sub_max_rx_path_loss.c_str()))
- {
- ShowMessage("Config file: GSM850_MIN_RX_LOSS must <= GSM850_MAX_RX_LOSS.");
- return false;
- }
- }
- } // for
- } // if
- ////////////////////////////////////////////////////////////////////////////
- if ( IsFreqBankSupported( as_FreqBank, FrequencyBand900))
- {
- for (int I=1; I<PLTABLE_SIZE; I++)
- {
- if(! getAnsiStrSubItem( as_GSM900_MAX_RX_LOSS, I,
- DEFAULT_SEP_CHAR, sub_max_rx_path_loss ))
- {
- ShowMessage("Config file read GSM900_MAX_RX_LOSS fail.");
- return false;
- }
- if(! getAnsiStrSubItem( as_GSM900_MIN_RX_LOSS, I,
- DEFAULT_SEP_CHAR, sub_min_rx_path_loss ))
- {
- ShowMessage("Config file read GSM900_MIN_RX_LOSS fail.");
- return false;
- }
- if( sub_min_rx_path_loss != NULL && sub_max_rx_path_loss != NULL)
- {
- if (atof(sub_min_rx_path_loss.c_str()) > atof(sub_max_rx_path_loss.c_str()))
- {
- ShowMessage("Config file: GSM900_MIN_RX_LOSS must < GSM900_MAX_RX_LOSS.");
- return false;
- }
- }
- } // for
- } // if
- ////////////////////////////////////////////////////////////////////////////
- if ( IsFreqBankSupported( as_FreqBank, FrequencyBand1800))
- {
- for (int I=1; I<PLTABLE_SIZE; I++)
- {
- if(! getAnsiStrSubItem( as_DCS1800_MAX_RX_LOSS, I,
- DEFAULT_SEP_CHAR, sub_max_rx_path_loss ))
- {
- ShowMessage("Config file read DCS1800_MAX_RX_LOSS fail.");
- return false;
- }
- if(! getAnsiStrSubItem( as_DCS1800_MIN_RX_LOSS, I,
- DEFAULT_SEP_CHAR, sub_min_rx_path_loss ))
- {
- ShowMessage("Config file read DCS1800_MIN_RX_LOSS fail.");
- return false;
- }
- if( sub_min_rx_path_loss != NULL && sub_max_rx_path_loss != NULL)
- {
- if (atof(sub_min_rx_path_loss.c_str()) > atof(sub_max_rx_path_loss.c_str()))
- {
- ShowMessage("Config file: DCS1800_MIN_RX_LOSS must < DCS1800_MAX_RX_LOSS.");
- return false;
- }
- }
- } // for
- } // if
- ////////////////////////////////////////////////////////////////////////////
- if ( IsFreqBankSupported( as_FreqBank, FrequencyBand1900))
- {
- for (int I=1; I<PLTABLE_SIZE; I++)
- {
- if(! getAnsiStrSubItem( as_PCS1900_MAX_RX_LOSS, I,
- DEFAULT_SEP_CHAR, sub_max_rx_path_loss ))
- {
- ShowMessage("Config file read PCS1900_MAX_RX_LOSS fail.");
- return false;
- }
- if(! getAnsiStrSubItem( as_PCS1900_MIN_RX_LOSS, I,
- DEFAULT_SEP_CHAR, sub_min_rx_path_loss ))
- {
- ShowMessage("Config file read PCS1900_MIN_RX_LOSS fail.");
- return false;
- }
- if (sub_min_rx_path_loss != NULL && sub_max_rx_path_loss != NULL)
- {
- if (atof(sub_min_rx_path_loss.c_str()) > atof(sub_max_rx_path_loss.c_str()))
- {
- ShowMessage("Config file: PCS1900_MIN_RX_LOSS must < PCS1900_MAX_RX_LOSS.");
- return false;
- }
- }
- } // for
- } // if
- ////////////////////////////////////////////////////////////////////////////
- return true;
- }
- //------------------------------------------------------------------------------
- //------------------------------------------------------------------------------
- int TMETA_factory_cfg::getTXCheckIndex(int band, AnsiString as_PCLString, AnsiString as_CheckPCL)
- {
- int i;
- AnsiString as_sub_PCL;
- int int_sub_PCL, int_CheckPCL;
- int CheckIndex = -1; // set initial value to not found
- int_CheckPCL = as_CheckPCL.ToInt();
- if ( band == GSM400_BAND || band == GSM850_BAND || band == GSM900_BAND )
- {
- for (i=1; i<=TOTAL_GSM_PCL_NUM; i++)
- {
- getAnsiStrSubItem( as_PCLString, i, DEFAULT_SEP_CHAR, as_sub_PCL );
- int_sub_PCL = as_sub_PCL.ToInt();
- if ( int_sub_PCL == int_CheckPCL )
- {
- CheckIndex = i;
- break;
- }
- }
- }
- else // DCS, PCS
- {
- for (i=1; i<=TOTAL_DCS_PCL_NUM; i++)
- {
- getAnsiStrSubItem( as_PCLString, i, DEFAULT_SEP_CHAR, as_sub_PCL );
- int_sub_PCL = as_sub_PCL.ToInt();
- if ( int_sub_PCL == int_CheckPCL )
- {
- CheckIndex = i;
- break;
- }
- }
- }
- return CheckIndex;
- }