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

📄 checkstate.h

📁 使用vc++技术实现光电机串口通信管理程序
💻 H
字号:
//{{AFX_INCLUDES()
#include "SerialPort.h"
//}}AFX_INCLUDES
#if !defined(AFX_CHECKSTATE_H__0B7EACD1_F4AF_483C_A63E_04BDDFF83E05__INCLUDED_)
#define AFX_CHECKSTATE_H__0B7EACD1_F4AF_483C_A63E_04BDDFF83E05__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CheckState.h : header file
//
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
// CCheckState dialog

class CCheckState : public CDialog
{
// Construction
public:
	CCheckState(CWnd* pParent = NULL);   // standard constructor
	static CString strRecive;//从串口接收的内容;
	static int iState;//当前状态0:空闲;1:发送;2:接收;
	CString strSent;//从别的窗口接收到的发送内容;
	static int iTime;
//	int Opencom(short shcom,CStringArray staDev);
//	bool Opencom(short shcom);
	int Sent(CString strTempSent);
	static CString strColorbefore;
	CString strColor;
	void doCheck();
	void checkmod();
	void ReadConfigStaName(CStringArray &staName);
	void ReadConfigDevID(int iIndxSta,CStringArray &staDevID,int &iCntDev);
	CString strLogSection;
	bool OnButtonOpenport(UINT uiCom);
	int Str2Hex(CString str, char* data);
	char HexChar(char c);
	void XstrtoBin(CString str,CString &strBin);
	CSerialPort m_Port;
	CString m_strRXData;
	static CString strPath;
	int iCntError;
	void OneCyle();
	void OnAutoCheck();
	void OnAutoStop();
	static bool bAuto; 
	int iIDidx;//要检测的设备的ID索引号
	int iCntID;//设备总数;
	CString staAdd;//要检测的设备的ID号;
	static CString strGetSection;
	int idelay;//发送后延时多长时间取结果;
	CString strFileName;
	
// Dialog Data
	//{{AFX_DATA(CCheckState)
	enum { IDD = IDD_DLG_CHECK };
	CSerialPort	m_ctrlComm;
//	short	m_iCom;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCheckState)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CCheckState)
	afx_msg LONG OnCommunication(WPARAM ch,LPARAM port);
	afx_msg void OnTimer(UINT nIDEvent);
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	virtual void OnCancel();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHECKSTATE_H__0B7EACD1_F4AF_483C_A63E_04BDDFF83E05__INCLUDED_)

⌨️ 快捷键说明

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