www.pudn.com > pCom.rar > RadioTestDlg.h
// RadioTestDlg.h : 头文件
//
#pragma once
#include "E:\MyDesign\pCom\pCom\Rctrl\RadioCtrl.h"
#include "E:\MyDesign\pCom\pCom\pCom\pCom.h"
#include "afxwin.h"
#include "afxcmn.h"
#include "XListCtrl.h"
#include "afxext.h"
#include "e:\mydesign\pcom\gpibequipctrl\commandmeter.h"
#include "afxmt.h"
#include "afxdb.h"
#include "E:\Mydesign\pCom\TestItemLoad\TestItem.h"
#pragma comment (lib,"E:\\Mydesign\\pCom\\TestItemLoad\\Debug\\TestItemLoad.lib")
#pragma comment(lib,"E:\\MyDesign\\pCom\\pCom\\pCom\\Debug\\pCom.lib")
#pragma comment(lib,"debug\\Rctrl.lib")
#define EXECUTE_CMD (WM_USER+201)
#define END_CMD (WM_USER+202)
#define RUN_TEST (WM_USER+203)
#define WM_RADIOALERT (WM_USER+301)
struct CmdMessage{
BYTE* cmdStr;
ULONG cmdLen;
BYTE* returnStr;
ULONG returnLen;
};
// CRadioTestDlg 对话框
class CRadioTestDlg : public CDialog
{
// 构造
public:
CRadioTestDlg(CWnd* pParent = NULL); // 标准构造函数
// 对话框数据
enum { IDD = IDD_RADIOTEST_DIALOG };
enum STATUS
{
RUN=0,
PAUSE=1,
ABORT=2
};
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
HICON m_hIcon;
// 生成的消息映射函数
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg BOOL OnDeviceChange(UINT nEventType, DWORD dwData);
DECLARE_MESSAGE_MAP()
public:
RadioCtrl pRadioCtrl;
CStatic mFlag;
protected:
HICON flagIcon[4];
private:
BOOL DeviceArrival(void);
BOOL DeviceRemoveComplete(void);
public:
// //Display the test results and all test items dynamically
XListCtrl listResult;
afx_msg void OnBnClickedBtnreadsn();
CString m_Sn;
CRITICAL_SECTION busCritical;
CString mSW;
afx_msg void OnBnClickedBtnreadsw();
afx_msg void OnBnClickedBtn1();
afx_msg void OnBnClickedBtn2();
afx_msg void OnBnClickedBtn3();
afx_msg void OnBnClickedBtn4();
afx_msg void OnBnClickedBtn5();
afx_msg void OnBnClickedBtn6();
afx_msg void OnBnClickedBtn7();
afx_msg void OnBnClickedBtn8();
afx_msg void OnBnClickedBtn9();
afx_msg void OnBnClickedBtn0();
afx_msg void OnBnClickedBtna();
afx_msg void OnBnClickedBtnb();
afx_msg void OnBnClickedBtn11();
afx_msg void OnBnClickedBtnb12();
afx_msg void OnBnClickedBtnsuspend();
afx_msg void OnBnClickedBtnnormal();
CString m_IMEI;
CString m_KeyStateDisp;
afx_msg void OnBnClickedBtnkeytest();
afx_msg void OnTimer(UINT nIDEvent);
CWinThread* workThread;
protected:
afx_msg LRESULT OnExecuteCmd(WPARAM wParam, LPARAM lParam);
public:
afx_msg LRESULT OnEndCmd(WPARAM wParam, LPARAM lParam);
afx_msg void OnClose();
CStatusBar statusBar;
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
CString m_Status;
CEdit m_Result;
afx_msg void OnBnClickedBtnend();
CRITICAL_SECTION keyTestCritical;
int TimeCount;
CommandMeter *CommandMeterX;
afx_msg LRESULT OnRunTest(WPARAM wParam, LPARAM lParam);
static UINT TestThread(LPVOID pParam);
CCriticalSection stopsection;
~CRadioTestDlg(void);
int DoTestDCS(int Channel, int Level);
int DoTestGSM(int Channel, int Level);
CEvent event;
STATUS status;
afx_msg void OnBnClickedBtnstarttest();
afx_msg LRESULT RadioAlert(WPARAM wParam, LPARAM lParam);
DWORD currentCount;
CString m_PassFailFlag;
int DoTestGSMMODORFS(int channel, int level);
int DoTestDCSMODORFS(int channel, int level);
int DoTestGSMTimeMask(int channel, int level);
int DoTestDCSTimeMask(int channel, int level);
int DoTestDCSSwitORFS(int channel, int level);
int DoTestGSMSwitORFS(int channel, int level);
bool CreateStatusBar(void);
};