From cfcab53b0e7d5918c79cc77f0f447730682f94b1 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 14 十月 2025 11:31:03 +0800
Subject: [PATCH] 1.glass, 保存csv
---
SourceCode/Bond/Servo/CPageGlassList.h | 8 +
SourceCode/Bond/Servo/CServoUtilsTool.h | 2
SourceCode/Bond/Servo/CServoUtilsTool.cpp | 68 ++++++++
SourceCode/Bond/Servo/CMaster.cpp | 47 +----
SourceCode/Bond/Servo/CPageGlassList.cpp | 301 +++++++++++++++++++++++++++----------
5 files changed, 310 insertions(+), 116 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index c7c5f61..6f5cbd7 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -6,35 +6,10 @@
#include "RecipeManager.h"
#include <fstream>
#include "SerializeUtil.h"
+#include "CServoUtilsTool.h"
namespace SERVO {
- static std::unordered_map<int, std::vector<std::string>> MACHINE_DATA_TYPES = {
- {EQ_ID_Bonder1, {
- "气囊压力", "上腔压力", "管道真空规值", "腔体真空规值",
- "上腔温度1", "上腔温度2", "上腔温度3", "上腔温度4",
- "上腔温度5", "上腔温度6", "下腔温度1", "下腔温度2",
- "下腔温度3", "下腔温度4", "下腔温度5", "下腔温度6"
- }},
- {EQ_ID_Bonder2, {
- "气囊压力", "上腔压力", "管道真空规值", "腔体真空规值",
- "上腔温度1", "上腔温度2", "上腔温度3", "上腔温度4",
- "上腔温度5", "上腔温度6", "下腔温度1", "下腔温度2",
- "下腔温度3", "下腔温度4", "下腔温度5", "下腔温度6"
- }},
- {EQ_ID_VACUUMBAKE, {
- "A腔真空规值", "A腔温控1", "A腔温控2", "A腔温控4",
- "A腔温控5", "A腔温控6", "A腔温控7", "B腔真空规值",
- "B腔温控1", "B腔温控2", "B腔温控4", "B腔温控5",
- "B腔温控6", "B腔温控7"
- }},
- {EQ_ID_BAKE_COOLING, {
- "A烘烤温控1", "A烘烤温控2", "A烘烤温控4", "A烘烤温控5",
- "A烘烤温控6", "A烘烤温控7", "B烘烤温控1", "B烘烤温控2",
- "B烘烤温控4", "B烘烤温控5", "B烘烤温控6", "B烘烤温控7"
- }}
- };
-
static inline int64_t now_ms_epoch() {
using namespace std::chrono;
return duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
@@ -1662,7 +1637,8 @@
};
CGlass* pGlass = ((CEquipment*)pEquipment)->getGlassFromSlot(0);
- auto& bonderTypes = MACHINE_DATA_TYPES[eqid];
+ auto& dataTypes = CServoUtilsTool::getEqDataTypes();
+ auto& bonderTypes = dataTypes[eqid];
for (const auto& mapping : bonderMapping) {
int paramIndex = mapping.first;
int channel = mapping.second;
@@ -1683,16 +1659,17 @@
};
CGlass* pGlass = ((CEquipment*)pEquipment)->getGlassFromSlot(0);
- auto& bonderTypes = MACHINE_DATA_TYPES[eqid];
+ auto& dataTypes = CServoUtilsTool::getEqDataTypes();
+ auto& vacuumbakeTypes = dataTypes[eqid];
for (const auto& mapping : vacuumMapping) {
int paramIndex = mapping.first;
int channel = mapping.second;
- if (paramIndex < params.size() && channel - 1 < bonderTypes.size()) {
+ if (paramIndex < params.size() && channel - 1 < vacuumbakeTypes.size()) {
if (m_pCollector != nullptr)
m_pCollector->buffersPush(eqid, channel, ts, params.at(paramIndex).getDoubleValue());
if (pGlass != nullptr)
- pGlass->addSVData(eqid, bonderTypes[channel], ts, params.at(paramIndex).getDoubleValue());
+ pGlass->addSVData(eqid, vacuumbakeTypes[channel], ts, params.at(paramIndex).getDoubleValue());
}
}
}
@@ -1704,7 +1681,8 @@
};
CGlass* pGlass = ((CEquipment*)pEquipment)->getGlassFromSlot(0);
- auto& coolingTypes = MACHINE_DATA_TYPES[eqid];
+ auto& dataTypes = CServoUtilsTool::getEqDataTypes();
+ auto& coolingTypes = dataTypes[eqid];
for (const auto& mapping : coolingMapping) {
int paramIndex = mapping.first;
int channel = mapping.second;
@@ -3161,18 +3139,19 @@
// 2) 为通道设置“曲线名称”
- auto& bonderTypes = MACHINE_DATA_TYPES[EQ_ID_Bonder1];
+ auto& dataTypes = CServoUtilsTool::getEqDataTypes();
+ auto& bonderTypes = dataTypes[EQ_ID_Bonder1];
for (size_t i = 0; i < bonderTypes.size(); ++i) {
m_pCollector->buffersSetChannelName(EQ_ID_Bonder1, i + 1, bonderTypes[i].c_str());
m_pCollector->buffersSetChannelName(EQ_ID_Bonder2, i + 1, bonderTypes[i].c_str());
}
- auto& vacuumbakeTypes = MACHINE_DATA_TYPES[EQ_ID_VACUUMBAKE];
+ auto& vacuumbakeTypes = dataTypes[EQ_ID_VACUUMBAKE];
for (size_t i = 0; i < bonderTypes.size(); ++i) {
m_pCollector->buffersSetChannelName(EQ_ID_VACUUMBAKE, i + 1, vacuumbakeTypes[i].c_str());
}
- auto& coolingTypes = MACHINE_DATA_TYPES[EQ_ID_BAKE_COOLING];
+ auto& coolingTypes = dataTypes[EQ_ID_BAKE_COOLING];
for (size_t i = 0; i < bonderTypes.size(); ++i) {
m_pCollector->buffersSetChannelName(EQ_ID_VACUUMBAKE, i + 1, coolingTypes[i].c_str());
}
diff --git a/SourceCode/Bond/Servo/CPageGlassList.cpp b/SourceCode/Bond/Servo/CPageGlassList.cpp
index 0d0d5c1..0d12d82 100644
--- a/SourceCode/Bond/Servo/CPageGlassList.cpp
+++ b/SourceCode/Bond/Servo/CPageGlassList.cpp
@@ -1347,98 +1347,210 @@
CString fileExt = fileDialog.GetFileExt();
if (fileExt.CompareNoCase(_T("json")) == 0) {
- // 淇濆瓨涓� JSON
- if (!row->pretty.empty()) {
- CFile file;
- if (file.Open(filePath, CFile::modeCreate | CFile::modeWrite)) {
- file.Write(row->pretty.c_str(), row->pretty.length());
- file.Close();
-
- CString strSuccess;
- strSuccess.Format(_T("璁板綍宸蹭繚瀛樹负JSON鏂囦欢锛歕n%s"), filePath);
- AfxMessageBox(strSuccess);
- }
- else {
- AfxMessageBox(_T("淇濆瓨鏂囦欢澶辫触"));
- }
- }
- else {
- AfxMessageBox(_T("璇ヨ褰曟病鏈塉SON鏁版嵁"));
- }
+ ExportToJson(*row, filePath);
}
else {
- // 淇濆瓨涓� CSV 鏍煎紡 - 鍒嗘寮�
- CString csvContent;
+ ExportToCsv(*row, filePath);
+ }
+}
- // === 绗竴閮ㄥ垎锛氬熀纭�淇℃伅 ===
- csvContent += _T("=== 鍩虹淇℃伅 ===\n");
- csvContent += _T("ID,Cassette搴忓垪鍙�,Job搴忓垪鍙�,Glass ID,鐗╂枡绫诲瀷,鐘舵��,寮�濮嬫椂闂�,缁撴潫鏃堕棿,缁戝畾Glass ID,AOI缁撴灉,璺緞\n");
+void CPageGlassList::ExportToJson(const GlassLogDb::Row& row, const CString& filePath)
+{
+ // 淇濆瓨涓� JSON
+ if (!row.pretty.empty()) {
+ CFile file;
+ if (file.Open(filePath, CFile::modeCreate | CFile::modeWrite)) {
+ file.Write(row.pretty.c_str(), row.pretty.length());
+ file.Close();
- CString baseInfoRow;
- baseInfoRow.Format(_T("%lld,%d,%d,%s,%d,%d,%s,%s,%s,%d,%s\n"),
- row->id, row->cassetteSeqNo, row->jobSeqNo,
- CString(row->classId.c_str()), row->materialType, row->state,
- CString(row->tStart.c_str()), CString(row->tEnd.c_str()),
- CString(row->buddyId.c_str()), row->aoiResult,
- CString(row->path.c_str()));
- csvContent += baseInfoRow;
-
- // === 绗簩閮ㄥ垎锛氬伐鑹哄弬鏁� ===
- csvContent += _T("\n=== 宸ヨ壓鍙傛暟 ===\n");
-
- // 濡傛灉鏈� pretty 瀛楁锛岃В鏋愬伐鑹哄弬鏁�
- if (!row->pretty.empty()) {
- SERVO::CGlass tempGlass;
- if (GlassJson::FromString(row->pretty, tempGlass)) {
- auto& params = tempGlass.getParams();
- if (!params.empty()) {
- // 宸ヨ壓鍙傛暟琛ㄥご - 璋冩暣鍚庣殑鍒�
- csvContent += _T("鍙傛暟鍚嶇О,鍙傛暟ID,鏁板��,鏈哄櫒鍗曞厓\n");
-
- // 宸ヨ壓鍙傛暟鏁版嵁 - 璋冩暣鍚庣殑鏍煎紡
- for (auto& param : params) {
- CString paramRow;
- CString valueStr;
-
- // 鏍规嵁鍙傛暟绫诲瀷鏍煎紡鍖栨暟鍊�
- if (param.getValueType() == PVT_INT) {
- valueStr.Format(_T("%d"), param.getIntValue());
- }
- else {
- valueStr.Format(_T("%.3f"), param.getDoubleValue());
- }
-
- // 璋冩暣鍚庣殑鏍煎紡锛氬幓鎺夋暟鍊肩被鍨嬪垪
- paramRow.Format(_T("%s,%s,%s,%s\n"),
- CString(param.getName().c_str()),
- CString(param.getId().c_str()),
- valueStr,
- CString(param.getUnit().c_str())); // 杩欓噷鏄剧ず鏈哄櫒鍗曞厓
-
- csvContent += paramRow;
- }
- }
- else {
- csvContent += _T("鏃犲伐鑹哄弬鏁版暟鎹甛n");
- }
- }
- else {
- csvContent += _T("鏃犳硶瑙f瀽宸ヨ壓鍙傛暟\n");
- }
- }
- else {
- csvContent += _T("鏃犲伐鑹哄弬鏁版暟鎹甛n");
- }
-
- // 浣跨敤杈呭姪鍑芥暟淇濆瓨涓� UTF-8 缂栫爜
- if (WriteAnsiStringAsUtf8ToFile(csvContent, filePath)) {
CString strSuccess;
- strSuccess.Format(_T("璁板綍宸蹭繚瀛樹负CSV鏂囦欢锛歕n%s"), filePath);
+ strSuccess.Format(_T("璁板綍宸蹭繚瀛樹负JSON鏂囦欢锛歕n%s"), filePath);
AfxMessageBox(strSuccess);
}
else {
AfxMessageBox(_T("淇濆瓨鏂囦欢澶辫触"));
}
+ }
+ else {
+ AfxMessageBox(_T("璇ヨ褰曟病鏈塉SON鏁版嵁"));
+ }
+}
+
+void CPageGlassList::ExportToCsv(const GlassLogDb::Row& row, const CString& filePath)
+{
+ CString csvContent;
+
+ // === 绗竴閮ㄥ垎锛氬熀纭�淇℃伅 ===
+ ExportBasicInfo(csvContent, row);
+
+ // === 绗簩閮ㄥ垎锛氬伐鑹哄弬鏁� ===
+ ExportProcessParams(csvContent, row);
+
+ // === 绗笁閮ㄥ垎锛氫紶鎰熷櫒鏁版嵁璇︽儏 ===
+ ExportSensorData(csvContent, row);
+
+ // 浣跨敤杈呭姪鍑芥暟淇濆瓨涓� UTF-8 缂栫爜
+ if (WriteAnsiStringAsUtf8ToFile(csvContent, filePath)) {
+ CString strSuccess;
+ strSuccess.Format(_T("璁板綍宸蹭繚瀛樹负CSV鏂囦欢锛歕n%s"), filePath);
+ AfxMessageBox(strSuccess);
+ }
+ else {
+ AfxMessageBox(_T("淇濆瓨鏂囦欢澶辫触"));
+ }
+}
+
+void CPageGlassList::ExportBasicInfo(CString& csvContent, const GlassLogDb::Row& row)
+{
+ csvContent += _T("=== 鍩虹淇℃伅 ===\n");
+ csvContent += _T("ID,Cassette搴忓垪鍙�,Job搴忓垪鍙�,Glass ID,鐗╂枡绫诲瀷,鐘舵��,寮�濮嬫椂闂�,缁撴潫鏃堕棿,缁戝畾Glass ID,AOI缁撴灉,璺緞\n");
+
+ CString baseInfoRow;
+ baseInfoRow.Format(_T("%lld,%d,%d,%s,%d,%d,%s,%s,%s,%d,%s\n"),
+ row.id, row.cassetteSeqNo, row.jobSeqNo,
+ CString(row.classId.c_str()), row.materialType, row.state,
+ CString(row.tStart.c_str()), CString(row.tEnd.c_str()),
+ CString(row.buddyId.c_str()), row.aoiResult,
+ CString(row.path.c_str()));
+ csvContent += baseInfoRow;
+}
+
+void CPageGlassList::ExportProcessParams(CString& csvContent, const GlassLogDb::Row& row)
+{
+ csvContent += _T("\n=== 宸ヨ壓鍙傛暟 ===\n");
+
+ // 濡傛灉鏈� pretty 瀛楁锛岃В鏋愬伐鑹哄弬鏁�
+ if (!row.pretty.empty()) {
+ SERVO::CGlass tempGlass;
+ if (GlassJson::FromString(row.pretty, tempGlass)) {
+ auto& params = tempGlass.getParams();
+ if (!params.empty()) {
+ // 宸ヨ壓鍙傛暟琛ㄥご
+ csvContent += _T("鍙傛暟鍚嶇О,鍙傛暟ID,鏁板��,鏈哄櫒鍗曞厓\n");
+
+ // 宸ヨ壓鍙傛暟鏁版嵁
+ for (auto& param : params) {
+ CString paramRow;
+ CString valueStr;
+
+ // 鏍规嵁鍙傛暟绫诲瀷鏍煎紡鍖栨暟鍊�
+ if (param.getValueType() == PVT_INT) {
+ valueStr.Format(_T("%d"), param.getIntValue());
+ }
+ else {
+ valueStr.Format(_T("%.3f"), param.getDoubleValue());
+ }
+
+ paramRow.Format(_T("%s,%s,%s,%s\n"),
+ CString(param.getName().c_str()),
+ CString(param.getId().c_str()),
+ valueStr,
+ CString(param.getUnit().c_str()));
+
+ csvContent += paramRow;
+ }
+ }
+ else {
+ csvContent += _T("鏃犲伐鑹哄弬鏁版暟鎹甛n");
+ }
+ }
+ else {
+ csvContent += _T("鏃犳硶瑙f瀽宸ヨ壓鍙傛暟\n");
+ }
+ }
+ else {
+ csvContent += _T("鏃犲伐鑹哄弬鏁版暟鎹甛n");
+ }
+}
+
+void CPageGlassList::ExportSensorData(CString& csvContent, const GlassLogDb::Row& row)
+{
+ csvContent += _T("\n=== 浼犳劅鍣ㄦ暟鎹鎯� ===\n");
+
+ // 濡傛灉鏈� pretty 瀛楁锛岃В鏋愪紶鎰熷櫒鏁版嵁
+ if (!row.pretty.empty()) {
+ SERVO::CGlass tempGlass;
+ if (GlassJson::FromString(row.pretty, tempGlass)) {
+ // 瀵规瘡涓満鍣ㄧ敓鎴愯〃鏍�
+ for (const auto& machinePair : tempGlass.getAllSVData()) {
+ int machineId = machinePair.first;
+ CString machineName = CString(SERVO::CServoUtilsTool::getEqName(machineId).c_str());
+
+ csvContent += _T("\n[") + machineName + _T("]\n");
+
+ // 鑾峰彇璇ユ満鍣ㄧ殑棰勫畾涔夊垪椤哄簭
+ auto columnOrder = getMachineColumnOrder(machineId);
+
+ if (columnOrder.empty()) {
+ csvContent += _T("鏃犻瀹氫箟鍒楅厤缃甛n");
+ continue;
+ }
+
+ // 鏋勫缓琛ㄥご - 鐩存帴浣跨敤涓枃鍒楀悕
+ CString header = _T("鏃堕棿鎴�(ms),鏈湴鏃堕棿");
+ for (const auto& dataType : columnOrder) {
+ header += _T(",");
+ header += CString(dataType.c_str()); // 鐩存帴浣跨敤涓枃鍒楀悕
+ }
+ header += _T("\n");
+ csvContent += header;
+
+ // 妫�鏌ユ槸鍚︽湁鏁版嵁
+ if (machinePair.second.empty()) {
+ csvContent += _T("鏃犱紶鎰熷櫒鏁版嵁\n");
+ continue;
+ }
+
+ // 浣跨敤绗竴涓暟鎹被鍨嬬殑鏃堕棿搴忓垪浣滀负鍩哄噯
+ const std::string& firstDataType = columnOrder[0];
+ auto firstDataTypeIt = machinePair.second.find(firstDataType);
+ if (firstDataTypeIt == machinePair.second.end() || firstDataTypeIt->second.empty()) {
+ csvContent += _T("鏃犲熀鍑嗘暟鎹被鍨嬫暟鎹甛n");
+ continue;
+ }
+
+ const auto& timeSeries = firstDataTypeIt->second;
+
+ // 瀵逛簬姣忎釜鏃堕棿鐐癸紝杈撳嚭涓�琛屾暟鎹�
+ for (size_t i = 0; i < timeSeries.size(); i++) {
+ auto timestamp = timeSeries[i].timestamp;
+
+ // 鏃堕棿鎴筹紙姣锛�
+ auto ms = timePointToMs(timestamp);
+ CString row;
+ row.Format(_T("%lld,"), ms);
+
+ // 鏈湴鏃堕棿瀛楃涓�
+ CString localTime = CString(timePointToString(timestamp).c_str());
+ row += localTime;
+
+ // 鎸夌収棰勫畾涔夌殑鍒楅『搴忚緭鍑烘暟鎹�
+ for (const auto& dataType : columnOrder) {
+ row += _T(",");
+
+ auto dataTypeIt = machinePair.second.find(dataType);
+ if (dataTypeIt != machinePair.second.end() && i < dataTypeIt->second.size()) {
+ // 鐩存帴鎸夌储寮曡幏鍙栨暟鎹�
+ CString valueStr;
+ valueStr.Format(_T("%.3f"), dataTypeIt->second[i].value);
+ row += valueStr;
+ }
+ else {
+ // 鐞嗚涓婁笉搴旇鍙戠敓锛屽洜涓烘偍璇存病鏈夌┖鍊�
+ row += _T("N/A");
+ }
+ }
+ row += _T("\n");
+ csvContent += row;
+ }
+ }
+ }
+ else {
+ csvContent += _T("鏃犳硶瑙f瀽浼犳劅鍣ㄦ暟鎹甛n");
+ }
+ }
+ else {
+ csvContent += _T("鏃犱紶鎰熷櫒鏁版嵁\n");
}
}
@@ -1797,4 +1909,29 @@
}
return CDialogEx::PreTranslateMessage(pMsg);
+}
+
+// 鑾峰彇鏈哄櫒棰勫畾涔夌殑鍒楅『搴�
+std::vector<std::string> CPageGlassList::getMachineColumnOrder(int machineId)
+{
+ auto dataTypes = SERVO::CServoUtilsTool::getEqDataTypes();
+ auto it = dataTypes.find(machineId);
+ return it != dataTypes.end() ? it->second : std::vector<std::string>();
+}
+
+// 鏃堕棿鎴宠浆鎹负瀛楃涓�
+std::string CPageGlassList::timePointToString(const std::chrono::system_clock::time_point& tp)
+{
+ auto time_t = std::chrono::system_clock::to_time_t(tp);
+ std::tm tm;
+ localtime_s(&tm, &time_t);
+ char buffer[20];
+ std::strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", &tm);
+ return buffer;
+}
+
+// 鏃堕棿鎴宠浆鎹负姣
+int64_t CPageGlassList::timePointToMs(const std::chrono::system_clock::time_point& tp)
+{
+ return std::chrono::duration_cast<std::chrono::milliseconds>(tp.time_since_epoch()).count();
}
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/CPageGlassList.h b/SourceCode/Bond/Servo/CPageGlassList.h
index c0327dd..bb23485 100644
--- a/SourceCode/Bond/Servo/CPageGlassList.h
+++ b/SourceCode/Bond/Servo/CPageGlassList.h
@@ -56,6 +56,14 @@
bool eraseGlassInVector(SERVO::CGlass* pGlass, std::vector<SERVO::CGlass*>& glasses);
void UpdateWipRow(unsigned int index, SERVO::CGlass* pGlass);
bool WriteAnsiStringAsUtf8ToFile(const CString& ansiContent, const CString& filePath);
+ void ExportToCsv(const GlassLogDb::Row& row, const CString& filePath);
+ void ExportToJson(const GlassLogDb::Row& row, const CString& filePath);
+ void ExportBasicInfo(CString& csvContent, const GlassLogDb::Row& row);
+ void ExportProcessParams(CString& csvContent, const GlassLogDb::Row& row);
+ void ExportSensorData(CString& csvContent, const GlassLogDb::Row& row);
+ static std::vector<std::string> getMachineColumnOrder(int machineId);
+ static std::string timePointToString(const std::chrono::system_clock::time_point& tp);
+ static int64_t timePointToMs(const std::chrono::system_clock::time_point& tp);
// 瀵硅瘽妗嗘暟鎹�
#ifdef AFX_DESIGN_TIME
diff --git a/SourceCode/Bond/Servo/CServoUtilsTool.cpp b/SourceCode/Bond/Servo/CServoUtilsTool.cpp
index 19fa4d9..c9d06f6 100644
--- a/SourceCode/Bond/Servo/CServoUtilsTool.cpp
+++ b/SourceCode/Bond/Servo/CServoUtilsTool.cpp
@@ -4,6 +4,32 @@
namespace SERVO {
+ static std::unordered_map<int, std::vector<std::string>> EQ_DATA_TYPES = {
+ {EQ_ID_Bonder1, {
+ "气囊压力", "上腔压力", "管道真空规值", "腔体真空规值",
+ "上腔温度1", "上腔温度2", "上腔温度3", "上腔温度4",
+ "上腔温度5", "上腔温度6", "下腔温度1", "下腔温度2",
+ "下腔温度3", "下腔温度4", "下腔温度5", "下腔温度6"
+ }},
+ {EQ_ID_Bonder2, {
+ "气囊压力", "上腔压力", "管道真空规值", "腔体真空规值",
+ "上腔温度1", "上腔温度2", "上腔温度3", "上腔温度4",
+ "上腔温度5", "上腔温度6", "下腔温度1", "下腔温度2",
+ "下腔温度3", "下腔温度4", "下腔温度5", "下腔温度6"
+ }},
+ {EQ_ID_VACUUMBAKE, {
+ "A腔真空规值", "A腔温控1", "A腔温控2", "A腔温控4",
+ "A腔温控5", "A腔温控6", "A腔温控7", "B腔真空规值",
+ "B腔温控1", "B腔温控2", "B腔温控4", "B腔温控5",
+ "B腔温控6", "B腔温控7"
+ }},
+ {EQ_ID_BAKE_COOLING, {
+ "A烘烤温控1", "A烘烤温控2", "A烘烤温控4", "A烘烤温控5",
+ "A烘烤温控6", "A烘烤温控7", "B烘烤温控1", "B烘烤温控2",
+ "B烘烤温控4", "B烘烤温控5", "B烘烤温控6", "B烘烤温控7"
+ }}
+ };
+
CServoUtilsTool::CServoUtilsTool()
{
@@ -12,6 +38,43 @@
CServoUtilsTool::~CServoUtilsTool()
{
+ }
+
+ std::string CServoUtilsTool::getEqName(int eqid)
+ {
+ switch (eqid)
+ {
+ case EQ_ID_LOADPORT1:
+ return "Port1";
+ case EQ_ID_LOADPORT2:
+ return "Port2";
+ case EQ_ID_LOADPORT3:
+ return "Port3";
+ case EQ_ID_LOADPORT4:
+ return "Port4";
+ case EQ_ID_ALIGNER:
+ return "Aligner";
+ case EQ_ID_FLIPER:
+ return "Fliper";
+ case EQ_ID_VACUUMBAKE:
+ return "VacuumBake";
+ case EQ_ID_Bonder1:
+ return "Bonder1";
+ case EQ_ID_Bonder2:
+ return "Bonder2";
+ case EQ_ID_BAKE_COOLING:
+ return "BakeCooling";
+ case EQ_ID_MEASUREMENT:
+ return "AOI";
+ case EQ_ID_ARM_TRAY1:
+ return "ArmTray1";
+ case EQ_ID_ARM_TRAY2:
+ return "ArmTray2";
+ default:
+ break;
+ }
+
+ return "";
}
std::string CServoUtilsTool::getEqUnitName(int eqid, int unit)
@@ -198,4 +261,9 @@
break;
}
}
+
+ std::unordered_map<int, std::vector<std::string>>& CServoUtilsTool::getEqDataTypes()
+ {
+ return EQ_DATA_TYPES;
+ }
}
diff --git a/SourceCode/Bond/Servo/CServoUtilsTool.h b/SourceCode/Bond/Servo/CServoUtilsTool.h
index 945d717..2945984 100644
--- a/SourceCode/Bond/Servo/CServoUtilsTool.h
+++ b/SourceCode/Bond/Servo/CServoUtilsTool.h
@@ -11,11 +11,13 @@
virtual ~CServoUtilsTool();
public:
+ static std::string getEqName(int eqid);
static std::string getEqUnitName(int eqid, int unit);
static std::string getEqUnitName(int eqid, int unit, int slot);
static std::string getMaterialsTypeText(MaterialsType type);
static std::string getGlassStateText(SERVO::GlsState state);
static std::string getInspResultText(SERVO::InspResult result);
+ static std::unordered_map<int, std::vector<std::string>>& getEqDataTypes();
};
}
--
Gitblit v1.9.3