form_InterSlotRampSetting.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:11k
源码类别:
MTK
开发平台:
C++ Builder
- /*****************************************************************************
- * 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_InterSlotRampSetting.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * Inter slot ramp setting form 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_INTERSLOTRAMPSETTING_H_
- #define _FORM_INTERSLOTRAMPSETTING_H_
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <ComCtrls.hpp>
- #include <ExtCtrls.hpp>
- #include <Dialogs.hpp>
- #include <Buttons.hpp>
- #ifndef _RF_MULTISLOTTX_H_
- #include "rf_multislottx.h"
- #endif
- #ifndef _RF_INTERSLOTRAMPPROFILE_H_
- #include "rf_InterSlotRampProfile.h"
- #endif
- #ifndef META_DLL_H
- #include "meta.h"
- #endif
- //---------------------------------------------------------------------------
- #define PLOT_INTER_RAMP_GRID 0x01
- #define PLOT_INTER_RAMP_PROFILE_CURVE 0x02
- #define INTER_RAMP_VSCALE_UNIT 5
- #define INTER_RAMP_VERTICAL_LABEL_NUM 10
- #define MAX_INTER_RAMP_DATA_VALUE 255
- #define INTER_RAMP_SAMPLE_NUM 16
- #define INTER_RAMP_CIRCLE_RADIOUS 6
- #define DRAW_INTER_RAMP 0x02
- #define PLOT_INTER_RAMP_GRID 0x01
- #define PLOT_INTER_RAMP_PROFILE_CURVE 0x02
- //---------------------------------------------------------------------------
- typedef struct
- {
- int x[INTER_RAMP_SAMPLE_NUM];
- int y[INTER_RAMP_SAMPLE_NUM];
- }sInterRampPoint;
- //---------------------------------------------------------------------------
- class TfrmInterSlotRampSetting : public TForm
- {
- __published: // IDE-managed Components
- TTabControl *tclInterSlotRampSetting;
- TPanel *Panel1;
- TEdit *edtInterRamp00;
- TEdit *edtInterRamp01;
- TEdit *edtInterRamp02;
- TEdit *edtInterRamp03;
- TEdit *edtInterRamp04;
- TEdit *edtInterRamp05;
- TEdit *edtInterRamp06;
- TEdit *edtInterRamp07;
- TEdit *edtInterRamp08;
- TEdit *edtInterRamp09;
- TEdit *edtInterRamp10;
- TEdit *edtInterRamp11;
- TEdit *edtInterRamp12;
- TEdit *edtInterRamp13;
- TEdit *edtInterRamp14;
- TEdit *edtInterRamp15;
- TButton *btnLeft;
- TButton *btnRight;
- TLabel *Label1;
- TOpenDialog *OpenDialog;
- TSaveDialog *SaveDialog;
- TStaticText *lblHint;
- TTimer *HintTimer;
- TStatusBar *sbISR;
- TLabel *Label2;
- TLabel *Label3;
- TLabel *Label4;
- TLabel *Label5;
- TLabel *Label6;
- TLabel *Label7;
- TLabel *Label8;
- TLabel *Label9;
- TLabel *Label10;
- TLabel *Label11;
- TLabel *Label12;
- TLabel *Label13;
- TLabel *Label14;
- TLabel *Label15;
- TLabel *Label16;
- TLabel *Label17;
- TImage *imRampProfile;
- TLabel *lblVertical1;
- TLabel *lblRampH0;
- TLabel *lblRampH1;
- TLabel *lblRampH2;
- TLabel *lblRampH3;
- TLabel *lblRampH4;
- TLabel *lblRampH5;
- TLabel *lblRampH6;
- TLabel *lblRampH7;
- TLabel *lblRampH8;
- TLabel *lblRampH9;
- TLabel *lblRampH10;
- TLabel *lblRampH11;
- TLabel *lblRampH12;
- TLabel *lblRampH13;
- TLabel *lblRampH14;
- TLabel *lblRampH15;
- TLabel *lblVertical0;
- TLabel *lblVertical2;
- TLabel *lblVertical3;
- TLabel *lblVertical4;
- TLabel *lblVertical6;
- TLabel *lblVertical7;
- TLabel *lblVertical9;
- TLabel *lblVertical8;
- TLabel *lblVertical5;
- TButton *btnUploadFromFlash;
- TButton *btnDownloadToFlash;
- TButton *btnChangeDB;
- TButton *btnLoadFromFile;
- TButton *btnSaveToFile;
- TBitBtn *btnTXStart;
- TBitBtn *btnTXStop;
- TLabel *lblTestArfcn;
- TEdit *edtTestArfcn;
- void __fastcall btnLoadFromFileClick(TObject *Sender);
- void __fastcall btnSaveToFileClick(TObject *Sender);
- void __fastcall FormShow(TObject *Sender);
- void __fastcall tclInterSlotRampSettingChange(TObject *Sender);
- void __fastcall edtInterRampCheck(TObject *Sender);
- void __fastcall HintTimerTimer(TObject *Sender);
- void __fastcall btnRightClick(TObject *Sender);
- void __fastcall btnLeftClick(TObject *Sender);
- void __fastcall btnDownloadToFlashClick(TObject *Sender);
- void __fastcall btnUploadFromFlashClick(TObject *Sender);
- void __fastcall btnChangeDBClick(TObject *Sender);
- void __fastcall FormCreate(TObject *Sender);
- void __fastcall imRampProfileDragOver(TObject *Sender,
- TObject *Source, int X, int Y, TDragState State, bool &Accept);
- void __fastcall imRampProfileEndDrag(TObject *Sender,
- TObject *Target, int X, int Y);
- void __fastcall btnTXStartClick(TObject *Sender);
- void __fastcall btnTXStopClick(TObject *Sender);
- void __fastcall edtTestArfcnCheck(TObject *Sender);
- void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
- void __fastcall FormActivate(TObject *Sender);
- private: // User declarations
- bool m_bInit;
- bool m_bMultiSlotTxExSupport;
- CRFINTERSLOTRAMP RF_INTER_SLOT_RAMP_Obj;
- l1cal_interRampData_T Inter_RamTable[MAX_SUPPORT_BAND_NUM];
- l1cal_interRampData_T OldInter_RamTable[MAX_SUPPORT_BAND_NUM];
- short m_sTestArfcn[MAX_SUPPORT_BAND_NUM]; // GSM900, DCS1800, PCS1900, GSM 850
- int Tsc;
- short m_sAfcDac;
- int BurstType;
- E_BANDSEL m_eCurBand;
- char TimeSlotMask;
- int TA;
- int CS[4];
- int PCL[4];
- int Pattern;
- unsigned short Pattern_data;
- bool isEDGEsupport;
- int lastTabIndex;
- TEdit *edtInterRamp[INTER_RAMP_SAMPLE_NUM];
- CRFMULTISLOTTX *RF_MULTI_SLOT_TX_Obj;
- // image
- int max_y_grid, min_y_grid;
- int vStart, hStart, vScale, hScale, vDistance, hDistance, Segments;
- TLabel *lblVertical[INTER_RAMP_VERTICAL_LABEL_NUM];
- TLabel *lblRampH[INTER_RAMP_SAMPLE_NUM];
- sInterRampPoint InterRampPoint;
- bool isInterRampCircleOnDrag;
- bool isDragTrigger;
- int RampCircleOnDragIndex;
- public: // User declarations
- __fastcall TfrmInterSlotRampSetting(TComponent* Owner);
- void Init(void);
- // UI
- void ShowHintLabel( TControl *sender, char* hint );
- void ReDrawFields( int draw_mask );
- bool CheckFields( void );
- void DownloadToFlashDone( void );
- void UploadFromFlashDone( void );
- bool InterRampDataChange(l1cal_interRampData_T *p_Inter_RamTable1, l1cal_interRampData_T *p_Inter_RamTable2);
- void Set_RF_MULTI_SLOT_TX_Obj( CRFMULTISLOTTX *rf_multi_slot_tx_obj);
- // callback
- void ConfirmCallback_MultiSlotTX( void );
- // UI
- void CurrentPageLock( void );
- void CurrentPageReset( void );
- // image
- void ClearImage( void );
- void PlotCurve( int plot_mask );
- void PlotGrid(int min_x, int max_x, int min_y, int max_y);
- void PlotRampProfileCurve( void );
- void PlotRampProfileCircle( void );
- int ImageRangeCheck( int X, int Y );
- void UpdateInterRampdata( int idx );
- void getImageValidRange( sRfImageRange *p_ImageRange );
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TfrmInterSlotRampSetting *frmInterSlotRampSetting;
- //---------------------------------------------------------------------------
- #endif