1.初步去掉GlassList, 替换为Slot,待测;
| | |
| | | { |
| | | return __super::recvIntent(pPin, pIntent); |
| | | } |
| | | |
| | | BOOL CAligner::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | BOOL bRet = __super::glassWillArrive(pGlass); |
| | | if (!bRet) { |
| | | return FALSE; |
| | | } |
| | | |
| | | return m_glassList.empty(); |
| | | } |
| | | |
| | | BOOL CAligner::onPreStoredJob(int port, CJobDataB* pJobDataB) |
| | | { |
| | | CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | if (pJobDataS == nullptr) { |
| | | LOGE("<CAligner-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(), |
| | | pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | return FALSE; |
| | | } |
| | | |
| | | // 只能一片一片的对位 |
| | | Lock(); |
| | | if (!m_glassList.empty()) { |
| | | Unlock(); |
| | | LOGE("<CEquipment-%s>onPreFetchedOutJob,当前机器或单元存在玻璃片,不能进料,请注意风险!", m_strName.c_str()); |
| | | return FALSE; |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | } |
| | |
| | | virtual void serialize(CArchive& ar); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB); |
| | | }; |
| | | } |
| | | |
| | |
| | | // 必须要实现的虚函数,在此初始化Slot信息 |
| | | void CArm::initSlots() |
| | | { |
| | | |
| | | m_slot[0].enable(); |
| | | m_slot[0].setPosition(m_nID); |
| | | m_slot[0].setNo(1); |
| | | m_slot[0].setName("Slot 1(Temp)"); |
| | | m_slot[1].enable(); |
| | | m_slot[1].setPosition(m_nID); |
| | | m_slot[1].setNo(2); |
| | | m_slot[1].setName("Slot 2(Temp)"); |
| | | } |
| | | |
| | | void CArm::onTimer(UINT nTimerid) |
| | |
| | | // 原:保证列表中只存储一个物料 |
| | | // 修改为:先清空之前的,再添加当前pGlass, 如果pGlass有buddy,也要加入列表中 |
| | | Lock(); |
| | | for (auto item : m_glassList) { |
| | | item->release(); |
| | | CGlass* pPreviousGlass; |
| | | pPreviousGlass = (CGlass*)m_slot[0].getContext(); |
| | | if (pPreviousGlass != nullptr) { |
| | | pPreviousGlass->release(); |
| | | } |
| | | m_glassList.clear(); |
| | | addGlassToList(pGlass); |
| | | pPreviousGlass = (CGlass*)m_slot[1].getContext(); |
| | | if (pPreviousGlass != nullptr) { |
| | | pPreviousGlass->release(); |
| | | } |
| | | |
| | | m_slot[0].setContext(pGlass); |
| | | if (pGlass->getBuddy() != nullptr) { |
| | | addGlassToList(pGlass->getBuddy()); |
| | | m_slot[1].setContext(pGlass->getBuddy()); |
| | | } |
| | | Unlock(); |
| | | |
| | |
| | | int CArm::tempFetchOut(OUT CGlass*& pGlass) |
| | | { |
| | | Lock(); |
| | | if (m_glassList.empty()) { |
| | | CGlass* pPreviousGlass = (CGlass*)m_slot[0].getContext(); |
| | | if (pPreviousGlass == nullptr) { |
| | | Unlock(); |
| | | return -1; |
| | | } |
| | | |
| | | pGlass = m_glassList.front(); |
| | | pGlass = pPreviousGlass; |
| | | pGlass->addRef(); |
| | | for (auto item : m_glassList) { |
| | | item->release(); |
| | | } |
| | | m_glassList.clear(); |
| | | m_slot[0].setContext(nullptr); |
| | | Unlock(); |
| | | |
| | | if (m_listener.onDataChanged != nullptr) { |
| | |
| | | return __super::recvIntent(pPin, pIntent); |
| | | } |
| | | |
| | | BOOL CBakeCooling::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | BOOL bRet = __super::glassWillArrive(pGlass); |
| | | if (!bRet) { |
| | | return FALSE; |
| | | } |
| | | |
| | | return (m_glassList.size() < 4); |
| | | } |
| | | |
| | | int CBakeCooling::getIndexerOperationModeBaseValue() |
| | | { |
| | | return 25000; |
| | |
| | | virtual void serialize(CArchive& ar); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual int getIndexerOperationModeBaseValue(); |
| | | }; |
| | | } |
| | |
| | | return __super::recvIntent(pPin, pIntent); |
| | | } |
| | | |
| | | BOOL CBonder::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | BOOL bRet = __super::glassWillArrive(pGlass); |
| | | if (!bRet) { |
| | | return FALSE; |
| | | } |
| | | |
| | | return m_glassList.empty(); |
| | | } |
| | | |
| | | void CBonder::setIndex(unsigned int index) |
| | | { |
| | | m_nIndex = index; |
| | |
| | | return m_nIndex; |
| | | } |
| | | |
| | | BOOL CBonder::onPreStoredJob(int port, CJobDataB* pJobDataB) |
| | | { |
| | | CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | if (pJobDataS == nullptr) { |
| | | LOGE("<CBonder-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(), |
| | | pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | return FALSE; |
| | | } |
| | | |
| | | // 如果为空,可以进G1或G2 |
| | | // 如果有一片玻璃,当前玻璃为G1则可进G2, 当前玻璃为G2则可进G1 |
| | | BOOL bCheck = FALSE; |
| | | Lock(); |
| | | size_t size = m_glassList.size(); |
| | | if (size == 0) { |
| | | bCheck = TRUE; |
| | | } |
| | | else if (size == 1) { |
| | | CGlass* pGlass = m_glassList.front(); |
| | | if ((pGlass->getType() == MaterialsType::G1 && pJobDataS->getMaterialsType() == (int)MaterialsType::G2) |
| | | || (pGlass->getType() == MaterialsType::G2 && pJobDataS->getMaterialsType() == (int)MaterialsType::G1)) { |
| | | bCheck = TRUE; |
| | | } |
| | | } |
| | | Unlock(); |
| | | |
| | | if (!bCheck) { |
| | | LOGE("<CEquipment-%s>onPreFetchedOutJob,当前机器不满足进料条件,或已存在两片玻璃,或G2与G1不匹配,请注意风险!", m_strName.c_str()); |
| | | } |
| | | |
| | | return bCheck; |
| | | } |
| | | |
| | | int CBonder::onProcessData(CProcessData* pProcessData) |
| | | { |
| | | CEquipment::onProcessData(pProcessData); |
| | |
| | | |
| | | // 检查数据,当前两片玻璃,一片为G1, 一片为G2, 且pProcessData中的id能匹配G1或G2 |
| | | Lock(); |
| | | if (m_glassList.size() != 2) { |
| | | Unlock(); |
| | | LOGE("<CBonder-%s>onProcessData,绑定失败,腔体内必须有且仅有两片玻璃!", m_strName.c_str()); |
| | | return -1; |
| | | } |
| | | |
| | | CGlass* pGlass1 = m_glassList.front(); |
| | | CGlass* pGlass2 = m_glassList.back(); |
| | | Unlock(); |
| | | |
| | | CGlass* pGlass1 = getGlassFromSlot(1); |
| | | CGlass* pGlass2 = getGlassFromSlot(2); |
| | | if (pGlass1->getBuddy() != nullptr || pGlass2->getBuddy() != nullptr) { |
| | | LOGE("<CBonder-%s>onProcessData,错误!玻璃较早前已被绑定,请检查数据是否正确!", m_strName.c_str()); |
| | | Unlock(); |
| | | return -1; |
| | | } |
| | | |
| | | if (pGlass1->getBuddy() != nullptr || pGlass2->getBuddy() != nullptr) { |
| | | LOGE("<CBonder-%s>onProcessData,错误!玻璃较早前已被贴合,请检查数据是否正确!", m_strName.c_str()); |
| | | Unlock(); |
| | | return -1; |
| | | } |
| | | |
| | | if (pGlass1->getType() == pGlass2->getType()) { |
| | | LOGE("<CBonder-%s>onProcessData,错误!两片玻璃未匹配,必须分别为G1和G2类型,请检查数据是否正确!", m_strName.c_str()); |
| | | Unlock(); |
| | | return -1; |
| | | } |
| | | |
| | |
| | | pGlass2->setBuddy(pGlass1); |
| | | LOGE("<CBonder-%s>onProcessData,%s和%s已贴合!", m_strName.c_str(), |
| | | pGlass1->getID().c_str(), pGlass2->getID().c_str()); |
| | | Unlock(); |
| | | |
| | | return 0; |
| | | } |
| | |
| | | virtual void serialize(CArchive& ar); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB); |
| | | virtual int onProcessData(CProcessData* pProcessData); |
| | | virtual int getIndexerOperationModeBaseValue(); |
| | | |
| | |
| | | return __super::recvIntent(pPin, pIntent); |
| | | } |
| | | |
| | | BOOL CEFEM::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | BOOL bRet = __super::glassWillArrive(pGlass); |
| | | if (!bRet) { |
| | | return FALSE; |
| | | } |
| | | |
| | | return m_glassList.empty(); |
| | | } |
| | | |
| | | void CEFEM::onReceiveLBData(const char* pszData, size_t size) |
| | | { |
| | | __super::onReceiveLBData(pszData, size); |
| | |
| | | virtual void serialize(CArchive& ar); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual void onReceiveLBData(const char* pszData, size_t size); |
| | | virtual int onReceivedJob(int port, CJobDataS* pJobDataS); |
| | | virtual int onSentOutJob(int port, CJobDataS* pJobDataS); |
| | |
| | | |
| | | CEquipment::~CEquipment() |
| | | { |
| | | for (auto item : m_glassList) { |
| | | item->release(); |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | CContext* pContext = m_slot[i].getContext(); |
| | | if (pContext != nullptr) { |
| | | pContext->release(); |
| | | m_slot[i].setContext(nullptr); |
| | | } |
| | | m_glassList.clear(); |
| | | } |
| | | |
| | | for (auto item : m_mapStep) { |
| | | delete item.second; |
| | |
| | | { |
| | | initPins(); |
| | | initSteps(); |
| | | initSlots(); |
| | | for (auto item : m_mapStep) { |
| | | item.second->init(); |
| | | } |
| | |
| | | std::to_string((int)item->getType()).c_str(), "", weight++)); |
| | | } |
| | | |
| | | for (auto item : m_glassList) { |
| | | attrubutes.addAttribute(new CAttribute("Glass", |
| | | item->getID().c_str(), "", weight++)); |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | | |
| | | CGlass* pGlass = (CGlass*)m_slot[i].getContext(); |
| | | if (pGlass == nullptr) { |
| | | attrubutes.addAttribute(new CAttribute(m_slot[i].getName().c_str(), |
| | | "", "", weight++)); |
| | | } |
| | | else { |
| | | attrubutes.addAttribute(new CAttribute(m_slot[i].getName().c_str(), |
| | | pGlass->getID().c_str(), "", weight++)); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (ar.IsStoring()) { |
| | | Lock(); |
| | | int count = (int)m_glassList.size(); |
| | | ar << count; |
| | | for (auto item : m_glassList) { |
| | | item->serialize(ar); |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | m_slot[i].serialize(ar); |
| | | } |
| | | Unlock(); |
| | | } |
| | | else { |
| | | // addGlassToList前不需要上锁,因其内部有锁 |
| | | int count; |
| | | ar >> count; |
| | | for (int i = 0; i < count; i++) { |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | m_slot[i].serialize(ar); |
| | | if (m_slot[i].getContext() != nullptr) { |
| | | CGlass* pGlass = theApp.m_model.m_glassPool.allocaGlass(); |
| | | pGlass->serialize(ar); |
| | | addGlassToList(pGlass); |
| | | m_slot[i].setContext(pGlass); |
| | | } |
| | | } |
| | | |
| | | // 梳理各玻璃之间的绑定关系 |
| | | /* |
| | | Lock(); |
| | | std::list<CGlass*> list = m_glassList; |
| | | for (auto item : list) { |
| | |
| | | } |
| | | } |
| | | Unlock(); |
| | | */ |
| | | } |
| | | } |
| | | |
| | |
| | | // 测试 |
| | | if (code == FLOW_TEST) { |
| | | AfxMessageBox(pIntent->getMsg()); |
| | | return FLOW_ACCEPT; |
| | | } |
| | | |
| | | |
| | | // 信号 |
| | | if (code == FLOW_SIGNAL) { |
| | | return FLOW_ACCEPT; |
| | | } |
| | | |
| | | |
| | | // 数据 |
| | | if (code == FLOW_SIGNAL) { |
| | | return FLOW_ACCEPT; |
| | | } |
| | | |
| | | |
| | | // 物料 |
| | | if (code == FLOW_MOVE_MATERIAL) { |
| | | CGlass* pGlass = (CGlass*)pIntent->getContext(); |
| | | ASSERT(pGlass); |
| | | if (!glassWillArrive(pGlass)) { |
| | | return FLOW_REJECT; |
| | | } |
| | | return glassArrived(pGlass); |
| | | } |
| | | |
| | | |
| | | |
| | | return FLOW_ACCEPT; |
| | | } |
| | | |
| | | int CEquipment::outputGlass(int port) |
| | | { |
| | | CPin* pOutPin = nullptr; |
| | | if (port == 0) { |
| | | pOutPin = getPin("Out"); |
| | | if (pOutPin == nullptr) { |
| | | pOutPin = getPin("Out1"); |
| | | } |
| | | } |
| | | else if (port == 1) { |
| | | pOutPin = getPin("Out2"); |
| | | } |
| | | if (pOutPin == nullptr) { |
| | | return -1; |
| | | } |
| | | |
| | | |
| | | // 模拟取出第一张Panel,传送到下一环节 |
| | | ULONGLONG time = CToolUnits::getTimestamp(); |
| | | Lock(); |
| | | if (m_glassList.empty()) { |
| | | Unlock(); |
| | | return -2; |
| | | } |
| | | CGlass* pContext = m_glassList.front(); |
| | | pContext->addRef(); |
| | | |
| | | CIntent intent(FLOW_MOVE_MATERIAL, "", pContext); |
| | | int nRet = pOutPin->sendIntent(&intent); |
| | | if (nRet == FLOW_REJECT) { |
| | | LOGE("<CEquipment>对方拒绝接收Intent."); |
| | | } |
| | | else if (nRet == FLOW_ACCEPT) { |
| | | CPath* pPath = pContext->getPathWithSiteID(m_nID); |
| | | if (pPath != nullptr) { |
| | | pPath->setOutTime(time); |
| | | } |
| | | m_glassList.pop_front(); |
| | | pContext->release(); // 添加到列队时addRef, 取出时release |
| | | if (m_listener.onDataChanged != nullptr) { |
| | | m_listener.onDataChanged(this, 0); |
| | | } |
| | | } |
| | | |
| | | pContext->release(); |
| | | Unlock(); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | BOOL CEquipment::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | return TRUE; |
| | | } |
| | | |
| | | int CEquipment::glassArrived(CGlass* pGlass) |
| | | { |
| | | Lock(); |
| | | pGlass->addPath(m_nID); |
| | | pGlass->addRef(); |
| | | m_glassList.push_back(pGlass); |
| | | Unlock(); |
| | | |
| | | if (m_listener.onDataChanged != nullptr) { |
| | | m_listener.onDataChanged(this, 0); |
| | | } |
| | | |
| | | return FLOW_ACCEPT; |
| | | } |
| | | |
| | | void CEquipment::addGlassToList(CGlass* pGlass) |
| | | { |
| | | ASSERT(pGlass); |
| | | |
| | | Lock(); |
| | | pGlass->addRef(); |
| | | m_glassList.push_back(pGlass); |
| | | Unlock(); |
| | | |
| | | if (m_listener.onDataChanged != nullptr) { |
| | | m_listener.onDataChanged(this, 0); |
| | | } |
| | | } |
| | | |
| | | CGlass* CEquipment::getGlassFromList(const char* pszId) |
| | | { |
| | | CGlass* pGlass = nullptr; |
| | | Lock(); |
| | | for (auto item : m_glassList) { |
| | | if (item->getID().compare(pszId) == 0) { |
| | | pGlass = item; |
| | | break; |
| | | } |
| | | } |
| | | Unlock(); |
| | | |
| | | return pGlass; |
| | | } |
| | | |
| | | BOOL CEquipment::removeClass(CGlass* pGlass) |
| | | { |
| | | Lock(); |
| | | bool bExist = std::find(m_glassList.begin(), m_glassList.end(), pGlass) != m_glassList.end(); |
| | | if (bExist) { |
| | | pGlass->addPath(EQ_ID_OPERATOR_REMOVE); |
| | | pGlass->release(); |
| | | m_glassList.remove(pGlass); |
| | | } |
| | | Unlock(); |
| | | |
| | | if (bExist && m_listener.onDataChanged != nullptr) { |
| | | m_listener.onDataChanged(this, 0); |
| | | } |
| | | |
| | | return bExist; |
| | | } |
| | | |
| | | void CEquipment::getGlassList(std::list<CGlass*>& list) |
| | | { |
| | | Lock(); |
| | | for (auto item : m_glassList) { |
| | | item->addRef(); |
| | | list.push_back(item); |
| | | } |
| | | Unlock(); |
| | | } |
| | | |
| | | CGlass* CEquipment::getFrontGlass() |
| | | { |
| | | CGlass* pGlass = nullptr; |
| | | |
| | | Lock(); |
| | | if (!m_glassList.empty()) { |
| | | pGlass = m_glassList.front(); |
| | | } |
| | | Unlock(); |
| | | |
| | | return pGlass; |
| | | } |
| | | |
| | | int CEquipment::fetchedOutJob(CJobDataB* pJobDataB) |
| | |
| | | |
| | | // 找到指定的glass id, |
| | | Lock(); |
| | | if (m_glassList.empty()) { |
| | | Unlock(); |
| | | return -2; |
| | | } |
| | | |
| | | CGlass* pContext = nullptr; |
| | | for (auto iter = m_glassList.begin(); iter != m_glassList.end(); iter++) { |
| | | if ((*iter)->getID().compare(pJobDataB->getGlassId()) == 0) { |
| | | pContext = (*iter); |
| | | m_glassList.erase(iter); |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | CGlass* pGlass = (CGlass*)m_slot[i].getContext(); |
| | | if (pGlass != nullptr && compareJobDataB(pJobDataB, pGlass->getJobDataB())) { |
| | | pContext = pGlass; |
| | | m_slot[i].setContext(nullptr); |
| | | break; |
| | | } |
| | | } |
| | |
| | | // 如果此玻璃已经贴合,贴合的玻璃也要从列表中移除 |
| | | CGlass* pBuddy = pContext->getBuddy(); |
| | | if (pBuddy != nullptr) { |
| | | for (auto iter = m_glassList.begin(); iter != m_glassList.end(); iter++) { |
| | | if ((*iter)->getID().compare(pBuddy->getID()) == 0) { |
| | | (*iter)->release(); |
| | | m_glassList.erase(iter); |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | CGlass* pGlass = (CGlass*)m_slot[i].getContext(); |
| | | if (pGlass != nullptr && compareJobDataB(pBuddy->getJobDataB(), pGlass->getJobDataB())) { |
| | | pContext->release(); |
| | | m_slot[i].setContext(nullptr); |
| | | break; |
| | | } |
| | | } |
| | |
| | | |
| | | int CEquipment::storedJob(CJobDataB* pJobDataB) |
| | | { |
| | | /* |
| | | if (m_pArm == nullptr) { |
| | | return -1; |
| | | } |
| | |
| | | if (m_listener.onDataChanged != nullptr) { |
| | | m_listener.onDataChanged(this, 0); |
| | | } |
| | | |
| | | */ |
| | | return 0; |
| | | } |
| | | |
| | | BOOL CEquipment::isGlassListEmpty() |
| | | BOOL CEquipment::hasGlass() |
| | | { |
| | | return m_glassList.empty(); |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (m_slot[i].isEnable() && !m_slot[i].isEmpty()) { |
| | | return TRUE; |
| | | } |
| | | } |
| | | |
| | | return FALSE; |
| | | } |
| | | |
| | | bool CEquipment::isAlarmStep(SERVO::CStep* pStep) |
| | |
| | | return nullptr; |
| | | } |
| | | |
| | | CSlot* CEquipment::getEmptySlot(MaterialsType type) |
| | | CSlot* CEquipment::getAvailableSlotForGlass(MaterialsType type) |
| | | { |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | |
| | | if (glassType == MaterialsType::G2 && putSlotType == MaterialsType::G1) continue; |
| | | |
| | | return &m_slot[i]; |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | CGlass* CEquipment::getGlassFromSlot(int slotNo) |
| | | { |
| | | CSlot* pSlot = nullptr; |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | | if (m_slot[i].getNo() != slotNo) continue; |
| | | pSlot = &m_slot[i]; |
| | | break; |
| | | } |
| | | |
| | | if (pSlot != nullptr) { |
| | | return (CGlass*)pSlot->getContext(); |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | CGlass* CEquipment::getAnyGlass() |
| | | { |
| | | CSlot* pSlot = nullptr; |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | | CGlass* pGlass = (CGlass*)m_slot[i].getContext(); |
| | | if (pGlass == nullptr) continue; |
| | | return pGlass; |
| | | } |
| | | |
| | | return nullptr; |
| | |
| | | { |
| | | LOGI("<CEquipment-%s>onPreStoredJob:port:%d|GlassId:%s", |
| | | m_strName.c_str(), port, pJobDataB->getGlassId().c_str()); |
| | | |
| | | CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | if (pJobDataS == nullptr) { |
| | | LOGE("<CFliper-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(), |
| | | pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | return FALSE; |
| | | } |
| | | |
| | | // 当前不能有任何玻璃,且当前准备进的片是G2 |
| | | Lock(); |
| | | CSlot* pSlot = getAvailableSlotForGlass((MaterialsType)pJobDataS->getMaterialsType()); |
| | | if (pSlot == nullptr) { |
| | | Unlock(); |
| | | LOGE("<CFliper-%s>onPreFetchedOutJob,找不到匹配的Slot,不能进料,请注意风险!", m_strName.c_str()); |
| | | return FALSE; |
| | | } |
| | | Unlock(); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | BOOL CEquipment::compareJobDataB(CJobDataB* pJobDataB1, CJobDataB* pJobDataB2) |
| | | { |
| | | ASSERT(pJobDataB1); |
| | | ASSERT(pJobDataB2); |
| | | |
| | | if (pJobDataB1->getCassetteSequenceNo() != pJobDataB2->getCassetteSequenceNo()) |
| | | return FALSE; |
| | | if (pJobDataB1->getJobSequenceNo() != pJobDataB2->getJobSequenceNo()) |
| | | return FALSE; |
| | | |
| | | return TRUE; |
| | | } |
| | | } |
| | |
| | | std::vector<CPin*>& CEquipment::getInputPins(); |
| | | std::vector<CPin*>& CEquipment::getOutputPins(); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual int outputGlass(int port); |
| | | virtual int glassArrived(CGlass* pGlass); |
| | | virtual int fetchedOutJob(CJobDataB* pJobDataB); |
| | | virtual int storedJob(CJobDataB* pJobDataB); |
| | | virtual int onReceivedJob(int port, CJobDataS* pJobDataS); |
| | |
| | | virtual int onStoredJob(int port, CJobDataB* pJobDataB); |
| | | virtual int onProcessData(CProcessData* pProcessData); |
| | | virtual int getIndexerOperationModeBaseValue(); |
| | | void getGlassList(std::list<CGlass*>& list); |
| | | CGlass* getGlassFromList(const char* pszId); |
| | | CGlass* getFrontGlass(); |
| | | BOOL removeClass(CGlass* pGlass); |
| | | bool isAlarmStep(SERVO::CStep* pStep); |
| | | bool isVcrEventStep(SERVO::CStep* pStep); |
| | | bool isCassetteTransferStateStep(SERVO::CStep* pStep); |
| | |
| | | CSlot* getAvailableSlot(); |
| | | |
| | | // 获取一个指定物料类型(G1,G2,G1&G2)的空槽位 |
| | | CSlot* getEmptySlot(MaterialsType type); |
| | | CSlot* getAvailableSlotForGlass(MaterialsType type); |
| | | |
| | | // 获取一个指定物料类型(G1,G2,G1&G2)的非空槽位 |
| | | CSlot* getNonEmptySlot(MaterialsType type); |
| | | |
| | | public: |
| | | BOOL isGlassListEmpty(); |
| | | // 获取玻璃物料 |
| | | CGlass* getGlassFromSlot(int slotNo); |
| | | CGlass* getAnyGlass(); |
| | | |
| | | // 验证玻璃和槽是否匹配 |
| | | BOOL ValidateGlassSlotMatch(); |
| | | |
| | | // 是否有玻璃 |
| | | BOOL hasGlass(); |
| | | |
| | | // 以下为从CC-Link读取到的Bit标志位检测函数 |
| | | public: |
| | |
| | | inline void Unlock() { LeaveCriticalSection(&m_criticalSection); } |
| | | BOOL isBitOn(const char* pszData, size_t size, int index); |
| | | inline BOOL equalBool(BOOL b1, BOOL b2); |
| | | void addGlassToList(CGlass* pGlass); |
| | | short decodeRecipeListReport(const char* pszData, size_t size); |
| | | short decodeRecipeParameterReport(const char* pszData, size_t size); |
| | | int decodeProcessDataReport(CStep* pStep, const char* pszData, size_t size); |
| | |
| | | int addJobDataS(CJobDataS* pJobDataS); |
| | | int removeJobDataS(int nCassetteSequenceNo, int nJobSequenceNo); |
| | | CJobDataS* getJobDataS(int nCassetteSequenceNo, int nJobSequenceNo); |
| | | BOOL compareJobDataB(CJobDataB* pJobDataB1, CJobDataB* pJobDataB2); |
| | | |
| | | protected: |
| | | EquipmentListener m_listener; |
| | |
| | | MemoryBlock m_blockWriteBit; |
| | | std::vector<CPin*> m_inputPins; |
| | | std::vector<CPin*> m_outputPins; |
| | | std::list<CGlass*> m_glassList; |
| | | |
| | | |
| | | // 以下为从CC-Link读取到的Bit标志位 |
| | |
| | | |
| | | |
| | | ASSERT(m_pEquipment); |
| | | std::list<SERVO::CGlass*> list; |
| | | m_pEquipment->getGlassList(list); |
| | | for (auto item : list) { |
| | | item->addRef(); |
| | | item->release(); // 释放list中的引用 |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | SERVO::CGlass* pGlass = m_pEquipment->getGlassFromSlot(i+1); |
| | | pGlass->addRef(); |
| | | |
| | | SERVO::CGlass* pBuddy = item->getBuddy(); |
| | | SERVO::CGlass* pBuddy = pGlass->getBuddy(); |
| | | int index = m_listCtrl.InsertItem(m_listCtrl.GetItemCount(), _T("")); |
| | | m_listCtrl.SetItemData(index, (DWORD_PTR)item); |
| | | m_listCtrl.SetItemText(index, 1, item->getID().c_str()); |
| | | m_listCtrl.SetItemData(index, (DWORD_PTR)pGlass); |
| | | m_listCtrl.SetItemText(index, 1, pGlass->getID().c_str()); |
| | | if (pBuddy != nullptr) { |
| | | m_listCtrl.SetItemText(index, 2, pBuddy->getID().c_str()); |
| | | } |
| | |
| | | |
| | | void CEquipmentPage2::OnBnClickedButtonRemove() |
| | | { |
| | | /* |
| | | int index = GetSelectedItemIndex(); |
| | | if (index >= 0) { |
| | | SERVO::CGlass* pGlass = (SERVO::CGlass*)m_listCtrl.GetItemData(index); |
| | |
| | | m_listCtrl.DeleteItem(index); |
| | | } |
| | | } |
| | | */ |
| | | } |
| | |
| | | { |
| | | return __super::recvIntent(pPin, pIntent); |
| | | } |
| | | |
| | | BOOL CFliper::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | BOOL bRet = __super::glassWillArrive(pGlass); |
| | | if (!bRet) { |
| | | return FALSE; |
| | | } |
| | | |
| | | return m_glassList.empty(); |
| | | } |
| | | |
| | | BOOL CFliper::onPreStoredJob(int port, CJobDataB* pJobDataB) |
| | | { |
| | | CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | if (pJobDataS == nullptr) { |
| | | LOGE("<CFliper-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(), |
| | | pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | return FALSE; |
| | | } |
| | | |
| | | // 当前不能有任何玻璃,且当前准备进的片是G2 |
| | | Lock(); |
| | | if (!m_glassList.empty()) { |
| | | Unlock(); |
| | | LOGE("<CFliper-%s>onPreFetchedOutJob,当前机器或单元存在玻璃片,不能进料,请注意风险!", m_strName.c_str()); |
| | | return FALSE; |
| | | } |
| | | |
| | | if (pJobDataS->getMaterialsType() != (int)MaterialsType::G2) { |
| | | LOGE("<CFliper-%s>onPreFetchedOutJob,当前机器或单元只能进G2玻璃片,请注意风险!", m_strName.c_str()); |
| | | return FALSE; |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | } |
| | |
| | | virtual void serialize(CArchive& ar); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB); |
| | | }; |
| | | } |
| | | |
| | |
| | | namespace SERVO { |
| | | CJobDataA::CJobDataA() |
| | | { |
| | | |
| | | m_pOwner = nullptr; |
| | | } |
| | | |
| | | CJobDataA::~CJobDataA() |
| | |
| | | |
| | | } |
| | | |
| | | void* CJobDataA::getOwner() |
| | | { |
| | | return m_pOwner; |
| | | } |
| | | |
| | | void CJobDataA::setOwner(void* pOwner) |
| | | { |
| | | m_pOwner = pOwner; |
| | | } |
| | | |
| | | short CJobDataA::getPortNo() |
| | | { |
| | | return m_nPortNo; |
| | |
| | | virtual ~CJobDataA(); |
| | | |
| | | public: |
| | | void* getOwner(); |
| | | void setOwner(void* pOwner); |
| | | short getPortNo(); |
| | | std::string& getCarrierId(); |
| | | std::string& getPruductId(); |
| | |
| | | int unserialize(const char* pszBuffer, int nBufferSize); |
| | | |
| | | private: |
| | | void* m_pOwner; |
| | | short m_nPortNo; |
| | | std::string m_strCarrierId; |
| | | std::string m_pruductId; |
| | |
| | | { |
| | | m_nCassetteSequenceNo = 0; |
| | | m_nJobSequenceNo = 0; |
| | | m_pOwner = nullptr; |
| | | } |
| | | |
| | | CJobDataB::CJobDataB(CJobDataB&& other) noexcept |
| | |
| | | m_nCassetteSequenceNo = pScr->m_nCassetteSequenceNo; |
| | | m_nJobSequenceNo = pScr->m_nJobSequenceNo; |
| | | m_strGlassId = pScr->m_strGlassId; |
| | | m_pOwner = pScr->m_pOwner; |
| | | } |
| | | |
| | | void* CJobDataB::getOwner() |
| | | { |
| | | return m_pOwner; |
| | | } |
| | | |
| | | void CJobDataB::setOwner(void* pOwner) |
| | | { |
| | | m_pOwner = pOwner; |
| | | } |
| | | |
| | | int CJobDataB::getCassetteSequenceNo() |
| | |
| | | virtual ~CJobDataB(); |
| | | |
| | | public: |
| | | void* getOwner(); |
| | | void setOwner(void* pOwner); |
| | | void copy(CJobDataB* pScr); |
| | | int getCassetteSequenceNo(); |
| | | void setCassetteSequenceNo(int no); |
| | |
| | | int unserialize(const char* pszBuffer, int nBufferSize); |
| | | |
| | | private: |
| | | void* m_pOwner; |
| | | int m_nCassetteSequenceNo; |
| | | int m_nJobSequenceNo; |
| | | std::string m_strGlassId; |
| | |
| | | CJobDataC::CJobDataC() |
| | | { |
| | | m_nCassetteSequenceNo = 0; |
| | | m_pOwner = nullptr; |
| | | } |
| | | |
| | | CJobDataC::~CJobDataC() |
| | |
| | | m_nCassetteProcessFlag = 0; |
| | | } |
| | | |
| | | void* CJobDataC::getOwner() |
| | | { |
| | | return m_pOwner; |
| | | } |
| | | |
| | | void CJobDataC::setOwner(void* pOwner) |
| | | { |
| | | m_pOwner = pOwner; |
| | | } |
| | | |
| | | int CJobDataC::getCassetteSequenceNo() |
| | | { |
| | | return m_nCassetteSequenceNo; |
| | |
| | | virtual ~CJobDataC(); |
| | | |
| | | public: |
| | | void* getOwner(); |
| | | void setOwner(void* pOwner); |
| | | int getCassetteSequenceNo(); |
| | | void setCassetteSequenceNo(int no); |
| | | std::string& getCassetteId(); |
| | |
| | | void setMasterRecipe(const char* pszRecipe); |
| | | |
| | | private: |
| | | void* m_pOwner; |
| | | int m_nCassetteSequenceNo; |
| | | std::string m_strCassetteId; |
| | | std::string m_strCassetteJudge; |
| | |
| | | m_nTargetPortNo = 0; |
| | | m_nTargetSlotNo = 0; |
| | | m_pRawData = nullptr; |
| | | m_pOwner = nullptr; |
| | | if (ENABLE_JOBDATAS_RAWDATA) { |
| | | m_pRawData = new char[JOBDATAS_SIZE]; |
| | | serialize(m_pRawData, JOBDATAS_SIZE); |
| | |
| | | m_nSourceSlotNo = pScr->m_nSourceSlotNo; |
| | | m_nTargetPortNo = pScr->m_nTargetPortNo; |
| | | m_nTargetSlotNo = pScr->m_nTargetSlotNo; |
| | | m_pOwner = pScr->m_pOwner; |
| | | } |
| | | |
| | | void* CJobDataS::getOwner() |
| | | { |
| | | return m_pOwner; |
| | | } |
| | | |
| | | void CJobDataS::setOwner(void* pOwner) |
| | | { |
| | | m_pOwner = pOwner; |
| | | } |
| | | |
| | | int CJobDataS::getCassetteSequenceNo() |
| | |
| | | virtual ~CJobDataS(); |
| | | |
| | | public: |
| | | void* getOwner(); |
| | | void setOwner(void* pOwner); |
| | | void copy(CJobDataS* pScr); |
| | | int getCassetteSequenceNo(); |
| | | void setCassetteSequenceNo(int no); |
| | |
| | | |
| | | |
| | | private: |
| | | void* m_pOwner; |
| | | int m_nCassetteSequenceNo; |
| | | int m_nJobSequenceNo; |
| | | std::string m_strLotId; |
| | |
| | | m_slot[2].enable(); |
| | | m_slot[2].setNo(3); |
| | | m_slot[2].setName("Slot 3"); |
| | | m_slot[3].setPosition(m_nID); |
| | | m_slot[3].enable(); |
| | | m_slot[3].setNo(4); |
| | | m_slot[3].setName("Slot 4"); |
| | | m_slot[4].setPosition(m_nID); |
| | | m_slot[4].enable(); |
| | | m_slot[4].setNo(5); |
| | | m_slot[4].setName("Slot 5"); |
| | | m_slot[5].setPosition(m_nID); |
| | | m_slot[5].enable(); |
| | | m_slot[5].setNo(6); |
| | | m_slot[5].setName("Slot 6"); |
| | | } |
| | | |
| | | void CLoadPort::initSteps() |
| | |
| | | int CLoadPort::recvIntent(CPin* pPin, CIntent* pIntent) |
| | | { |
| | | return __super::recvIntent(pPin, pIntent); |
| | | } |
| | | |
| | | int CLoadPort::outputGlass(int port) |
| | | { |
| | | return __super::outputGlass(port); |
| | | } |
| | | |
| | | BOOL CLoadPort::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | BOOL bRet = __super::glassWillArrive(pGlass); |
| | | if (!bRet) { |
| | | return FALSE; |
| | | } |
| | | |
| | | return (m_glassList.size() < 8); |
| | | } |
| | | |
| | | int CLoadPort::sendCassetteCtrlCmd(short cmd, |
| | |
| | | /* |
| | | * 生成测试用的玻璃列表 |
| | | */ |
| | | int CLoadPort::testGenerateGlassList(MaterialsType type, int count, const char* pszPrefix, int startSuffix) |
| | | int CLoadPort::testGenerateGlassList(MaterialsType type, const char* pszPrefix, int startSuffix) |
| | | { |
| | | // 如果非空就不生成了 |
| | | Lock(); |
| | | if (!m_glassList.empty()) { |
| | | if (hasGlass()) { |
| | | Unlock(); |
| | | return -1; |
| | | } |
| | |
| | | |
| | | char szBuffer[64]; |
| | | int suffix = startSuffix; |
| | | for (int i = 0; i < count; i++) { |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | | |
| | | CJobDataB jb; |
| | | CJobDataS js; |
| | | |
| | |
| | | pGlass->setJobDataB(&jb); |
| | | pGlass->setType(type); |
| | | pGlass->setJobDataS(&js); |
| | | addGlassToList(pGlass); |
| | | pGlass->addRef(); |
| | | m_slot[i].setContext(pGlass); |
| | | } |
| | | |
| | | return 0; |
| | |
| | | virtual void serialize(CArchive& ar); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual void onReceiveLBData(const char* pszData, size_t size); |
| | | |
| | | public: |
| | |
| | | int getQTimeFlag(); |
| | | int getCassetteMappingState(); |
| | | int getCassetteStatus(); |
| | | int testGenerateGlassList(MaterialsType type, int count, const char* pszPrefix, int startSuffix); |
| | | int testGenerateGlassList(MaterialsType type, const char* pszPrefix, int startSuffix); |
| | | |
| | | public: |
| | | static std::string& getPortTypeDescription(PortType portType, std::string& strDescription); |
| | |
| | | static std::string& getCassetteStatusDescription(int state, std::string& strDescription); |
| | | |
| | | public: |
| | | virtual int outputGlass(int port); |
| | | int sendCassetteCtrlCmd(short cmd, |
| | | short* jobExistence, |
| | | int jobExistenceSize, |
| | |
| | | return __super::recvIntent(pPin, pIntent); |
| | | } |
| | | |
| | | BOOL CMeasurement::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | BOOL bRet = __super::glassWillArrive(pGlass); |
| | | if (!bRet) { |
| | | return FALSE; |
| | | } |
| | | |
| | | return m_glassList.empty(); |
| | | } |
| | | |
| | | int CMeasurement::getIndexerOperationModeBaseValue() |
| | | { |
| | | return 35000; |
| | |
| | | virtual void serialize(CArchive& ar); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual int getIndexerOperationModeBaseValue(); |
| | | |
| | | }; |
| | |
| | | SERVO::CEquipment* pEquipment = nullptr; |
| | | if (pAny->getPtrValue("ptr", (void*&)pEquipment)) { |
| | | if (pEquipment != nullptr) { |
| | | m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, !pEquipment->isGlassListEmpty()); |
| | | m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, pEquipment->hasGlass()); |
| | | } |
| | | } |
| | | } |
| | |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST1) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | | if (pEquipment->getID() == EQ_ID_LOADPORT1) { |
| | | ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G1, 10, |
| | | ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G1, |
| | | "P20250320G1X", 1); |
| | | } |
| | | else if (pEquipment->getID() == EQ_ID_LOADPORT2) { |
| | | ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G2, 10, |
| | | ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G2, |
| | | "P20250320G2X", 1); |
| | | } |
| | | SERVO::CGlass* pGlass = pEquipment->getFrontGlass(); |
| | | /* |
| | | SERVO::CGlass* pGlass = pEquipment->getAnyGlass(); |
| | | if (pGlass != nullptr) { |
| | | SERVO::CJobDataB* pJobDataB = pGlass->getJobDataB(); |
| | | SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS(); |
| | |
| | | pEquipment->onSentOutJob(0, pJobDataS); |
| | | } |
| | | } |
| | | */ |
| | | } |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST2) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | | SERVO::CArm* pArm = (SERVO::CArm*)pEquipment->getArm(); |
| | | if (pArm != nullptr) { |
| | | SERVO::CGlass* pGlass = pArm->getFrontGlass(); |
| | | SERVO::CGlass* pGlass = pArm->getAnyGlass(); |
| | | if (pGlass != nullptr) { |
| | | SERVO::CJobDataB* pJobDataB = pGlass->getJobDataB(); |
| | | SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS(); |
| | |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST3) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | | if (pEquipment != nullptr) { |
| | | SERVO::CGlass* pGlass = pEquipment->getFrontGlass(); |
| | | SERVO::CGlass* pGlass = pEquipment->getAnyGlass(); |
| | | if (pGlass != nullptr) { |
| | | SERVO::CProcessData pd; |
| | | pd.setGlassId(pGlass->getID().c_str()); |
| | |
| | | |
| | | |
| | | /* |
| | | SERVO::CGlass* pGlass = pEquipment->getFrontGlass(); |
| | | SERVO::CGlass* pGlass = pEquipment->getAnyGlass(); |
| | | if (pGlass != nullptr) { |
| | | std::string strDescription; |
| | | SERVO::CPath* pPath = pGlass->getPath(); |
| | |
| | | m_pEqsGraphWnd->AddPin(pItem, OUTPIN, outPin->getName().c_str(), (DWORD_PTR)outPin); |
| | | } |
| | | |
| | | m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, !pEquipment->isGlassListEmpty()); |
| | | m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, pEquipment->hasGlass()); |
| | | } |
| | | |
| | | void CPageGraph2::OnTimer(UINT_PTR nIDEvent) |
| | |
| | | return m_pConnectedPin->recvIntent(pIntent); |
| | | } |
| | | |
| | | return FLOW_REJECT; |
| | | return 0; |
| | | } |
| | | |
| | | int CPin::recvIntent(CIntent* pIntent) |
| | |
| | | { |
| | | m_pContext = pContext; |
| | | } |
| | | |
| | | void CSlot::serialize(CArchive& ar) |
| | | { |
| | | if (ar.IsStoring()) { |
| | | |
| | | } |
| | | else { |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | BOOL isEmpty(); |
| | | CContext* getContext(); |
| | | void setContext(CContext* pContext); |
| | | void serialize(CArchive& ar); |
| | | |
| | | private: |
| | | int m_nPosition; |
| | |
| | | return __super::recvIntent(pPin, pIntent); |
| | | } |
| | | |
| | | BOOL CVacuumBake::glassWillArrive(CGlass* pGlass) |
| | | { |
| | | BOOL bRet = __super::glassWillArrive(pGlass); |
| | | if (!bRet) { |
| | | return FALSE; |
| | | } |
| | | |
| | | return m_glassList.empty(); |
| | | } |
| | | |
| | | BOOL CVacuumBake::onPreStoredJob(int port, CJobDataB* pJobDataB) |
| | | { |
| | | CJobDataS* pJobDataS = getJobDataS(pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | if (pJobDataS == nullptr) { |
| | | LOGE("<CVacuumBake-%s>onPreFetchedOutJob,找不到对应的JobDataS(CassetteSequenceNo:%d, JobSequenceNo:%d), 注意排查风险!", m_strName.c_str(), |
| | | pJobDataB->getCassetteSequenceNo(), pJobDataB->getJobSequenceNo()); |
| | | return FALSE; |
| | | } |
| | | |
| | | // 当前不能有任何玻璃,且当前准备进的片是G1 |
| | | Lock(); |
| | | if (!m_glassList.empty()) { |
| | | Unlock(); |
| | | LOGE("<CVacuumBake-%s>onPreFetchedOutJob,当前机器或单元存在玻璃片,不能进料,请注意风险!", m_strName.c_str()); |
| | | return FALSE; |
| | | } |
| | | |
| | | if (pJobDataS->getMaterialsType() != (int)MaterialsType::G1) { |
| | | LOGE("<CVacuumBake-%s>onPreFetchedOutJob,当前机器或单元只能进G2玻璃片,请注意风险!", m_strName.c_str()); |
| | | return FALSE; |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | int CVacuumBake::getIndexerOperationModeBaseValue() |
| | | { |
| | | return 30000; |
| | |
| | | virtual void serialize(CArchive& ar); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual int recvIntent(CPin* pPin, CIntent* pIntent); |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB); |
| | | virtual int getIndexerOperationModeBaseValue(); |
| | | |
| | | }; |
| | |
| | | |
| | | |
| | | /* 流程控制相关代码 */ |
| | | #define FLOW_REJECT 0x0 |
| | | #define FLOW_ACCEPT 0x1 |
| | | #define FLOW_TEST 0x1000 |
| | | #define FLOW_SIGNAL 0x1001 |
| | | #define FLOW_DATA 0x1002 |
| | | #define FLOW_MOVE_MATERIAL 0x1003 |
| | | |
| | | |
| | | /* Port Status */ |