| | |
| | | return pGlass; |
| | | } |
| | | |
| | | int CEquipment::fetchedOut(const char* pszGlassId) |
| | | int CEquipment::fetchedOutJob(const char* pszGlassId) |
| | | { |
| | | if (m_pArm == nullptr) { |
| | | return -1; |
| | |
| | | return m_recipesManager.decodeRecipeParameterReport(pszData, size); |
| | | } |
| | | |
| | | int CEquipment::decodeReceivedJobReport(CStep* pStep, int port, const char* pszData, size_t size) |
| | | { |
| | | CJobDataS jobDataS; |
| | | int nRet = jobDataS.unserialize(&pszData[0], (int)size); |
| | | if (nRet < 0) return nRet; |
| | | |
| | | // 缓存Attribute,用于调试时显示信息 |
| | | unsigned int weight = 201; |
| | | CAttributeVector attrubutes; |
| | | jobDataS.getAttributeVector(attrubutes, weight); |
| | | pStep->addAttributeVector(attrubutes); |
| | | |
| | | |
| | | onReceivedJob(port, &jobDataS); |
| | | |
| | | return nRet; |
| | | } |
| | | |
| | | int CEquipment::onReceivedJob(int port, CJobDataS* pJobDataS) |
| | | { |
| | | LOGI("<CEquipment-%s>onReceivedJob.", m_strName.c_str()); |
| | | // return fetchedOutJob(pszGlassId); |
| | | return 0; |
| | | } |
| | | |
| | | int CEquipment::decodeSentOutJobReport(CStep* pStep, int port, const char* pszData, size_t size) |
| | | { |
| | | CJobDataS jobDataS; |
| | | int nRet = jobDataS.unserialize(&pszData[0], (int)size); |
| | | if (nRet < 0) return nRet; |
| | | |
| | | // 缓存Attribute,用于调试时显示信息 |
| | | unsigned int weight = 201; |
| | | CAttributeVector attrubutes; |
| | | jobDataS.getAttributeVector(attrubutes, weight); |
| | | pStep->addAttributeVector(attrubutes); |
| | | |
| | | |
| | | onReceivedJob(port, &jobDataS); |
| | | |
| | | return nRet; |
| | | } |
| | | |
| | | int CEquipment::onSentOutJob(int port, CJobDataS* pJobDataS) |
| | | { |
| | | LOGI("<CEquipment-%s>onSentOutJob.", m_strName.c_str()); |
| | | // return fetchedOutJob(pszGlassId); |
| | | return 0; |
| | | } |
| | | |
| | | int CEquipment::decodeFetchedOutJobReport(CStep* pStep, int port, const char* pszData, size_t size) |
| | | { |
| | | int index = 0; |
| | |
| | | jobDataB.getGlassId().c_str(), "", weight++)); |
| | | |
| | | |
| | | onFetchedOut(port, jobDataB.getGlassId().c_str()); |
| | | onFetchedOutJob(port, jobDataB.getGlassId().c_str()); |
| | | |
| | | return index; |
| | | } |
| | | |
| | | int CEquipment::onFetchedOut(int port, const char* pszGlassId) |
| | | int CEquipment::onFetchedOutJob(int port, const char* pszGlassId) |
| | | { |
| | | LOGI("<CEquipment-%s>onFetchedOut:port:%d|GlassId:%s", |
| | | LOGI("<CEquipment-%s>onFetchedOutJob:port:%d|GlassId:%s", |
| | | m_strName.c_str(), port, pszGlassId); |
| | | return fetchedOut(pszGlassId); |
| | | return fetchedOutJob(pszGlassId); |
| | | } |
| | | |
| | | int CEquipment::decodeStoredJobReport(CStep* pStep, int port, const char* pszData, size_t size) |
| | |
| | | jobDataB.getGlassId().c_str(), "", weight++)); |
| | | |
| | | |
| | | onStore(port, jobDataB.getGlassId().c_str()); |
| | | onStoreJob(port, jobDataB.getGlassId().c_str()); |
| | | |
| | | return index; |
| | | } |
| | | |
| | | int CEquipment::onStore(int port, const char* pszGlassId) |
| | | int CEquipment::onStoreJob(int port, const char* pszGlassId) |
| | | { |
| | | LOGI("<CEquipment-%s>onStore:port:%d|GlassId:%s", |
| | | m_strName.c_str(), port, pszGlassId); |