| | |
| | | { |
| | | LOGI("<CEquipment-%s>onSentOutJob.", m_strName.c_str()); |
| | | |
| | | if (m_listener.onSentOutJob != nullptr) { |
| | | m_listener.onSentOutJob(this, port, pJobDataS); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | |
| | | typedef std::function<void(void* pEiuipment, short status, __int64 data)> ONPORTSTATUSCHANGED; |
| | | typedef std::function<void(void* pEiuipment, const std::vector<CParam>& params)> ONPROCESSDATAREPORT; |
| | | typedef std::function<void(void* pEiuipment, int port, CJobDataS* pJobDataS)> ONRECEIVEDJOB; |
| | | typedef std::function<void(void* pEiuipment, int port, CJobDataS* pJobDataS)> ONSENTOUTJOB; |
| | | |
| | | typedef struct _EquipmentListener |
| | | { |
| | |
| | | ONVCREVENTREPORT onPanelDataReport; |
| | | ONPROCESSDATAREPORT onProcessDataReport; |
| | | ONRECEIVEDJOB onReceivedJob; |
| | | ONSENTOUTJOB onSentOutJob; |
| | | } EquipmentListener; |
| | | |
| | | |
| | |
| | | m_listener.onJobReceived(this, (CEquipment*)pEquipment, port, pJobDataS); |
| | | } |
| | | }; |
| | | listener.onSentOutJob = [&](void* pEquipment, int port, CJobDataS* pJobDataS) { |
| | | if (m_listener.onJobSentOut != nullptr) { |
| | | m_listener.onJobSentOut(this, (CEquipment*)pEquipment, port, pJobDataS); |
| | | } |
| | | }; |
| | | pEquipment->setListener(listener); |
| | | pEquipment->setCcLink(&m_cclink); |
| | | m_listEquipment.push_back(pEquipment); |
| | |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, const std::vector<CParam>& params)> ONPROCESSDATAREPORTEX; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, const std::vector<CParam>& params)> ONSVDATAREPORT; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, int port, CJobDataS* pJobDataS)> ONJOBRECEIVED; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, int port, CJobDataS* pJobDataS)> ONJOBSENTOUT; |
| | | typedef std::function<void(void* pMaster, int round)> ONCTROUNDEND; |
| | | typedef std::function<void(void* pMaster, void* pj)> ONPJSTART; |
| | | typedef std::function<void(void* pMaster)> ONCONTROLJOBCHANGED; |
| | |
| | | ONSVDATAREPORT onSVDataReport; |
| | | ONPROCESSDATAREPORTEX onProcessDataReport; |
| | | ONJOBRECEIVED onJobReceived; |
| | | ONJOBSENTOUT onJobSentOut; |
| | | ONCTROUNDEND onCTRoundEnd; |
| | | ONPJSTART onCjStart; |
| | | ONPJSTART onCjEnd; |
| | |
| | | (void)pMaster; |
| | | (void)port; |
| | | if (pEquipment == nullptr || pJobDataS == nullptr) return; |
| | | { |
| | | const std::string& g1 = pJobDataS->getGlass1Id(); |
| | | const std::string& g2 = pJobDataS->getGlass2Id(); |
| | | std::string glassId; |
| | | if (!g1.empty() && !g2.empty()) { |
| | | glassId = g1 + "+" + g2; |
| | | } |
| | | else if (!g1.empty()) { |
| | | glassId = g1; |
| | | } |
| | | else { |
| | | glassId = g2; |
| | | } |
| | | const int slotNo = pJobDataS->getTargetSlotNo(); |
| | | m_hsmsPassive.withVariableLock([&] { |
| | | m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str()); |
| | | m_hsmsPassive.setVariableValue("SubEqpSlot", slotNo); |
| | | m_hsmsPassive.setVariableValue("MaterialId", glassId.c_str()); |
| | | m_hsmsPassive.requestEventReportSend("GlassReceivedJob"); |
| | | }); |
| | | } |
| | | const int eqId = pEquipment->getID(); |
| | | const int recipeId = pJobDataS->getMasterRecipe(); |
| | | std::string recipe = RecipeManager::getInstance().getPPIDById(recipeId); |
| | |
| | | m_hsmsPassive.requestEventReportSend("RecipeChanged"); |
| | | }); |
| | | }; |
| | | masterListener.onJobSentOut = [&](void* pMaster, SERVO::CEquipment* pEquipment, int port, SERVO::CJobDataS* pJobDataS) { |
| | | (void)pMaster; |
| | | (void)port; |
| | | if (pEquipment == nullptr || pJobDataS == nullptr) return; |
| | | const std::string& g1 = pJobDataS->getGlass1Id(); |
| | | const std::string& g2 = pJobDataS->getGlass2Id(); |
| | | std::string glassId; |
| | | if (!g1.empty() && !g2.empty()) { |
| | | glassId = g1 + "+" + g2; |
| | | } |
| | | else if (!g1.empty()) { |
| | | glassId = g1; |
| | | } |
| | | else { |
| | | glassId = g2; |
| | | } |
| | | const int slotNo = pJobDataS->getSourceSlotNo(); |
| | | m_hsmsPassive.withVariableLock([&] { |
| | | m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str()); |
| | | m_hsmsPassive.setVariableValue("SubEqpSlot", slotNo); |
| | | m_hsmsPassive.setVariableValue("MaterialId", glassId.c_str()); |
| | | m_hsmsPassive.requestEventReportSend("GlassSentOutJob"); |
| | | }); |
| | | }; |
| | | masterListener.onLoadPortStatusChanged = [&] (void* pMaster, SERVO::CEquipment* pEquipment, short status, __int64 data) { |
| | | LOGE("<CModel>onLoadPortStatusChanged. status = %d", status); |
| | | static std::map<int, short> s_prevPortStatus; |
| | |
| | | 10061,CheckSlotMap,,(10061) |
| | | 10062,SlotMapVerificationOK,,(10062) |
| | | 10063,SlotMapVerificationNG,,(10062) |
| | | 10064,SlotMapMismatch,,(10062) |
| | | 10064,SlotMapMismatch,Slot map mismatch between scan and download,(10062) |
| | | 10071,GlassIDReadWaitingForHost,,(10071) |
| | | 10072,GlassIDReadVerificationOK,,(10072) |
| | | 10073,GlassIDReadVerificationNG,,(10072) |
| | |
| | | 50008,Port_Unload_Ready,,(50008) |
| | | 50009,Port_Load_Ready,,(50009) |
| | | 50010,Port_Blocked,,(50010) |
| | | 50011,OCR_PanelID_Read_OK,,(50012) |
| | | 50015,OCR_PanelID_Read_NG,,(50012) |
| | | 50016,OCR_PanelID_Read_Mismatch,,(50012) |
| | | 50017,OCR_PanelID_Read_NG_Mismatch,,(50012) |
| | | 50011,OCR_PanelID_Read_OK,OCR read OK and match,(50012) |
| | | 50015,OCR_PanelID_Read_NG,OCR read fail (key-in match),(50012) |
| | | 50016,OCR_PanelID_Read_Mismatch,OCR read OK but mismatch,(50012) |
| | | 50017,OCR_PanelID_Read_NG_Mismatch,OCR read fail and key-in mismatch,(50012) |
| | | 50012,Port_Ready_To_Release,,(50013) |
| | | 50020,PortStateChange,,(50020) |
| | | 50021,GlassReceivedJob,Glass received into equipment slot,(50021) |
| | | 50022,GlassSentOutJob,Glass sent out from equipment slot,(50022) |
| | | 60000,BonderSVData,,(60000) |
| | | 61000,BonderProcessData,,(61000) |
| | | 62000,VacuumBakeSVData,,(62000) |
| | |
| | | RPTID,(VID1,VID2,...) |
| | | RPTID,(VID1,VID2,...) |
| | | # Notes: |
| | | # - RPTIDs 60000-67000, 700, 10017, 20000 include SubEqpName(5018) and SubEqpSlot(5019). |
| | | # - RPTIDs 50008/50009/50010/50013/50014/50020 use PortId(5022). |
| | | # - OCR events (CEID 50011/50015/50016/50017) use RPTID 50012 with VCRPanelID(5014). |
| | | |
| | | 33,(5017) |
| | | 300,(1,300) |
| | | 301,(1,300) |
| | |
| | | 50013,(5022) |
| | | 50014,(5022) |
| | | 50020,(500,5022,5021) |
| | | 50021,(5018,5019,5023) |
| | | 50022,(5018,5019,5023) |
| | | 60000,(500,5018,5019,6000,6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016,6017,6018) |
| | | 61000,(500,5018,5019,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121) |
| | | 62000,(500,5018,5019,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212,6213,6214,6215,6216,6217) |
| | |
| | | 5009,CJEndID,A20,CJ end ID |
| | | 5014,VCRPanelID,A20,Panel ID from reader |
| | | 5017,ProcessDataReportText,A50,EV_PROCESS_DATA_REPORT payload (placeholder) |
| | | 5018,SubEqpName,A20,Sub equipment name for SubEqp events |
| | | 5019,SubEqpSlot,U1,Slot number for SubEqp events |
| | | 5018,SubEqpName,A20,Sub equipment name (SubEqp/Unit/Process/SV/ProcessData events) |
| | | 5019,SubEqpSlot,U1,Slot number for SubEqp/Unit; 0 when not applicable |
| | | 5021,PortState,U1,Port transfer/state code for PortStateChange |
| | | 5022,PortId,U1,Port ID for Port events |
| | | 5022,PortId,U1,Unified port ID for all Port events |
| | | 5023,MaterialId,A50,Material/Glass ID for Received/SentOut events |