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

📄 mainfrm.h

📁 一个amccs5933芯片的驱动程序开发源程序和部分文档
💻 H
字号:
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__FFF74729_642C_11D2_841A_006097982599__INCLUDED_)
#define AFX_MAINFRM_H__FFF74729_642C_11D2_841A_006097982599__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000


#include <sys/timeb.h>

#define DMAsizeMIN      4
#define DMAsizeMAX      0x4000

enum Status {OK, OPENEDok, BAD};

enum RunningState	{	TRANSITIONING,	// Used to transition between tests
						RUNNING,		// A test is running (a steady state)
						IDLE			// A test is idle	 (a steady state)
					};

enum MainMode {AUTOMATIC, MANUAL};


typedef struct tagPROPERTIES
{
	int  n3041ComemID;
	int  n3042ComemID;

	enum Status e3041Status;
	enum Status e3042Status;
    enum Status e860Status;

	enum MainMode eMainMode;        // Automatic or manual

	int  nTestNum;                  // The test number radio button currently pressed.

    int  nEtoEto3042;               // End to end checkboxes checked?
    int  nEtoEfrom3042;

	enum RunningState eTestRunning;

    int  nPktSz;        // DMA length (bytes)
    int  nDMAszButton;  // The DMA size radio button currently pressed.

    int  nSlider1;      // Values of the sliders restored when the dialog is displayed again.
    int  nSlider2;   

	int	 nCount3042;	// Used to count the number of 3042 DMAs we complete.

} PROPERTIES, * PPROPERTIES;



class CPath
{
private:
#define   MAX_POINTS  50
	CPoint		m_point[MAX_POINTS];		// Up to 50 points in a path.

	// CPoint		m_curPt;
	int			m_curIx;
	int			m_lastIx;			// Ix of the last valid point in the path.  First Ix is zero.

public:
	void initPath (int path);				// Must be called for each path at the beginning of the program

	int getLastIx (void);

	CPoint getFirstPoint(void);		// Either getFirstPoint or getLastPoint must be called before 
	CPoint getLastPoint (void);		//    getNextPoint or getPrevPoint when starting to use a path.	

	CPoint getNextPoint (void);
	CPoint getPrevPoint (void);
};



class CMainFrame : public CFrameWnd
{
	friend void CDialogSelectTest::PostNcDestroy ();

protected: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)

// Attributes
private:
    // BOOL			m_bDrawOpaque;
    // CPalette		m_palette;
    // CMaskedBitmap	m_bitmap;

	CFont			m_font1;
	int				m_cxChar1;
    int				m_cyChar1;

    CFont			m_font2;
	int				m_cxChar2;
    int				m_cyChar2;


	CDC				m_saveDC;

	int				m_penSize;

	// int				m_index;
	CPoint			m_currentPt;	// Little used now that we have CPath.
	
	CPath			m_path[2];
	enum dataDirection {toSysMem, fromSysMem};
	enum dataDirection	m_direction;
	int					m_curpath;

	long			m_lasttime;
	double			m_lastfloattime;

	// long	m_time;
	double			m_floattime;
		
	struct _timeb	m_tstruct;

	int				m_lastInnerPasses;

	unsigned long	m_timerTicks;
	BOOL			m_bChangeSecondPassed;		// When in AUTOMATIC mode, are we in the Change Second.

//	int				m_testNum;

	void setPathAndDirection (int newTestNum);
	void display_bandwidth (double bw, int DMAsize, CClientDC &dc);

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif


	CDialogSelectTest*	pDialogSelectTest;


protected:  // control bar embedded members
	CStatusBar  m_wndStatusBar;

// Generated message map functions
protected:
	//{{AFX_MSG(CMainFrame)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnTestsSelecttests();
    afx_msg LONG OnWM_User (UINT, LONG);
    afx_msg void OnTimer (UINT);
//    afx_msg void OnPaint ();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINFRM_H__FFF74729_642C_11D2_841A_006097982599__INCLUDED_)

⌨️ 快捷键说明

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