| | |
| | | pGlass->setProcessJob(pj); |
| | | |
| | | PJWarp& jpWarp = pj->getPjWarp(); |
| | | int portIndex = -1; |
| | | switch (pPort->getID()) { |
| | | case EQ_ID_LOADPORT1: portIndex = 0; break; |
| | | case EQ_ID_LOADPORT2: portIndex = 1; break; |
| | | case EQ_ID_LOADPORT3: portIndex = 2; break; |
| | | case EQ_ID_LOADPORT4: portIndex = 3; break; |
| | | default: break; |
| | | } |
| | | |
| | | BOOL scheduled = FALSE; |
| | | int material = 1; // G1 |
| | | if (1 <= slot && slot <= 8) { |
| | | if (0 <= portIndex && portIndex <= 3 && jpWarp.selectedPorts[portIndex]) { |
| | | scheduled = jpWarp.checkSlots[portIndex][slot - 1]; |
| | | material = jpWarp.materialSlots[portIndex][slot - 1]; |
| | | } |
| | | else { |
| | | // Backward compatibility for legacy single-port PJWarp. |
| | | scheduled = jpWarp.checkSlot[slot - 1]; |
| | | material = jpWarp.material[slot - 1]; |
| | | } |
| | | } |
| | | material = (material == 2) ? 2 : 1; |
| | | |
| | | int nRecipeID = RecipeManager::getInstance().getIdByPPID(pj->recipeSpec()); |
| | | RecipeInfo stRecipeInfo = RecipeManager::getInstance().getRecipeByPPID(pj->recipeSpec()); |
| | | std::vector<DeviceRecipe> vecRecipeInfo = stRecipeInfo.vecDeviceList; |
| | | |
| | | pGlass->setScheduledForProcessing(jpWarp.checkSlot[slot-1]); |
| | | pGlass->setType(static_cast<SERVO::MaterialsType>(jpWarp.material[slot-1])); |
| | | pGlass->setScheduledForProcessing(scheduled); |
| | | pGlass->setType(static_cast<SERVO::MaterialsType>(material)); |
| | | |
| | | SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS(); |
| | | if (pJobDataS != nullptr) { |
| | |
| | | pJobDataS->setLotId(pj->getLotId().c_str()); |
| | | pJobDataS->setProductId(pj->getProductId().c_str()); |
| | | pJobDataS->setOperationId(pj->getOperationId().c_str()); |
| | | pJobDataS->setMaterialsType(jpWarp.material[slot - 1]); |
| | | pJobDataS->setMaterialsType(material); |
| | | pJobDataS->setMasterRecipe(nRecipeID); |
| | | for (const auto& info : vecRecipeInfo) { |
| | | const std::string& name = info.strDeviceName; |
| | |
| | | if (portStatus != PORT_INUSE) { |
| | | LOGW("ProcessStart warning (ProceedWithCarrier): port status is %d (expected INUSE).", portStatus); |
| | | } |
| | | LOGI("ProcessStart payload (ProceedWithCarrier): port=%u, cassetteId=%s, scanMap=%d, jobExistence0=%d, jobExistence1=%d, slotProcess=%d, anyScheduled=%d", |
| | | port + 1, pPort->getCassetteId().c_str(), scanMap, |
| | | (int)jobExistence[0], (int)jobExistence[1], (int)slotProcess, anyScheduled ? 1 : 0); |
| | | |
| | | pPort->sendCassetteCtrlCmd(CCC_PROCESS_START, jobExistence, 12, slotProcess, jobCount, nullptr, nullptr); |
| | | return 0; |