form_CFGCommon.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:8k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * form_CFGcommon.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * common CFG file header
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- //---------------------------------------------------------------------------
- #ifndef form_CFGCommonH
- #define form_CFGCommonH
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <ExtCtrls.hpp>
- #include <ComCtrls.hpp>
- #include <Dialogs.hpp>
- #include "META_factory_cfg.h"
- #define AGILENT_8960_CL 0
- #define CMU_200_INPUT_CL 1
- #define CMU_200_OUTPUT_CL 2
- #define FREQUENCY_BANK_GSM_400 0x01
- #define FREQUENCY_BANK_GSM_850 0x02
- #define FREQUENCY_BANK_GSM_900 0x04
- #define FREQUENCY_BANK_DCS_1800 0x08
- #define FREQUENCY_BANK_PCS_1900 0x10
-
- //---------------------------------------------------------------------------
- class TfrmCFGCommon : public TForm
- {
- __published: // IDE-managed Components
- TPanel *Panel3;
- TPanel *Panel1;
- TLabel *Label1;
- TEdit *edt8960GPIBAddress;
- TLabel *Label2;
- TEdit *edtTimeOut8960;
- TLabel *Label3;
- TEdit *edtGSM400CableLoss;
- TLabel *Label4;
- TEdit *edtGSM850CableLoss;
- TLabel *Label5;
- TEdit *edtGSM900CableLoss;
- TLabel *Label6;
- TEdit *edtDCS1800CableLoss;
- TLabel *Label7;
- TEdit *edtPCS1900CableLoss;
- TPanel *Panel2;
- TPanel *Panel4;
- TLabel *Label8;
- TEdit *edtCMU200GPIBAddress;
- TLabel *Label9;
- TEdit *edtTimeOutCMU200;
- TLabel *Label10;
- TEdit *edtGSM400InputCableLoss;
- TLabel *Label11;
- TEdit *edtGSM850InputCableLoss;
- TLabel *Label12;
- TEdit *edtGSM900InputCableLoss;
- TLabel *Label13;
- TEdit *edtDCS1800InputCableLoss;
- TLabel *Label14;
- TEdit *edtPCS1900InputCableLoss;
- TLabel *Label15;
- TEdit *edtGSM400OutputCableLoss;
- TLabel *Label16;
- TEdit *edtGSM850OutputCableLoss;
- TLabel *Label17;
- TEdit *edtGSM900OutputCableLoss;
- TLabel *Label18;
- TEdit *edtDCS1800OutputCableLoss;
- TLabel *Label19;
- TEdit *edtPCS1900OutputCableLoss;
- TPanel *Panel5;
- TPanel *Panel6;
- TCheckBox *cbGSM400;
- TCheckBox *cbGSM850;
- TCheckBox *cbGSM900;
- TCheckBox *cbDCS1800;
- TCheckBox *cbPCS1900;
- TPanel *Panel7;
- TPanel *Panel8;
- TLabel *Label20;
- TEdit *edtArfcn_C0_GSM400;
- TLabel *Label21;
- TEdit *edtArfcn_C0_GSM850;
- TLabel *Label22;
- TEdit *edtArfcn_C0_GSM;
- TLabel *Label23;
- TEdit *edtArfcn_C0_DCS;
- TLabel *Label24;
- TEdit *edtArfcn_C0_PCS;
- TPanel *Panel9;
- TPanel *Panel10;
- TLabel *Label25;
- TEdit *edtP_DL;
- TButton *btnLoadFromCFGFile;
- TButton *btnSaveToCFGFile;
- TOpenDialog *OpenDlg;
- TSaveDialog *SaveDlg;
- TTimer *HintTimer;
- TStaticText *lblHint;
- TStatusBar *sbCFGCommon;
- void __fastcall edtGPIBAddressCheck(TObject *Sender);
- void __fastcall edtTimeOutCheck(TObject *Sender);
- void __fastcall edtCableLossCheck(TObject *Sender);
- void __fastcall edtInputCableLossCheck(TObject *Sender);
- void __fastcall edtOutputCableLossCheck(TObject *Sender);
- void __fastcall edtARFCNCheck(TObject *Sender);
- void __fastcall edtP_DLCheck(TObject *Sender);
- void __fastcall HintTimerTimer(TObject *Sender);
- void __fastcall btnSaveToCFGFileClick(TObject *Sender);
- void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
- void __fastcall btnLoadFromCFGFileClick(TObject *Sender);
- void __fastcall FormShow(TObject *Sender);
- private: // User declarations
- TMETA_factory_cfg *cfg;
- int i_8960_GPIB_Addr;
- int i_CMU200_GPIB_Addr;
- int i_GPIB_Addr[2];
- int i_8960_TimeOut;
- int i_CMU200_TimeOut;
- int i_TimeOut[2];
- // dB cable loss
- double d_GSM400_CL, d_GSM850_CL, d_GSM900_CL, d_DCS1800_CL, d_PCS1900_CL;
- double d_CMU200_INPUT_GSM400_CL, d_CMU200_INPUT_GSM850_CL, d_CMU200_INPUT_GSM900_CL, d_CMU200_INPUT_DCS1800_CL, d_CMU200_INPUT_PCS1900_CL;
- double d_CMU200_OUTPUT_GSM400_CL, d_CMU200_OUTPUT_GSM850_CL, d_CMU200_OUTPUT_GSM900_CL, d_CMU200_OUTPUT_DCS1800_CL, d_CMU200_OUTPUT_PCS1900_CL;
- double d_CL[3][5];
- // Freq Bank
- int i_FreqBank;
-
- // C0 for each Bank
- short m_sARFCN_C0_GSM400;
- short m_sARFCN_C0_GSM850;
- short m_sARFCN_C0_GSM;
- short m_sARFCN_C0_DCS;
- short m_sARFCN_C0_PCS;
- short m_sARFCN_C0[5];
- // Downlink power
- double d_P_DL;
- public: // User declarations
- __fastcall TfrmCFGCommon(TComponent* Owner);
- void ShowHintLabel( TControl *sender, char* hint );
- bool CheckFields( void );
- void setFrequencyBank( void );
- void DisplayFreqBank( int i_FreqBank );
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TfrmCFGCommon *frmCFGCommon;
- //---------------------------------------------------------------------------
- #endif