| | |
| | | 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) |