| | |
| | | delete pStep; |
| | | } |
| | | } |
| | | |
| | | { |
| | | // Fetched Out Job Report #1~15 |
| | | char szBuffer[256]; |
| | | for (int i = 0; i < 15; i++) { |
| | | CEqReadStep* pStep = new CEqReadStep((m_nIndex == 0 ? 0x9c31 : 0xdc31) + 18 * i, 18 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port"); |
| | | if (port > 0) { |
| | | decodeFetchedOutJobReport(port, pszData, size); |
| | | } |
| | | } |
| | | return -1; |
| | | }); |
| | | sprintf_s(szBuffer, "%s%d", STEP_EQ_FETCHED_OUT_JOBn, i + 1); |
| | | pStep->setName(szBuffer); |
| | | pStep->setProp("Port", (void*)(__int64)(i + 1)); |
| | | pStep->setWriteSignalDev((m_nIndex == 0 ? 0x323 : 0x623) + i); |
| | | if (addStep(STEP_ID_FETCHED_OUT_JOB_REPORT1 + i, pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | | } |
| | | } |
| | | |
| | | { |
| | | // Stored Job Report #1~15 |
| | | char szBuffer[256]; |
| | | for (int i = 0; i < 15; i++) { |
| | | CEqReadStep* pStep = new CEqReadStep((m_nIndex == 0 ? 0x9b23 : 0xdb23) + 18 * i, 18 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port"); |
| | | if (port > 0) { |
| | | decodeStoredJobReport(port, pszData, size); |
| | | } |
| | | } |
| | | return -1; |
| | | }); |
| | | sprintf_s(szBuffer, "%s%d", STEP_EQ_STORED_JOBn, i + 1); |
| | | pStep->setName(szBuffer); |
| | | pStep->setProp("Port", (void*)(__int64)(i + 1)); |
| | | pStep->setWriteSignalDev((m_nIndex == 0 ? 0x314 : 0x614) + i); |
| | | if (addStep(STEP_ID_STORE_JOB_REPORT1 + i, pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CBonder::onTimer(UINT nTimerid) |
| | |
| | | CEqReadStep* pStep = new CEqReadStep(0x5c31 + 18 * i, 18 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | int port = (int)((CEqReadStep*)pFrom)->getProp("Port"); |
| | | int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port"); |
| | | if (port > 0) { |
| | | decodeFetchedOutJobReport(port, pszData, size); |
| | | } |
| | |
| | | pStep->setProp("Port", (void*)(__int64)(i + 1)); |
| | | pStep->setWriteSignalDev(0x023 + i); |
| | | if (addStep(STEP_ID_FETCHED_OUT_JOB_REPORT1 + i, pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | | } |
| | | } |
| | | |
| | | { |
| | | // Store Job Report #1~15 |
| | | char szBuffer[256]; |
| | | for (int i = 0; i < 15; i++) { |
| | | CEqReadStep* pStep = new CEqReadStep(0x5b23 + 18 * i, 18 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port"); |
| | | if (port > 0) { |
| | | decodeStoredJobReport(port, pszData, size); |
| | | } |
| | | } |
| | | return -1; |
| | | }); |
| | | sprintf_s(szBuffer, "%s%d", STEP_EQ_STORED_JOBn, i + 1); |
| | | pStep->setName(szBuffer); |
| | | pStep->setProp("Port", (void*)(__int64)(i + 1)); |
| | | pStep->setWriteSignalDev(0x014 + i); |
| | | if (addStep(STEP_ID_STORE_JOB_REPORT1 + i, pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | | } |
| | |
| | | |
| | | return -1; |
| | | } |
| | | |
| | | int CEFEM::onStore(int port, const char* pszGlassId) |
| | | { |
| | | if (port == 1) { |
| | | return m_pPort[0]->storedJob(pszGlassId); |
| | | } |
| | | if (port == 2) { |
| | | return m_pPort[1]->storedJob(pszGlassId); |
| | | } |
| | | if (port == 3) { |
| | | return m_pPort[2]->storedJob(pszGlassId); |
| | | } |
| | | if (port == 4) { |
| | | return m_pPort[3]->storedJob(pszGlassId); |
| | | } |
| | | if (port == 5) { |
| | | return m_pArmTray[0]->storedJob(pszGlassId); |
| | | } |
| | | if (port == 6) { |
| | | return m_pArmTray[1]->storedJob(pszGlassId); |
| | | } |
| | | if (port == 7) { |
| | | return m_pAligner->storedJob(pszGlassId); |
| | | } |
| | | if (port == 8) { |
| | | return m_pFliper->storedJob(pszGlassId); |
| | | } |
| | | |
| | | return -1; |
| | | } |
| | | } |
| | |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual void onReceiveLBData(const char* pszData, size_t size); |
| | | virtual int onFetchedOut(int port, const char* pszGlassId); |
| | | virtual int onStore(int port, const char* pszGlassId); |
| | | |
| | | public: |
| | | void setPort(unsigned int index, CLoadPort* pPort); |
| | |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_SENT_OUT_JOB_DOWNS1, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_SENT_OUT_JOB_DOWNS2, pszData, size); |
| | | |
| | | // Store Job Report #1~15 |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT1, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT2, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT3, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT4, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT5, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT6, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT7, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT8, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT9, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT10, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT11, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT12, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT13, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT14, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_STORE_JOB_REPORT15, pszData, size); |
| | | |
| | | // Fetched Out Job Report #1~15 |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT1, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT2, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT3, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT4, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT5, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT6, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT7, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT8, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT9, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT10, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT11, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT12, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT13, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT14, pszData, size); |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_FETCHED_OUT_JOB_REPORT15, pszData, size); |
| | | |
| | | |
| | | // CEqCassetteTranserStateStep |
| | | CHECK_READ_STEP_SIGNAL(STEP_ID_PORT1_CASSETTIE_EMPTY, pszData, size); |
| | |
| | | return 0; |
| | | } |
| | | |
| | | int CEquipment::storeJob(const char* pszGlassId) |
| | | int CEquipment::storedJob(const char* pszGlassId) |
| | | { |
| | | if (m_pArm == nullptr) { |
| | | return -1; |
| | |
| | | { |
| | | return fetchedOut(pszGlassId); |
| | | } |
| | | |
| | | int CEquipment::decodeStoredJobReport(int port, const char* pszData, size_t size) |
| | | { |
| | | int index = 0; |
| | | short unitOrPort, unitOrPortNo, subUnitNo, subSlotNo; |
| | | CJobDataB jobDataB; |
| | | int nRet = jobDataB.unserialize(&pszData[index], size); |
| | | if (nRet < 0) return nRet; |
| | | index += nRet; |
| | | |
| | | memcpy(&unitOrPort, &pszData[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | memcpy(&unitOrPortNo, &pszData[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | memcpy(&subUnitNo, &pszData[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | memcpy(&subSlotNo, &pszData[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | |
| | | onStore(port, jobDataB.getGlassId().c_str()); |
| | | |
| | | return index; |
| | | } |
| | | |
| | | int CEquipment::onStore(int port, const char* pszGlassId) |
| | | { |
| | | return storedJob(pszGlassId); |
| | | } |
| | | } |
| | |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual int outputGlass(int port); |
| | | virtual int glassArrived(CGlass* pGlass); |
| | | virtual int onFetchedOut(int port, const char* pszGlassId); |
| | | virtual int onStore(int port, const char* pszGlassId); |
| | | void getGlassList(std::list<CGlass*>& list); |
| | | CGlass* getFrontGlass(); |
| | | BOOL removeClass(CGlass* pGlass); |
| | |
| | | |
| | | public: |
| | | int fetchedOut(const char* pszGlassId); |
| | | int storeJob(const char* pszGlassId); |
| | | int storedJob(const char* pszGlassId); |
| | | BOOL isGlassListEmpty(); |
| | | |
| | | |
| | |
| | | short decodeRecipeListReport(const char* pszData, size_t size); |
| | | short decodeRecipeParameterReport(const char* pszData, size_t size); |
| | | int decodeFetchedOutJobReport(int port, const char* pszData, size_t size); |
| | | int onFetchedOut(int port, const char* pszGlassId); |
| | | int decodeStoredJobReport(int port, const char* pszData, size_t size); |
| | | |
| | | protected: |
| | | EquipmentListener m_listener; |
| | |
| | | } |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST2) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | | pEquipment->storeJob("P20250320A1A2"); |
| | | pEquipment->storedJob("P20250320A1A2"); |
| | | } |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST3) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | |
| | | #define STEP_EQ_FETCHED_OUT_JOB13 _T("EQFetchedOutJobReport13") |
| | | #define STEP_EQ_FETCHED_OUT_JOB14 _T("EQFetchedOutJobReport14") |
| | | #define STEP_EQ_FETCHED_OUT_JOB15 _T("EQFetchedOutJobReport15") |
| | | #define STEP_EQ_STORED_JOBn _T("EQStoredJobReport") |
| | | #define STEP_EQ_STORED_JOB1 _T("EQStoredJobReport1") |
| | | #define STEP_EQ_STORED_JOB2 _T("EQStoredJobReport2") |
| | | #define STEP_EQ_STORED_JOB3 _T("EQStoredJobReport3") |
| | | #define STEP_EQ_STORED_JOB4 _T("EQStoredJobReport4") |
| | | #define STEP_EQ_STORED_JOB5 _T("EQStoredJobReport5") |
| | | #define STEP_EQ_STORED_JOB6 _T("EQStoredJobReport6") |
| | | #define STEP_EQ_STORED_JOB7 _T("EQStoredJobReport7") |
| | | #define STEP_EQ_STORED_JOB8 _T("EQStoredJobReport8") |
| | | #define STEP_EQ_STORED_JOB9 _T("EQStoredJobReport9") |
| | | #define STEP_EQ_STORED_JOB10 _T("EQStoredJobReport10") |
| | | #define STEP_EQ_STORED_JOB11 _T("EQStoredJobReport11") |
| | | #define STEP_EQ_STORED_JOB12 _T("EQStoredJobReport12") |
| | | #define STEP_EQ_STORED_JOB13 _T("EQStoredJobReport13") |
| | | #define STEP_EQ_STORED_JOB14 _T("EQStoredJobReport14") |
| | | #define STEP_EQ_STORED_JOB15 _T("EQStoredJobReport15") |
| | | |
| | | |
| | | |
| | | /* Step ID */ |
| | |
| | | #define STEP_ID_RECIVE_JOB_UPS2 0x581 |
| | | #define STEP_ID_SENT_OUT_JOB_DOWNS1 0x590 |
| | | #define STEP_ID_SENT_OUT_JOB_DOWNS2 0x591 |
| | | #define STEP_ID_STORE_JOB_REPORT1 0x5A0 |
| | | #define STEP_ID_STORE_JOB_REPORT2 0x5A1 |
| | | #define STEP_ID_STORE_JOB_REPORT3 0x5A2 |
| | | #define STEP_ID_STORE_JOB_REPORT4 0x5A3 |
| | | #define STEP_ID_STORE_JOB_REPORT5 0x5A4 |
| | | #define STEP_ID_STORE_JOB_REPORT6 0x5A5 |
| | | #define STEP_ID_STORE_JOB_REPORT7 0x5A6 |
| | | #define STEP_ID_STORE_JOB_REPORT8 0x5A7 |
| | | #define STEP_ID_STORE_JOB_REPORT9 0x5A8 |
| | | #define STEP_ID_STORE_JOB_REPORT10 0x5A9 |
| | | #define STEP_ID_STORE_JOB_REPORT11 0x5AA |
| | | #define STEP_ID_STORE_JOB_REPORT12 0x5AB |
| | | #define STEP_ID_STORE_JOB_REPORT13 0x5AC |
| | | #define STEP_ID_STORE_JOB_REPORT14 0x5AD |
| | | #define STEP_ID_STORE_JOB_REPORT15 0x5AE |
| | | #define STEP_ID_FETCHED_OUT_JOB_REPORT1 0x5AF |
| | | #define STEP_ID_FETCHED_OUT_JOB_REPORT2 0x5B0 |
| | | #define STEP_ID_FETCHED_OUT_JOB_REPORT3 0x5B1 |