From 0239509af412b74083b33a6924ffd79007dfda5f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 18 十一月 2024 10:41:13 +0800
Subject: [PATCH] 1.轴对话框,当前参数读取和显示;
---
SourceCode/Bond/BondEq/CBonder.cpp | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/SourceCode/Bond/BondEq/CBonder.cpp b/SourceCode/Bond/BondEq/CBonder.cpp
index 9ed5f45..104a6fe 100644
--- a/SourceCode/Bond/BondEq/CBonder.cpp
+++ b/SourceCode/Bond/BondEq/CBonder.cpp
@@ -60,7 +60,6 @@
{
m_listener.onStateChanged = listener.onStateChanged;
m_listener.onPlcStateChanged = listener.onPlcStateChanged;
- m_listener.onCimStateChanged = listener.onCimStateChanged;
m_listener.onEfemStateChanged = listener.onEfemStateChanged;
m_listener.onRecvBroadcast = listener.onRecvBroadcast;
}
@@ -68,6 +67,11 @@
const std::vector<CComponent*>& CBonder::getComponents()
{
return m_components;
+}
+
+CPLC* CBonder::getPLC(const char* pszName)
+{
+ return (CPLC*)GetComponent("PLC(1)");
}
int CBonder::save()
@@ -187,7 +191,6 @@
pPlc->setName("PLC(1)");
pPlc->setDescription("PLC");
pPlc->setIndex(0);
- pPlc->init();
AddComponent(pPlc);
@@ -449,6 +452,17 @@
item->OnTimer(nTimerid);
}
+
+ // PLC延时连接
+ static int nPlc = 0;
+ nPlc++;
+ if (nPlc == 3) {
+ CPLC* pPLC = (CPLC*)GetComponent("PLC(1)");
+ pPLC->init();
+ }
+
+
+ // 自动保存
static int iii = 0;
iii++;
if (iii % 5 == 0) {
--
Gitblit v1.9.3