From f4e3d35dd0f912c303b13b48a4a3fc09ccb0a845 Mon Sep 17 00:00:00 2001
From: darker <mr.darker@163.com>
Date: 星期二, 18 二月 2025 17:57:40 +0800
Subject: [PATCH] 1. 遍历设备类的属性,并显示在界面上
---
SourceCode/Bond/Servo/CEquipment.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index 769a8fe..7c699e3 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 结构体定义
@@ -50,13 +51,14 @@
MemoryBlock& getReadBitBlock();
void setWriteBitBlock(unsigned int start, unsigned int end);
MemoryBlock& getWriteBitBlock();
+ void getProperties(std::vector<std::pair<std::string, std::string>>& container);
virtual void init();
virtual void term();
virtual void onTimer(UINT nTimerid);
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);
@@ -73,7 +75,10 @@
StationIdentifier m_station;
MemoryBlock m_blockReadBit;
MemoryBlock m_blockWriteBit;
+
+ private:
ALIVE m_alive;
+ BOOL m_bCimState; // ON/OFF
};
}
--
Gitblit v1.9.3