From 23428083d0e401d5540a012ed0d5a0b92fd506a7 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 15 十一月 2024 09:01:08 +0800
Subject: [PATCH] 1.增加获取操作员按钮菜单接口,以便上层根据需要启用或禁用相关菜单项;

---
 SourceCode/Bond/BondEq/CPLC.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/SourceCode/Bond/BondEq/CPLC.cpp b/SourceCode/Bond/BondEq/CPLC.cpp
index a488937..9b1584c 100644
--- a/SourceCode/Bond/BondEq/CPLC.cpp
+++ b/SourceCode/Bond/BondEq/CPLC.cpp
@@ -101,7 +101,7 @@
 	// mc channel
 	McChannelListener m_mcChannellistener;
 	m_mcChannellistener.funOnConnected = [&](IMcChannel* pChannel, int nErrorCode) -> void {
-		MYTRACE1("<PLC-%s>连接结果<code= %d>", m_strName.c_str(), nErrorCode);
+		LOGI("<PLC-%s>连接结果<code= %d>", m_strName.c_str(), nErrorCode);
 		if (nErrorCode == 0) {
 			setState(PLCSTATE::CONNECTED);
 		}
@@ -118,7 +118,7 @@
 		CString strText;
 		dataToHexString(pData, nDataSize, strText);
 		if (nDecodeRet != 0) {
-			MYTRACE1("<PLC-%s>funOnRead[%s], nDecodeRet=%d", m_strName.c_str(), (LPTSTR)(LPCTSTR)strText, nDecodeRet);
+			LOGE("<PLC-%s>funOnRead[%s], nDecodeRet=%d", m_strName.c_str(), (LPTSTR)(LPCTSTR)strText, nDecodeRet);
 		}
 		m_nUnHeartBeat = 0;
 	};
@@ -130,7 +130,7 @@
 		&& m_pChannel != NULL) {
 		m_pChannel->setChannelListener(&m_mcChannellistener);
 		m_pChannel->setActionInterval(m_nActionInterval);
-		MYTRACE1("<PLC-%s>正在连接PLC.", m_strName.c_str());
+		LOGI("<PLC-%s>正在连接PLC.", m_strName.c_str());
 		setState(PLCSTATE::CONNECTING);
 		m_pChannel->connect();
 	}
@@ -214,11 +214,11 @@
 					s.AppendFormat(" %x", (BYTE)pData[i]);
 				}
 				s.Append("]");
-				MYTRACE1("<CPLC-%d-%d>Received plc data.%s", m_nIndex, monitor.id, (LPTSTR)(LPCTSTR)s);
+				LOGD("<CPLC-%d-%d>Received plc data.%s", m_nIndex, monitor.id, (LPTSTR)(LPCTSTR)s);
 			}
 		}
 		else {
-			MYTRACE1("<CPLC-%d-%d>PLC批读取数据位超时.flag=%d", m_nIndex, monitor.id, flag);
+			LOGE("<CPLC-%d-%d>PLC批读取数据位超时.flag=%d", m_nIndex, monitor.id, flag);
 		}
 
 		if (nDataSize == monitor.readLen && flag == 0) {

--
Gitblit v1.9.3