From 0ba3414c4745224a7ee6f68fbc640bf74e3ee87d Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期四, 09 一月 2025 15:30:20 +0800
Subject: [PATCH] 1. 获取PLC数据更新CPlcView 2. 修复删除节点

---
 SourceCode/Bond/BoounionPLC/Model.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/BoounionPLC/Model.h b/SourceCode/Bond/BoounionPLC/Model.h
index b02b2de..cbdf836 100644
--- a/SourceCode/Bond/BoounionPLC/Model.h
+++ b/SourceCode/Bond/BoounionPLC/Model.h
@@ -20,6 +20,10 @@
 	int addPlc(const char* pszName, const char* pszIp, const unsigned int port);
 	int removePlc(const char* pszName);
 
+	// 设置/获取当前PLC
+	void setCurrentPlc(CPLC* pPlc);
+	CPLC* getCurrentPlc();
+
 public:
 	int notify(int code);
 	int notifyPtr(int code, void* ptr = NULL);
@@ -34,15 +38,25 @@
 	int notifyTextAndInt(int code, const char* pszText, int exCode);
 	int notifyMesMsg(int code, int stream, int function, const char* pszText);
 
+private:
+	void readPLCDataRegularly();
+
 public:
 	CConfiguration m_configuration;
 
+private:
+	int m_nVelocityRatio;		// 速度比
+	double m_dTactTime;			// 周期时间
+	int m_nDayShiftCapacity;	// 白班产能
+	int m_nNightShiftCapacity;	// 夜班产能
+	bool m_bBlBtnsStates[7];	// PLC View按钮状态
 
 private:
 	IObservable* m_pObservable;
 	IObservableEmitter* m_pObservableEmitter;
 	CString m_strWorkDir;
 	std::map<std::string, CPLC*> m_mapPlc;
+	std::string m_strCurrPlc;
 
 private:
 	int m_nTimerID;

--
Gitblit v1.9.3