| | |
| | | #include "TransferManager.h" |
| | | #include "RecipeManager.h" |
| | | #include "GlassLogDb.h" |
| | | #include <map> |
| | | |
| | | |
| | | CModel::CModel() |
| | |
| | | masterListener.onEqVcrEventReport = [&](void* pMaster, SERVO::CEquipment* pEquipment, SERVO::CVcrEventReport* pReport) { |
| | | LOGE("<CModel>onEqVcrEventReport."); |
| | | if (pReport != nullptr) { |
| | | m_hsmsPassive.setVariableValue("PanelStartID", pReport->getGlassId().c_str()); |
| | | m_hsmsPassive.setVariableValue("VCRPanelID", pReport->getGlassId().c_str()); |
| | | int nRet = m_hsmsPassive.requestEventReportSend_OCR_PanelID_Read_OK(); |
| | | if (nRet != ER_NOERROR) { |
| | | LOGE("<CModel>requestEventReportSend_OCR_PanelID_Read_OK failed, ret=%d", nRet); |
| | |
| | | }; |
| | | masterListener.onLoadPortStatusChanged = [&] (void* pMaster, SERVO::CEquipment* pEquipment, short status, __int64 data) { |
| | | LOGE("<CModel>onLoadPortStatusChanged. status = %d", status); |
| | | static std::map<int, short> s_prevPortStatus; |
| | | const int eqId = (pEquipment != nullptr) ? pEquipment->getID() : 0; |
| | | const short prevStatus = s_prevPortStatus[eqId]; |
| | | s_prevPortStatus[eqId] = status; |
| | | if (status == PORT_INUSE) { |
| | | SERVO::CLoadPort* pLoadPort = dynamic_cast<SERVO::CLoadPort*>(pEquipment); |
| | | if (pLoadPort != nullptr) { |
| | |
| | | SERVO::CLoadPort* pLoadPort = dynamic_cast<SERVO::CLoadPort*>(pEquipment); |
| | | if (pLoadPort != nullptr) { |
| | | m_hsmsPassive.setVariableValue("UnloadReadyPortId", pLoadPort->getID()); |
| | | if (prevStatus == PORT_INUSE) { |
| | | m_hsmsPassive.setVariableValue("ReadyToReleasePortId", pLoadPort->getID()); |
| | | m_hsmsPassive.requestEventReportSend_Port_Ready_To_Release(); |
| | | } |
| | | } |
| | | m_hsmsPassive.requestEventReportSend_Port_Unload_Ready(); |
| | | } |