From 94fafb0f07b1df0e86f170cbf03d657ba39a16ff Mon Sep 17 00:00:00 2001
From: darker <mr.darker@163.com>
Date: 星期二, 18 二月 2025 17:43:04 +0800
Subject: [PATCH] 1. 添加设备属性对话框 2. 在配置文件中添加设备ID
---
SourceCode/Bond/Servo/CEquipment.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index 37d8e2b..3799c16 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -10,6 +10,7 @@
typedef struct _EquipmentListener
{
ONALIVE onAlive;
+ ONALIVE onCimStateChanged;
} EquipmentListener;
// Memory Block 结构体定义
@@ -38,6 +39,8 @@
public:
virtual const char* getClassName() = 0;
virtual void setListener(EquipmentListener listener);
+ void setID(int nID);
+ int getID();
void setName(const char* pszName);
std::string& getName();
void setDescription(const char* pszDescription);
@@ -54,7 +57,7 @@
virtual void serialize(CArchive& ar);
virtual void onReceiveLBData(const char* pszData, size_t size);
BOOL isAlive();
-
+
private:
BOOL isBitOn(const char* pszData, size_t size, int index);
@@ -64,13 +67,17 @@
protected:
EquipmentListener m_listener;
+ int m_nID;
std::string m_strName;
std::string m_strDescription;
CRITICAL_SECTION m_criticalSection;
StationIdentifier m_station;
MemoryBlock m_blockReadBit;
MemoryBlock m_blockWriteBit;
+
+ private:
ALIVE m_alive;
+ BOOL m_bCimState; // ON/OFF
};
}
--
Gitblit v1.9.3