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

📄 sl_plcview.h

📁 一个不错的PLC通讯程序,可以方便地实现远程监控,现场总线监控.
💻 H
字号:
// SL_PLCView.h : interface of the CSL_PLCView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SL_PLCVIEW_H__85F4CBEA_C6C7_4E69_9D5D_D2EFA1544B6E__INCLUDED_)
#define AFX_SL_PLCVIEW_H__85F4CBEA_C6C7_4E69_9D5D_D2EFA1544B6E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "PictureEx.h"
#include"MSComm.h"

class CSL_PLCView : public CFormView
{
protected: // create from serialization only
	CSL_PLCView();
	DECLARE_DYNCREATE(CSL_PLCView)

public:
	//{{AFX_DATA(CSL_PLCView)
	enum { IDD = IDD_SL_PLC_FORM };
	CPictureEx	m_ctrGear1;
	//}}AFX_DATA
public:
	CMSComm m_com;
	BYTE	m_data[2];
	BOOL    m_bCreated;
	

// Attributes
public:
	CSL_PLCDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSL_PLCView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	char HexChar(char c);
	void ForceOffOperation(char * OFF_Address);
	void ForceOnOperation(char * ON_Address);
	void SendForWritePLC();
	void SendForReadPLC();
	void ReadFromPLC();
	void InitComm(int port);
	virtual ~CSL_PLCView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CSL_PLCView)
	afx_msg void OnStart();
	afx_msg void OnReadPlc();
	afx_msg void OnWritePlc();
	afx_msg void OnCloseCom();
	afx_msg void OnOn();
	afx_msg void OnOff();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

//	DECLARE_EVENTSINK_MAP()
};

#ifndef _DEBUG  // debug version in SL_PLCView.cpp
inline CSL_PLCDoc* CSL_PLCView::GetDocument()
   { return (CSL_PLCDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_SL_PLCVIEW_H__85F4CBEA_C6C7_4E69_9D5D_D2EFA1544B6E__INCLUDED_)

⌨️ 快捷键说明

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