| | |
| | | { |
| | | // CJobSpace: how many ControlJobs can be created (current implementation supports 0/1). |
| | | m_hsmsPassive.setVariableValue("CJobSpace", (__int64)(m_master.canCreateControlJob() ? 1 : 0)); |
| | | |
| | | // PJobSpace: how many ProcessJobs can be created (current implementation supports 0/1). |
| | | m_hsmsPassive.setVariableValue("PJobSpace", (__int64)(m_master.isProcessJobsEmpty() ? 1 : 0)); |
| | | } |
| | | |
| | | IObservable* CModel::getObservable() |
| | |
| | | |
| | | const unsigned int portIndex = PTN - 1; |
| | | SERVO::CLoadPort* pLoadPort = (SERVO::CLoadPort*)m_master.getEquipment(EQ_ID_LOADPORT1 + portIndex); |
| | | LOGI("<Model>onCarrierAction %d, %s, %d, %d", DATAID, pszCarrierAction, pszCarrierId, PTN); |
| | | |
| | | if (_strcmpi(pszCarrierAction, "ProceedWithCarrier") == 0) { |
| | | // 文档流程:ProceedWithCarrier 之后设备进入 Check SlotMap(WFH), |
| | | // 真正的“开始”由 ProceedWithSlotMap 决策触发。 |
| | | // 仅当未开启 CompareMapsBeforeProceeding 时,才沿用旧逻辑直接 Start。 |
| | | LOGI("<CModel>ProceedWithCarrier"); |
| | | if (pLoadPort == nullptr || !pLoadPort->isCompareMapsBeforeProceeding()) { |
| | | m_master.proceedWithCarrier(portIndex); |
| | | } |
| | |
| | | // 当前 S3F17 解析结构仅支持 {DATAID, CarrierAction, CarrierID, PTN},尚未实现上述扩展字段的解析/校验。 |
| | | // 未来若客户确认 SECS-II 结构,需要在 CHsmsPassive::replyCarrierAction() 扩展解析并在此处落库/校验。 |
| | | // 仅在 CompareMapsBeforeProceeding 启用(Host 模式)下允许此动作 |
| | | LOGI("<CModel>ProceedWithSlotMap"); |
| | | if (pLoadPort == nullptr || !pLoadPort->isCompareMapsBeforeProceeding()) { |
| | | strErrorTxt = "rejected - SlotMap check disabled"; |
| | | return CAACK_5; |
| | |
| | | return CAACK_0; |
| | | } |
| | | else if (_strcmpi(pszCarrierAction, "CarrierRelease") == 0) { |
| | | LOGI("<CModel>CarrierRelease"); |
| | | m_master.carrierRelease(portIndex); |
| | | return CAACK_0; |
| | | } |
| | | |
| | | strErrorTxt = "rejected - invalid state"; |
| | | return CAACK_5; |
| | | LOGI("<Model>onCarrierAction %d, %s, %d, %d", DATAID, pszCarrierAction, pszCarrierId, PTN); |
| | | }; |
| | | listener.onPRJobMultiCreate = [&](void* pFrom, std::vector<SERVO::CProcessJob*>& pjs) -> int { |
| | | for (auto p : pjs) { |