From bea6407b376a4e426f0b120bae569fba6ab867db Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期六, 08 十一月 2025 17:55:47 +0800
Subject: [PATCH] 1.CMaster.cpp 第 1644/1667/1691 行在记录 SV 曲线时通过 getGlassFromSlot(0) 取玻璃,而各设备的 initSlots() 都是从 1 开始编号(例如 CBonder.cpp (line 408)、CVacuumBake.cpp (line 415) 等)。槽位 0 永远不存在,所以 pGlass 始终是 nullptr,pGlass->addSVData(...) 的分支从未执行。结果 SERVO::CGlass::m_svDatas 里没有任何曲线数据,GlassJson::ToPrettyString 生成的 pretty 字符串也就没有 sv_datas,导出 CSV 时自然读不到曲线。 同一段代码还有一个潜在 Bug:虽然判断了 channel - 1 < bonderTypes.size(),但真正索引却用的是 bonderTypes[channel]。索引偏移会导致数据类型错位,最后一个通道甚至可能越界。即使修正了槽位,这里也需要同步改成 bonderTypes[channel - 1](另外两处 vacuumbakeTypes、coolingTypes 也一样)。

---
 SourceCode/Bond/HSMSSDK/Include/ISECS2Item.h |   46 ++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/SourceCode/Bond/HSMSSDK/Include/ISECS2Item.h b/SourceCode/Bond/HSMSSDK/Include/ISECS2Item.h
index 030deaf..09b9ed0 100644
--- a/SourceCode/Bond/HSMSSDK/Include/ISECS2Item.h
+++ b/SourceCode/Bond/HSMSSDK/Include/ISECS2Item.h
@@ -25,13 +25,51 @@
 public:
 	virtual SITYPE getType() = 0;
 	virtual const char* toString() = 0;
-	virtual bool getString(char*& pszText) = 0;
+	virtual bool getString(const char*& pszText) = 0;
+	virtual bool getBinary(const char*& pszData, unsigned int& len) = 0;
+	virtual bool getBool(bool& boolValue) = 0;
+	virtual bool getI8(long long& value) = 0;
+	virtual bool getI4(int& value) = 0;
+	virtual bool getI2(short& value) = 0;
+	virtual bool getI1(char& value) = 0;
+	virtual bool getF8(double& value) = 0;
+	virtual bool getF4(float& value) = 0;
+	virtual bool getU8(unsigned long long& value) = 0;
+	virtual bool getU4(unsigned int& value) = 0;
+	virtual bool getU2(unsigned short& value) = 0;
+	virtual bool getU1(unsigned char& value) = 0;
 	virtual int getSubItemSize() = 0;
 	virtual ISECS2Item* getSubItem(int index) = 0;
-	virtual bool getSubItemString(int index, char*& pszText) = 0;
+	virtual bool getSubItemString(int index, const char*& pszText) = 0;
+	virtual bool getSubItemBinary(int index, const char*& pszData, unsigned int& len) = 0;
+	virtual bool getSubItemBool(int index, bool& boolValue) = 0;
+	virtual bool getSubItemI8(int index, long long& value) = 0;
+	virtual bool getSubItemI4(int index, int& value) = 0;
+	virtual bool getSubItemI2(int index, short& value) = 0;
+	virtual bool getSubItemI1(int index, char& value) = 0;
+	virtual bool getSubItemF8(int index, double& value) = 0;
+	virtual bool getSubItemF4(int index, float& value) = 0;
+	virtual bool getSubItemU8(int index, unsigned long long& value) = 0;
+	virtual bool getSubItemU4(int index, unsigned int& value) = 0;
+	virtual bool getSubItemU2(int index, unsigned short& value) = 0;
+	virtual bool getSubItemU1(int index, unsigned char& value) = 0;
 	virtual void reset() = 0;
 	virtual ISECS2Item* addItem(const char* pszText, const char* pszNote) = 0;
-	virtual ISECS2Item* addBinaryItem(const char* pszData, int nDataLen, const char* pszNote) = 0;
-	virtual void setBinary(const char* pszData, int nLen, const char* pszNote) = 0;
+	virtual ISECS2Item* addBinaryItem(const char* pszData, unsigned int len, const char* pszNote) = 0;
+	virtual ISECS2Item* addBoolItem(bool boolValue, const char* pszNote) = 0;
+	virtual ISECS2Item* addI8Item(long long value, const char* pszNote) = 0;
+	virtual ISECS2Item* addI4Item(int value, const char* pszNote) = 0;
+	virtual ISECS2Item* addI2Item(short value, const char* pszNote) = 0;
+	virtual ISECS2Item* addI1Item(char value, const char* pszNote) = 0;
+	virtual ISECS2Item* addF8Item(double value, const char* pszNote) = 0;
+	virtual ISECS2Item* addF4Item(float value, const char* pszNote) = 0;
+	virtual ISECS2Item* addU8Item(unsigned long long value, const char* pszNote) = 0;
+	virtual ISECS2Item* addU4Item(unsigned int value, const char* pszNote) = 0;
+	virtual ISECS2Item* addU2Item(unsigned short value, const char* pszNote) = 0;
+	virtual ISECS2Item* addU1Item(unsigned char value, const char* pszNote) = 0;
+	virtual void setBinary(const char* pszData, unsigned int len, const char* pszNote) = 0;
+	virtual void setString(const char* pszText, const char* pszNote) = 0;
+	virtual void setU1(unsigned char value, const char* pszNote) = 0;
+	virtual void setBool(bool value, const char* pszNote) = 0;
 	virtual ISECS2Item* addItem() = 0;
 };

--
Gitblit v1.9.3