⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 measure.h

📁 这是一个手机校准程序
💻 H
字号:
// measure.h
// Copyright Mobilink Telecom, Inc. 1999, 2000
//
// Nick Steffen
// May 21, 2000
//
// June 27, 2000
// Added cable_loss
//
// August 7, 2000
// Added VISA capability
//
// September 9, 2000
// Added GetGpibHandle()
//
// September 20, 2000
// Added version of GetTxPower() that has variable search direction
//

#include "caltypes.h"
#include "decl-32.h"
#include "c:\vxipnp\winNT\include\visa.h"


// To use VISA drivers, define VISA as TRUE
// Link with the correct VISA driver library (visa32.lib) 
// the usual location seems to be c:/vxipnp/win95/lib
#define   VISA    TRUE

#define		MAX_8922_LOOP_COUNT		20
#define		HP_ERROR_CODE	(-1)
#define   IBDEV_ERROR   (-1)

struct limit_msmnt
  {
  float time;             // time to make measurement
  float power;            // power limit;
  unsigned llimit;        // non-zero if power is a lower limit
  unsigned ulimit;        // non-zero if power is an upper limit
  unsigned passed;        // non-zero if lower limit not exceeded
  };

class measure
  {
  TesterType_t  tester_type;
  Int8          GpibAdd;
  Int16         IdHP8922;
  Int16         IdCM200_BASE;
  Int16         IdCM200_GSM900_NS;
  Int16         IdCM200_GSM1800_NS;
  Int16         IdCM200_GSM1900_NS;
  Int16         IdCM200_RF_NS;  //weidg 
  UInt16        channel;
  BandIndex_t   band;
  
  char          log_filename[1024];
  BOOL          logging;
  float         cable_loss;
// added 8/7/00 for VISA implementation
  ViSession     session;
  ViSession     vi_instr;



  public:
    ViSession GetVISASession();
    ViSession GetVISAInstrument();
    void SetLogFilename(char *filename);
    void LogGPIB(char *buf);
    void EnableLogging(BOOL enable);
    TesterType_t GetTesterType();
    BOOL SetTesterType(TesterType_t tester_type);
    BOOL SetGpibAdd(Int8 addr);
    BOOL SetChannel(UInt16 ch);
    BOOL SetBand(BandIndex_t band);
    BOOL Connect();
	BOOL Cmu_band_connect();        
	BOOL Cmu_band_abort(); 
    BOOL Disconnect(); 
    BOOL SetupInstrument();
    BOOL GetFreqOffset(float *offset);
    BOOL GetPhaseError(float *error);
    BOOL GetTxPower(double expected_power,float *tx_power);
    BOOL GetTxPower(double expected_power,float *tx_power,unsigned search_down);
    BOOL GetTxPowerDown(double expected_power,float *tx_power);
    BOOL SetRxPower(float rx_power);
    BOOL GetRampStatus(unsigned init,unsigned *stat);
    BOOL GetUpperRampStatus(unsigned init,float power,unsigned num_pts,struct limit_msmnt m[]);
    BOOL SetCableLoss(float loss);
    BOOL GetCableLoss(float *loss);
	float C_parse(char *str, int nIndex);

  private:
    void GpibWrt(Int8 *cmd);
    void GpibWrt(Int16 handle,Int8 *cmd);
    void GpibRd(Int8 *buf);
    void GpibRdArr(Int8 *buf);
    void GpibClear(Int16 handle);
  };

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -