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 | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h index 044fcd8..7c699e3 100644 --- a/SourceCode/Bond/Servo/CEquipment.h +++ b/SourceCode/Bond/Servo/CEquipment.h @@ -39,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); @@ -49,6 +51,7 @@ 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); @@ -65,6 +68,7 @@ protected: EquipmentListener m_listener; + int m_nID; std::string m_strName; std::string m_strDescription; CRITICAL_SECTION m_criticalSection; -- Gitblit v1.9.3