已添加1个文件
已修改17个文件
已删除1个文件
191 ■■■■ 文件已修改
.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.7.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CArm.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CArmTray.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CBakeCooling.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CBonder.cpp 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.cpp 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CGlass.cpp 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CGlass.h 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CLoadPort.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.cpp 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPath.cpp 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPath.h 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CSlot.cpp 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Model.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ServoDlg.cpp 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/x64/Debug/EqsGraph.ini 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/x64/Debug/Master.dat 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -52,3 +52,4 @@
SourceCode/Bond/x64/Debug/Backups/
Document/共享文件夹/
Document/共享文件夹.rar
SourceCode/Bond/x64/Debug/Master.dat
Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.7.xlsx
Binary files differ
SourceCode/Bond/Servo/CArm.cpp
@@ -106,6 +106,10 @@
        pGlass = pPreviousGlass;
        pGlass->addRef();
        m_slot[0].setContext(nullptr);
        CGlass* pBuddy = pGlass->getBuddy();
        if (pBuddy != nullptr) {
            m_slot[1].setContext(nullptr);
        }
        Unlock();
        if (m_listener.onDataChanged != nullptr) {
SourceCode/Bond/Servo/CArmTray.cpp
@@ -41,6 +41,10 @@
        m_slot[0].setPosition(m_nID);
        m_slot[0].setNo(1);
        m_slot[0].setName("Slot 1");
        m_slot[1].enable();
        m_slot[1].setPosition(m_nID);
        m_slot[1].setNo(2);
        m_slot[1].setName("Slot 2");
    }
    void CArmTray::onTimer(UINT nTimerid)
SourceCode/Bond/Servo/CBakeCooling.h
@@ -21,6 +21,7 @@
        virtual void getAttributeVector(CAttributeVector& attrubutes);
        virtual int recvIntent(CPin* pPin, CIntent* pIntent);
        virtual int getIndexerOperationModeBaseValue();
        virtual short getSlotUnit(short slot) { return slot <= 2 ? 0 : 1; };
    };
}
SourceCode/Bond/Servo/CBonder.cpp
@@ -390,6 +390,11 @@
        Lock();
        CGlass* pGlass1 = getGlassFromSlot(1);
        CGlass* pGlass2 = getGlassFromSlot(2);
        if (pGlass1 == nullptr || pGlass2 == nullptr) {
            LOGE("<CBonder-%s>onProcessData,错误!不满足两片玻璃且分别为G1与G2的条件,请检查数据是否正确!", m_strName.c_str());
            Unlock();
            return -1;
        }
        if (pGlass1->getBuddy() != nullptr || pGlass2->getBuddy() != nullptr) {
            LOGE("<CBonder-%s>onProcessData,错误!玻璃较早前已被绑定,请检查数据是否正确!", m_strName.c_str());
            Unlock();
SourceCode/Bond/Servo/CEquipment.cpp
@@ -756,7 +756,7 @@
        return 0;
    }
    int CEquipment::storedJob(CJobDataB* pJobDataB, short& putSlot)
    int CEquipment::storedJob(CJobDataB* pJobDataB, short putSlot)
    {
        if (m_pArm == nullptr) {
            return -1;
@@ -770,23 +770,26 @@
        ASSERT(pGlass);
        Lock();
        pGlass->addPath(m_nID);
        pGlass->addPath(m_nID, getSlotUnit(putSlot));
        m_slot[putSlot - 1].setContext(pGlass);
        pGlass->release();                // tempFetchOut需要调用一次release
        Unlock();
        // 如果此玻璃已经贴合,贴合的玻璃也要从加入到列表中
        /*
        CGlass* pBuddy = pGlass->getBuddy();
        if (pBuddy != nullptr) {
            Lock();
            pBuddy->addPath(m_nID);
            pBuddy->addRef();                    // 加入list,addRef
            m_glassList.push_back(pBuddy);
            pBuddy->addPath(m_nID, 0);
            if (putSlot % 2 == 0) {
                m_slot[putSlot - 2].setContext(pBuddy);
            }
            else {
                m_slot[putSlot].setContext(pBuddy);
            }
            Unlock();
        }
        */
        if (m_listener.onDataChanged != nullptr) {
            m_listener.onDataChanged(this, EDCC_STORED_JOB);
@@ -1115,7 +1118,7 @@
            MaterialsType glassType = pGlass->getType();
            if (glassType == MaterialsType::G1 && putSlotType == MaterialsType::G2) continue;
            if (glassType == MaterialsType::G2 && putSlotType == MaterialsType::G1) continue;
            if (!pGlass->isProcessed(m_nID)) continue;
            if (!pGlass->isProcessed(m_nID, 0)) continue;
            return &m_slot[i];
        }
@@ -1438,10 +1441,6 @@
    int CEquipment::onProcessData(CProcessData* pProcessData)
    {
        LOGI("<CEquipment-%s>onProcessData.", m_strName.c_str());
        CGlass* pGlass = getGlass(pProcessData->getGlassId().c_str());
        if (pGlass != nullptr) {
            pGlass->processEnd(m_nID);
        }
        return 0;
    }
SourceCode/Bond/Servo/CEquipment.h
@@ -101,12 +101,13 @@
        virtual void onReceiveLBData(const char* pszData, size_t size);
        virtual int onStepEvent(CStep* pStep, int code);
        virtual CPin* addPin(PinType type, char* pszName);
        virtual short getSlotUnit(short slot) { return 0; };
        CPin* getPin(char* pszName);
        std::vector<CPin*>& CEquipment::getInputPins();
        std::vector<CPin*>& CEquipment::getOutputPins();
        virtual int recvIntent(CPin* pPin, CIntent* pIntent);
        virtual int fetchedOutJob(CJobDataB* pJobDataB);
        virtual int storedJob(CJobDataB* pJobDataB, short& putSlot);
        virtual int storedJob(CJobDataB* pJobDataB, short putSlot);
        virtual int onReceivedJob(int port, CJobDataS* pJobDataS);
        virtual int onSentOutJob(int port, CJobDataS* pJobDataS);
        virtual BOOL onPreFetchedOutJob(int port, CJobDataB* pJobDataB);
SourceCode/Bond/Servo/CGlass.cpp
@@ -66,29 +66,16 @@
        return m_strID;
    }
    CPath* CGlass::getPathWithSiteID(unsigned int nSiteId)
    {
        CPath* pPath = m_pPath;
        while (pPath != nullptr) {
            if (nSiteId == pPath->getSiteID()) {
                return pPath;
            }
            pPath = pPath->getNext();
        }
        return nullptr;
    }
    CPath* CGlass::getPath()
    {
        return m_pPath;
    }
    CPath* CGlass::getPathWithSiteId(unsigned int nSiteId)
    CPath* CGlass::getPathWithEq(unsigned int nEqId, unsigned int nUnit)
    {
        CPath* pTemp = m_pPath;
        while (pTemp != nullptr) {
            if (pTemp->getSiteID() == nSiteId) {
            if (pTemp->getEqID() == nEqId && pTemp->getUnit() == nUnit) {
                return pTemp;
            }
@@ -98,9 +85,9 @@
        return nullptr;
    }
    void CGlass::addPath(unsigned int nSiteId)
    void CGlass::addPath(unsigned int nEqId, unsigned int nUnit)
    {
        CPath* pPath = new CPath(nSiteId);
        CPath* pPath = new CPath(nEqId, nUnit);
        if (m_pPath == nullptr) {
            m_pPath = pPath;
        }
@@ -197,17 +184,17 @@
        return m_strBuddyId;
    }
    void CGlass::processEnd(unsigned int nSiteId)
    void CGlass::processEnd(unsigned int nEqId, unsigned int nUnit)
    {
        CPath* pPath = getPathWithSiteID(nSiteId);
        CPath* pPath = getPathWithEq(nEqId, nUnit);
        if (pPath != nullptr) {
            pPath->processEnd();
        }
    }
    BOOL CGlass::isProcessed(unsigned int nSiteId)
    BOOL CGlass::isProcessed(unsigned int nEqId, unsigned int nUnit)
    {
        CPath* pPath = getPathWithSiteID(nSiteId);
        CPath* pPath = getPathWithEq(nEqId, nUnit);
        if (pPath == nullptr) return FALSE;
        return pPath->isProcessEnd();
SourceCode/Bond/Servo/CGlass.h
@@ -24,10 +24,9 @@
        void setType(MaterialsType type);
        void setID(const char* pszID);
        std::string& getID();
        CPath* getPathWithSiteID(unsigned int nSiteId);
        CPath* getPathWithEq(unsigned int nEqId, unsigned int nUnit);
        CPath* getPath();
        CPath* getPathWithSiteId(unsigned int nSiteId);
        void addPath(unsigned int nSiteId);
        void addPath(unsigned int nEqId, unsigned int nUnit);
        void serialize(CArchive& ar);
        void setJobDataB(CJobDataB* pJobDataB);
        CJobDataB* getJobDataB();
@@ -36,8 +35,8 @@
        BOOL setBuddy(CGlass* pGlass);
        CGlass* getBuddy();
        std::string& getBuddyId();
        void processEnd(unsigned int nSiteId);
        BOOL isProcessed(unsigned int nSiteId);
        void processEnd(unsigned int nEqId, unsigned int nUnit);
        BOOL isProcessed(unsigned int nEqId, unsigned int nUnit);
    private:
        MaterialsType m_type;
SourceCode/Bond/Servo/CLoadPort.cpp
@@ -1097,8 +1097,8 @@
            }
            CGlass* pGlass = theApp.m_model.m_glassPool.allocaGlass();
            pGlass->addPath(m_nID);
            pGlass->processEnd(m_nID);
            pGlass->addPath(m_nID, 0);
            pGlass->processEnd(m_nID, 0);
            pGlass->setID(szBuffer);
            pGlass->setJobDataB(&jb);
            pGlass->setType(type);
SourceCode/Bond/Servo/CMaster.cpp
@@ -373,7 +373,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -384,7 +384,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -396,7 +396,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -407,7 +407,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -421,7 +421,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -432,7 +432,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -452,7 +452,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -463,7 +463,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -477,7 +477,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -488,7 +488,7 @@
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 0);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
@@ -669,7 +669,7 @@
                    lock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, 1);
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_FINISH);
                    }
                    delete m_pActiveRobotTask;
                    m_pActiveRobotTask = nullptr;
SourceCode/Bond/Servo/CPath.cpp
@@ -6,7 +6,7 @@
namespace SERVO {
    CPath::CPath()
    {
        m_nSiteID = 0;
        m_nEqID = 0;
        m_timeOut = 0;
        m_timeIn = CToolUnits::getTimestamp();
        m_bProcessed = FALSE;
@@ -14,9 +14,10 @@
        m_pNext = nullptr;
    }
    CPath::CPath(unsigned int nSiteId)
    CPath::CPath(unsigned int nEqId, unsigned int nUnit)
    {
        m_nSiteID = nSiteId;
        m_nEqID = nEqId;
        m_nUnit = nUnit;
        m_timeOut = 0;
        m_timeIn = CToolUnits::getTimestamp();
        m_pPrev = nullptr;
@@ -32,8 +33,10 @@
    void CPath::getDescription(std::string& strOut)
    {
        strOut.clear();
        strOut = "CPath<SiteID:";
        strOut = strOut + std::to_string(m_nSiteID);
        strOut = "CPath<EqID:";
        strOut = strOut + std::to_string(m_nEqID);
        strOut = strOut + ",Unit:";
        strOut = strOut + std::to_string(m_nUnit);
        strOut = strOut + ",InTime:";
        strOut = strOut + CToolUnits::timeToString2(m_timeIn);
        strOut = strOut + ",OutTime:";
@@ -44,7 +47,8 @@
    void CPath::serialize(CArchive& ar)
    {
        if (ar.IsStoring()) {
            ar << m_nSiteID;
            ar << m_nEqID;
            ar << m_nUnit;
            ar << m_timeIn;
            ar << m_timeOut;
            ar << m_bProcessed;
@@ -54,7 +58,8 @@
            }
        }
        else {
            ar >> m_nSiteID;
            ar >> m_nEqID;
            ar >> m_nUnit;
            ar >> m_timeIn;
            ar >> m_timeOut;
            ar >> m_bProcessed;
@@ -69,9 +74,14 @@
        }
    }
    unsigned int CPath::getSiteID()
    unsigned int CPath::getEqID()
    {
        return m_nSiteID;
        return m_nEqID;
    }
    unsigned int CPath::getUnit()
    {
        return m_nUnit;
    }
    ULONGLONG CPath::getInTime()
SourceCode/Bond/Servo/CPath.h
@@ -6,7 +6,7 @@
    {
    public:
        CPath();
        CPath(unsigned int nSiteId);
        CPath(unsigned int nEqId, unsigned int nUnit);
        virtual ~CPath();
    public:
@@ -17,7 +17,8 @@
        void addPath(CPath* pPath);
        CPath* getTailPath();
        CPath* getHeadPath();
        unsigned int getSiteID();
        unsigned int getEqID();
        unsigned int getUnit();
        ULONGLONG getInTime();
        void setOutTime(ULONGLONG time);
        ULONGLONG getOutTime();
@@ -25,7 +26,8 @@
        BOOL isProcessEnd();
    private:    
        unsigned int m_nSiteID;
        unsigned int m_nEqID;
        unsigned int m_nUnit;
        ULONGLONG m_timeIn;
        ULONGLONG m_timeOut;
        BOOL m_bProcessed;
SourceCode/Bond/Servo/CSlot.cpp
@@ -122,23 +122,12 @@
    void CSlot::serialize(CArchive& ar)
    {
        if (ar.IsStoring()) {
            ar << m_nPosition;
            ar << m_nNo;
            ar << (int)m_materialsType;
            WriteString(ar, m_strName);
            ar << (__int64)m_pContext;
            ar << m_bEnable;
            ar << m_bLock;
        }
        else {
            int i32;
            __int64 i64;
            ar >> m_nPosition;
            ar >> m_nNo;
            ar >> i32; m_materialsType = (MaterialsType)i32;
            ReadString(ar, m_strName);
            ar >> i64; m_pTempContext = (CContext*)i64;
            ar >> m_bEnable;
            ar >> m_bLock;
        }
    }
SourceCode/Bond/Servo/Model.cpp
@@ -248,7 +248,7 @@
        int nRecordId = 0;
        TransferManager::getInstance().addTransferRecord(data, nRecordId);
        notifyPtr(RX_CODE_EQ_ROBOT_TASK, pTask);
        notifyPtrAndInt(RX_CODE_EQ_ROBOT_TASK, pTask, nullptr, code);
        LOGI("<CModel>onRobotTaskEvent: 任务记录已保存,RecordID=%d", nRecordId);
    };
    m_master.setListener(masterListener);
SourceCode/Bond/Servo/ServoDlg.cpp
@@ -188,21 +188,26 @@
                }
            }
            else if (RX_CODE_EQ_ROBOT_TASK == code) {
                SERVO::CRobotTask* pTask = theApp.m_model.getMaster().getActiveRobotTask();
                if (m_pRobotTaskDlg != nullptr) {
                    m_pRobotTaskDlg->SetRobotTask(pTask);
                }
                if (pTask == nullptr) {
                    m_pMyStatusbar->setCurTaskBtnText("无");
                }
                else {
                    SERVO::CEquipment* pEq1, * pEq2;
                    pEq1 = theApp.m_model.getMaster().getEquipment(pTask->getSrcPosition());
                    pEq2 = theApp.m_model.getMaster().getEquipment(pTask->getTarPosition());
                    if (pEq1 != nullptr && pEq2 != nullptr) {
                        CString strText;
                        strText.Format(_T("%s --> %s"), pEq1->getName().c_str(), pEq2->getName().c_str());
                        m_pMyStatusbar->setCurTaskBtnText((LPTSTR)(LPCTSTR)strText);
                int exCode;
                if (pAny->getIntValue("exCode", exCode)) {
                    if (exCode == ROBOT_EVENT_CREATE) {
                        SERVO::CRobotTask* pTask = theApp.m_model.getMaster().getActiveRobotTask();
                        ASSERT(pTask);
                        if (m_pRobotTaskDlg) {
                            m_pRobotTaskDlg->SetRobotTask(pTask);
                        }
                        SERVO::CEquipment* pEq1, * pEq2;
                        pEq1 = theApp.m_model.getMaster().getEquipment(pTask->getSrcPosition());
                        pEq2 = theApp.m_model.getMaster().getEquipment(pTask->getTarPosition());
                        if (pEq1 != nullptr && pEq2 != nullptr) {
                            CString strText;
                            strText.Format(_T("%s --> %s"), pEq1->getName().c_str(), pEq2->getName().c_str());
                            m_pMyStatusbar->setCurTaskBtnText((LPTSTR)(LPCTSTR)strText);
                        }
                    }
                    else if (exCode == ROBOT_EVENT_FINISH) {
                        m_pMyStatusbar->setCurTaskBtnText("无");
                    }
                }
            }
SourceCode/Bond/x64/Debug/EqsGraph.ini
@@ -39,7 +39,7 @@
Top=63
[Arm Tray2]
Left=467
Top=166
Top=167
[Fliper(G2)]
Left=238
Top=251
SourceCode/Bond/x64/Debug/Master.dat
Binary files differ