mrDarker
2025-09-05 357b6294d03c0537b4abb74ed4b3f0a54f9d9915
Merge branch 'clh' into liuyang
已修改9个文件
180 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CBakeCooling.cpp 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CBonder.cpp 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.cpp 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CGlass.cpp 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CGlass.h 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMeasurement.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CProcessData.cpp 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CProcessData.h 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CVacuumBake.cpp 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CBakeCooling.cpp
@@ -433,32 +433,32 @@
        // 1.A_腔烘烤时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("A_腔烘烤时间", "", "", v * 0.01f));
        params.push_back(CParam("A_腔烘烤时间", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 2.A_腔冷却时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("A_腔冷却时间", "", "", v * 0.01f));
        params.push_back(CParam("A_腔冷却时间", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 3.B_腔烘烤时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("B_腔烘烤时间", "", "", v * 0.01f));
        params.push_back(CParam("B_腔烘烤时间", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 4.BB_腔冷却时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("B_腔冷却时间", "", "", v * 0.01f));
        params.push_back(CParam("B_腔冷却时间", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 5.A_烘烤温度设定
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("A_烘烤温度设定", "", "", v * 0.1f));
        params.push_back(CParam("A_烘烤温度设定", "", this->getName().c_str(), v * 0.1f));
        i += 2;
        // 6.B_烘烤温度设定
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("B_烘烤温度设定", "", "", v * 0.1f));
        params.push_back(CParam("B_烘烤温度设定", "", this->getName().c_str(), v * 0.1f));
        i += 2;
SourceCode/Bond/Servo/CBonder.cpp
@@ -533,110 +533,110 @@
        // 1.校正对位延时
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("校正对位延时", "", "", v * 0.01f));
        params.push_back(CParam("校正对位延时", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 2.保压时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("保压时间", "", "", v * 0.01f));
        params.push_back(CParam("保压时间", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 3.腔体破真空延时
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("腔体破真空延时", "", "", v * 0.01f));
        params.push_back(CParam("腔体破真空延时", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 4.腔体分子泵启动延时
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("腔体分子泵启动延时", "", "", v * 0.1f));
        params.push_back(CParam("腔体分子泵启动延时", "", this->getName().c_str(), v * 0.1f));
        i += 2;
        // 5.腔体贴附抽真空延时
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("腔体贴附抽真空延时", "", "", v * 0.1f));
        params.push_back(CParam("腔体贴附抽真空延时", "", this->getName().c_str(), v * 0.1f));
        i += 2;
        // 6.加热等待延时
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("加热等待延时", "", "", v * 0.1f));
        params.push_back(CParam("加热等待延时", "", this->getName().c_str(), v * 0.1f));
        i += 2;
        // 7.气囊压力设定
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("气囊压力设定", "", "", v * 0.001f));
        params.push_back(CParam("气囊压力设定", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 8.气囊加压速率
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("气囊加压速率", "", "", v * 0.001f));
        params.push_back(CParam("气囊加压速率", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 9.气囊泄压速率
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("气囊泄压速率", "", "", v * 0.001f));
        params.push_back(CParam("气囊泄压速率", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 10.贴附压力上限
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("贴附压力上限", "", "", v * 0.1f));
        params.push_back(CParam("贴附压力上限", "", this->getName().c_str(), v * 0.1f));
        i += 4;
        // 11.Z轴转矩速度设定
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("上腔Z轴转矩速度设定", "", "", v * 0.001f));
        params.push_back(CParam("上腔Z轴转矩速度设定", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 12.上腔温度设定
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("上腔温度设定", "", "", v * 0.1f));
        params.push_back(CParam("上腔温度设定", "", this->getName().c_str(), v * 0.1f));
        i += 2;
        // 13.下腔温度设定
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("下腔温度设定", "", "", v * 0.1f));
        params.push_back(CParam("下腔温度设定", "", this->getName().c_str(), v * 0.1f));
        i += 2;
        // 14.上腔Z轴预贴合位速度
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("上腔Z轴预贴合位速度", "", "", v * 0.001f));
        params.push_back(CParam("上腔Z轴预贴合位速度", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 15.上腔Z轴贴附位速度
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("上腔Z轴贴附位速度", "", "", v * 0.001f));
        params.push_back(CParam("上腔Z轴贴附位速度", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 16.上腔Z上腔加热位间距
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("上腔Z上腔加热位间距", "", "", v * 0.001f));
        params.push_back(CParam("上腔Z上腔加热位间距", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 17.上腔贴附位压入量
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("上腔贴附位压入量", "", "", v * 0.001f));
        params.push_back(CParam("上腔贴附位压入量", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 18.上腔Z轴破真空距离
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("上腔Z轴破真空距离", "", "", v * 0.001f));
        params.push_back(CParam("上腔Z轴破真空距离", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 19.下顶Pin破真空距离
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("下顶Pin破真空距离", "", "", v * 0.001f));
        params.push_back(CParam("下顶Pin破真空距离", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 20.下顶Pin加热位间距
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("下顶Pin加热位间距", "", "", v * 0.001f));
        params.push_back(CParam("下顶Pin加热位间距", "", this->getName().c_str(), v * 0.001f));
        i += 4;
        // 21.腔体真空泵真空规设定值
        params.push_back(CParam("腔体真空泵真空规设定值", "", "", (double)toFloat(&pszData[i])));
        params.push_back(CParam("腔体真空泵真空规设定值", "", this->getName().c_str(), (double)toFloat(&pszData[i])));
        i += 4;
        // 22.腔体分子泵到达设定值
        params.push_back(CParam("腔体分子泵到达设定值", "", "", (double)toFloat(&pszData[i])));
        params.push_back(CParam("腔体分子泵到达设定值", "", this->getName().c_str(), (double)toFloat(&pszData[i])));
        i += 4;
SourceCode/Bond/Servo/CEquipment.cpp
@@ -1528,6 +1528,24 @@
        processData.getAttributeVector(attrubutes, weight);
        onProcessData(&processData);
        // 找到玻璃,关联数据
        CGlass* pGlass = this->getGlassWithCassette(processData.getCassetteSequenceNo(),
            processData.getJobSequenceNo());
        if (pGlass == nullptr) {
            LOGE("<CEquipment-%s>找不到对应Glass, 关联工艺参数失败。", this->getName().c_str(),
                processData.getCassetteSequenceNo(),
                processData.getJobSequenceNo());
            return -1;
        }
        auto rawData = processData.getParamsRawData();
        std::vector<CParam> params;
        this->parsingParams((const char*)rawData.data(), rawData.size(), params);
        pGlass->addParams(params);
        return nRet;
    }
SourceCode/Bond/Servo/CGlass.cpp
@@ -369,4 +369,14 @@
    {
        m_tEnd = std::chrono::system_clock::now();
    }
    void CGlass::addParams(std::vector<CParam>& params)
    {
        m_params.insert(m_params.end(), params.begin(), params.end());
    }
    std::vector<CParam>& CGlass::getParams()
    {
        return m_params;
    }
}
SourceCode/Bond/Servo/CGlass.h
@@ -8,6 +8,7 @@
#include "CJobDataS.h"
#include "ServoCommo.h"
#include "ProcessJob.h"
#include "CParam.h"
namespace SERVO {
@@ -89,6 +90,10 @@
        void markStart();
        void markEnd();
        // 工艺参数
        void addParams(std::vector<CParam>& params);
        std::vector<CParam>& getParams();
    private:
        MaterialsType m_type;
        std::string m_strID;
@@ -100,6 +105,7 @@
        int m_nOriginSlot;
        BOOL m_bScheduledForProcessing;            /* 是否将加工处理 */
        CProcessJob* m_pProcessJob;
        std::vector<CParam> m_params;            // 工艺参数
    };
}
SourceCode/Bond/Servo/CMeasurement.cpp
@@ -427,12 +427,12 @@
        // 1.检测功能启用/禁用
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("检测功能启用/禁用", "", "", v));
        params.push_back(CParam("检测功能启用/禁用", "", this->getName().c_str(), v));
        i += 2;
        // 2.检测速度
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("检测速度", "", "", v * 0.001));
        params.push_back(CParam("检测速度", "", this->getName().c_str(), v * 0.001));
        i += 4;
        return (int)params.size();
SourceCode/Bond/Servo/CProcessData.cpp
@@ -15,6 +15,16 @@
    }
    short CProcessData::getCassetteSequenceNo()
    {
        return m_nCassetteSequenceNo;
    }
    short CProcessData::getJobSequenceNo()
    {
        return m_nJobSequenceNo;
    }
    std::string& CProcessData::getGlassId()
    {
        return m_strGlassId;
@@ -40,14 +50,9 @@
        return m_nTotalParameter;
    }
    const std::list<std::string>& CProcessData::getParameters()
    std::vector<uint8_t>& CProcessData::getParamsRawData()
    {
        return m_params;
    }
    void CProcessData::getParameters(std::list<std::string>& list)
    {
        std::copy(m_params.begin(), m_params.end(), std::back_inserter(list));
        return m_paramsRawData;
    }
    int CProcessData::serialize(char* pszBuffer, int nBufferSize)
@@ -57,6 +62,12 @@
        // 解释数据
        // Glass ID
        int index = 0;
        memcpy(&pszBuffer[index], &m_nCassetteSequenceNo, sizeof(short));
        index += sizeof(short);
        memcpy(&pszBuffer[index], &m_nJobSequenceNo, sizeof(short));
        index += sizeof(short);
        CToolUnits::convertString(&pszBuffer[index], 10 * 2, m_strGlassId);
        index += 10 * 2;
@@ -80,17 +91,9 @@
        m_nCurrentGroup = (unsigned int)CToolUnits::toInt16(&pszBuffer[index]);
        index += 2;
        // param list(0x1881~0x1a74), 共1000 bytes, 20个字符为一个参数, 50组
        // 最后一group可能不满足50, 以m_nTotalParameter为依据
        int size = (m_nCurrentGroup == m_nTotalGroup) ? m_nTotalParameter % 50 : 50;
        for (int i = 0; i < size; i++) {
            std::string strParam;
            CToolUnits::convertString(&pszBuffer[index], 20, strParam);
            if (!strParam.empty()) {
                m_params.push_back(strParam);
            }
            index += 20;
        }
        // 解释数据
        return 538 * 2;
    }
@@ -100,6 +103,12 @@
        if (nBufferSize < 538 * 2) return -1;
        int index = 0;
        memcpy(&m_nCassetteSequenceNo, &pszBuffer[index], sizeof(short));
        index += sizeof(short);
        memcpy(&m_nJobSequenceNo, &pszBuffer[index], sizeof(short));
        index += sizeof(short);
        CToolUnits::convertString(&pszBuffer[index], 10 * 2, m_strGlassId);
        index += 10 * 2;
@@ -118,7 +127,12 @@
        memcpy(&m_nCurrentGroup, &pszBuffer[index], sizeof(short));
        index += sizeof(short);
        // 多分组如何处理?待考虑
        // 参数原始数据
        m_paramsRawData.clear();
        m_paramsRawData.insert(
            m_paramsRawData.end(),
            reinterpret_cast<const uint8_t*>(&pszBuffer[index]),
            reinterpret_cast<const uint8_t*>(&pszBuffer[index]) + 500);
        return 538 * 2;
@@ -139,13 +153,5 @@
            std::to_string(m_nTotalGroup).c_str(), "", weight++));
        attrubutes.addAttribute(new CAttribute("Current Group",
            std::to_string(m_nCurrentGroup).c_str(), "", weight++));
        char szName[256];
        int index = 0;
        for (auto item : m_params) {
            sprintf_s(szName, 256, "Parameter %d", ++index);
            attrubutes.addAttribute(new CAttribute(szName,
                item.c_str(), "", weight++));
        }
    }
}
SourceCode/Bond/Servo/CProcessData.h
@@ -1,6 +1,7 @@
#pragma once
#include <list>
#include "CAttributeVector.h"
#include "CParam.h"
namespace SERVO {
@@ -11,25 +12,28 @@
        virtual ~CProcessData();
    public:
        short getCassetteSequenceNo();
        short getJobSequenceNo();
        std::string& getGlassId();
        void setGlassId(const char* pszId);
        std::string& getStartTime();
        std::string& getEndTime();
        unsigned int getTotalParameter();
        const std::list<std::string>& getParameters();
        void getParameters(std::list<std::string>& list);
        std::vector<uint8_t>& getParamsRawData();
        int serialize(char* pszBuffer, int nBufferSize);
        int unserialize(const char* pszBuffer, int nBufferSize);
        void getAttributeVector(CAttributeVector& attrubutes, int beginWeight);
    private:
        short m_nCassetteSequenceNo;
        short m_nJobSequenceNo;
        std::string m_strGlassId;
        std::string m_strStartTime;
        std::string m_strEndTime;
        unsigned int m_nTotalParameter;
        unsigned int m_nTotalGroup;
        unsigned int m_nCurrentGroup;
        std::list<std::string> m_params;
        std::vector<uint8_t> m_paramsRawData;
    };
}
SourceCode/Bond/Servo/CVacuumBake.cpp
@@ -420,40 +420,40 @@
        // 1.A_腔加热时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("A_腔加热时间", "", "", v * 0.1f));
        params.push_back(CParam("A_腔加热时间", "", this->getName().c_str(), v * 0.1f));
        i += 2;
        // 2.B_腔加热时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("B_腔加热时间", "", "", v * 0.1f));
        params.push_back(CParam("B_腔加热时间", "", this->getName().c_str(), v * 0.1f));
        i += 2;
        // 3.A_腔破真空时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("A_腔破真空时间", "", "", v * 0.01f));
        params.push_back(CParam("A_腔破真空时间", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 4.B_腔破真空时间
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
        params.push_back(CParam("B_腔破真空时间", "", "", v * 0.01f));
        params.push_back(CParam("B_腔破真空时间", "", this->getName().c_str(), v * 0.01f));
        i += 2;
        // 5.A_腔真空到达值
        params.push_back(CParam("A_腔真空到达值", "", "", (double)toFloat(&pszData[i])));
        params.push_back(CParam("A_腔真空到达值", "", this->getName().c_str(), (double)toFloat(&pszData[i])));
        i += 4;
        // 6.B_腔真空到达值
        params.push_back(CParam("B_腔真空到达值", "", "", (double)toFloat(&pszData[i])));
        params.push_back(CParam("B_腔真空到达值", "", this->getName().c_str(), (double)toFloat(&pszData[i])));
        i += 4;
        // 7.A_腔温控表主控温度设定
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("A_腔温控表主控温度设定", "", "", v * 0.1f));
        params.push_back(CParam("A_腔温控表主控温度设定", "", this->getName().c_str(), v * 0.1f));
        i += 4;
        // 8.B_腔温控表主控温度设定
        v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
        params.push_back(CParam("B_腔温控表主控温度设定", "", "", v * 0.1f));
        params.push_back(CParam("B_腔温控表主控温度设定", "", this->getName().c_str(), v * 0.1f));
        i += 4;