| | |
| | | return m_strDescription; |
| | | } |
| | | |
| | | void CEquipment::setCurrentRecipe(const std::string& recipe) |
| | | { |
| | | Lock(); |
| | | m_currentRecipe = recipe; |
| | | Unlock(); |
| | | } |
| | | |
| | | std::string CEquipment::getCurrentRecipe() |
| | | { |
| | | Lock(); |
| | | std::string out = m_currentRecipe; |
| | | Unlock(); |
| | | return out; |
| | | } |
| | | |
| | | void CEquipment::setStation(int network, int station) |
| | | { |
| | | m_station.nNetNo = network; |
| | |
| | | pEqAlarmStep->getAlarmLevel()); |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | else if (pStep->getName().compare(STEP_STATUS) == 0) { |
| | | SERVO::CEqStatusStep* pEqStatusStep = (SERVO::CEqStatusStep*)pStep; |
| | | if (m_listener.onEqStatusChanged != nullptr) { |
| | | const unsigned int unitId = pEqStatusStep->getUnitId(); |
| | | const int status = pEqStatusStep->getStatus(unitId); |
| | | const int reason = pEqStatusStep->getReasonCode(unitId); |
| | | m_listener.onEqStatusChanged(this, (int)unitId, status, reason); |
| | | } |
| | | return 1; |
| | | } |
| | | else if (isCimMessageConfirmStep(pStep)) { |
| | |
| | | m_strName.c_str(), nRet); |
| | | } |
| | | |
| | | if (m_listener.onReceivedJob != nullptr) { |
| | | m_listener.onReceivedJob(this, port, pJobDataS); |
| | | } |
| | | |
| | | return nRet; |
| | | } |
| | | |
| | |
| | | int CEquipment::onSentOutJob(int port, CJobDataS* pJobDataS) |
| | | { |
| | | LOGI("<CEquipment-%s>onSentOutJob.", m_strName.c_str()); |
| | | |
| | | if (m_listener.onSentOutJob != nullptr) { |
| | | m_listener.onSentOutJob(this, port, pJobDataS); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | |
| | | CSVData svData; |
| | | int nRet = svData.unserialize(&pszData[0], (int)size); |
| | | if (nRet < 0) return nRet; |
| | | Lock(); |
| | | m_svDatas.push_back(svData); |
| | | Unlock(); |
| | | |
| | | if (m_listener.onSVDataReport != nullptr) { |
| | | m_listener.onSVDataReport(this, &svData); |
| | |
| | | } |
| | | } |
| | | |
| | | PROCESS_STATE CEquipment::getProcessState(int slotNo) const |
| | | { |
| | | if (slotNo <= 0 || slotNo > SLOT_MAX) { |
| | | return PROCESS_STATE::Ready; |
| | | } |
| | | return m_processState[slotNo - 1]; |
| | | } |
| | | |
| | | std::vector<SERVO::CSVData>& CEquipment::getSVDatas() |
| | | { |
| | | return m_svDatas; |