From 468a5415022b3fec6c874f4ff690041a5fe2c195 Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期四, 28 十一月 2024 13:59:38 +0800
Subject: [PATCH] 1.IO模块读写PLC数据

---
 SourceCode/Bond/BondEq/View/IOMonitoringDlg.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/BondEq/View/IOMonitoringDlg.h b/SourceCode/Bond/BondEq/View/IOMonitoringDlg.h
index c8addf7..6f173fe 100644
--- a/SourceCode/Bond/BondEq/View/IOMonitoringDlg.h
+++ b/SourceCode/Bond/BondEq/View/IOMonitoringDlg.h
@@ -2,6 +2,7 @@
 #include "afxdialogex.h"
 #include "IOManager.h"
 #include "BLLabel.h"
+#include "CPLC.h"
 
 
 // CIOMonitoringDlg 瀵硅瘽妗�
@@ -14,6 +15,7 @@
 	CIOMonitoringDlg(CWnd* pParent = nullptr);   // 鏍囧噯鏋勯�犲嚱鏁�
 	virtual ~CIOMonitoringDlg();
 	void SetIOManager(const std::string& machineName); // 璁剧疆 IOManager 鍜屾満鍣ㄥ悕
+	void SetPLC(CPLC* pPLC); // 璁剧疆 PLC
 
 // 瀵硅瘽妗嗘暟鎹�
 #ifdef AFX_DESIGN_TIME
@@ -31,9 +33,11 @@
 	void CreateStaticControl(int x, int y, int width, int height, const CString& text, bool hasBorder = false, TextAlign alignment = AlignLeft, std::function<void()> clickCallback = nullptr); // 鍒涘缓闈欐�佹帶浠�
 	void DisplayCurrentPage();		// 鏄剧ず褰撳墠椤垫暟鎹�
 	void ClearDynamicControls();	// 娓呴櫎鍔ㄦ�佸垱寤虹殑鎺т欢
+	bool ParsePLCAddress(const CString& address, MC::SOFT_COMPONENT& component, int& addr); // 瑙f瀽 PLC 鍦板潃
 	void UpdatePLCStates();			// 瀹氭椂鍣ㄦ洿鏂扮姸鎬佺殑鏂规硶
 
 private:
+	CPLC* m_pPLC;
 	int m_nInitialWidth;
 	int m_nInitialHeight;
 	int m_nCurrentPage; // 褰撳墠椤�

--
Gitblit v1.9.3