From f8971cfc3abcc23fd2a5541a7bf698389d5e9300 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 15 二月 2025 16:47:54 +0800
Subject: [PATCH] 1.增加CMaster, CBonder,CEFEM等类,测试读取CC-Link数据;

---
 SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h |   44 +++++++++++++++++++++++---------------------
 1 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h b/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h
index a7006fd..3a33626 100644
--- a/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h
+++ b/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h
@@ -4,14 +4,14 @@
 #include "PerformanceMelsec.h"
 
 enum class CCLinkIEControlMode : short {
-    UNKNOWN = 0x0194,               // 鏈煡
-    ONLINE = 0x0000,                // 鍦ㄧ嚎
-    OFFLINE = 0x0002,               // 绂荤嚎
-    INTER_STATION_TEST = 0x0005,    // 绔欓棿娴嬭瘯
-    LINE_TEST = 0x0006,             // 绾胯矾娴嬭瘯
-    LOOPBACK_TEST = 0x0007,         // 鑷洖閫佹祴璇�
-    HW_TEST = 0x0009,               // H/W娴嬭瘯
-    BUS_IF_TEST = 0x000E            // 鎬荤嚎I/F娴嬭瘯
+    UNKNOWN = 0x0194,               // 未知
+    ONLINE = 0x0000,                // 在线
+    OFFLINE = 0x0002,               // 离线
+    INTER_STATION_TEST = 0x0005,    // 站间测试
+    LINE_TEST = 0x0006,             // 线路测试
+    LOOPBACK_TEST = 0x0007,         // 自回送测试
+    HW_TEST = 0x0009,               // H/W测试
+    BUS_IF_TEST = 0x000E            // 总线I/F测试
 };
 
 class CCCLinkIEControl final : public CPerformanceMelsec {
@@ -20,16 +20,16 @@
     ~CCCLinkIEControl() override;
 
     struct LedStatus {
-        bool bExtPw; // 澶栭儴鐢垫簮鐘舵�� (b15)
-        bool bRd;    // 鏁版嵁鎺ユ敹鐘舵�� (b6)
-        bool bDLnk;  // 鏁版嵁閾炬帴鐘舵�� (b5)
-        bool bPrm;   // 绠$悊鍔熻兘鐘舵�� (b4)
-        bool bErr;   // 閿欒鐘舵�� (b3)
-        bool bSd;    // 鏁版嵁鍙戦�佺姸鎬� (b2)
-        bool bMode;  // 鍔ㄤ綔妯″紡 (b1)
-        bool bRun;   // 杩愯鐘舵�� (b0)
+        bool bExtPw; // 外部电源状态 (b15)
+        bool bRd;    // 数据接收状态 (b6)
+        bool bDLnk;  // 数据链接状态 (b5)
+        bool bPrm;   // 管理功能状态 (b4)
+        bool bErr;   // 错误状态 (b3)
+        bool bSd;    // 数据发送状态 (b2)
+        bool bMode;  // 动作模式 (b1)
+        bool bRun;   // 运行状态 (b0)
 
-        // 杞崲涓哄瓧绗︿覆锛岀敤浜庤皟璇�
+        // 转换为字符串,用于调试
         std::string ToString() const {
             std::ostringstream oss;
             oss << "CC-Link IE Control Network LED Status: {"
@@ -46,19 +46,21 @@
         }
     };
 
-    // 璇诲彇鐩爣绔欑偣CPU绫诲瀷
+    // 读取目标站点CPU类型
     // short ReadCPUCodeEx(const StationIdentifier& station, short& nCPUCode);
 
-    // 鏉挎ā寮忚幏鍙�/璁剧疆
+    // 板模式获取/设置
     int SetBoardModeEx(CCLinkIEControlMode mode);
     CCLinkIEControlMode GetBoardModeEx();
 
-    // 鑾峰彇鏉跨姸鎬�
+    // 获取板状态
     int GetBoardStatusEx(BoardStatus& status);
 
-    // 璇诲彇LED鐘舵��
+    // 读取LED状态
     int ReadLedStatus(LedStatus& outLedStatus);
 
+    int ReadData2(const StationIdentifier& station, short devType, short devNo, short size, void* pData);
+
 private:
     static CCLinkIEControlMode ConvertToCCLinkIEControlMode(short nMode);
     static int ValidateBoardStatus(const BoardStatus& status);

--
Gitblit v1.9.3