| | |
| | | { |
| | | // 加入Pin初始化代码 |
| | | LOGI("<CVacuumBake>initPins"); |
| | | addPin(SERVO::PinType::INPUT, _T("In1")); |
| | | addPin(SERVO::PinType::INPUT, _T("In2")); |
| | | addPin(SERVO::PinType::OUTPUT, _T("Out")); |
| | | addPin(SERVO::PinType::INPUT, _T("In")); |
| | | addPin(SERVO::PinType::OUTPUT, _T("Out1")); |
| | | addPin(SERVO::PinType::OUTPUT, _T("Out2")); |
| | | } |
| | | |
| | | void CVacuumBake::initSteps() |
| | |
| | | { |
| | | // Received Job Report Upstream #1~9 |
| | | char szBuffer[256]; |
| | | for (int i = 0; i < 9; i++) { |
| | | for (int i = 0; i < 1; i++) { |
| | | CEqReadStep* pStep = new CEqReadStep(0x14c90 + 320 * i, 320 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | |
| | | { |
| | | // Sent Out Job Report Downstream #1~9 |
| | | char szBuffer[256]; |
| | | for (int i = 0; i < 9; i++) { |
| | | for (int i = 0; i < 1; i++) { |
| | | CEqReadStep* pStep = new CEqReadStep(0x14000 + 320 * i, 320 * 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) { |
| | | decodeReceivedJobReport((CStep*)pFrom, port, pszData, size); |
| | | decodeSentOutJobReport((CStep*)pFrom, port, pszData, size); |
| | | } |
| | | } |
| | | return -1; |
| | |
| | | { |
| | | // Fetched Out Job Report #1~15 |
| | | char szBuffer[256]; |
| | | for (int i = 0; i < 15; i++) { |
| | | for (int i = 0; i < 1; i++) { |
| | | CEqReadStep* pStep = new CEqReadStep(0x15c31 + 18 * i, 18 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | |
| | | { |
| | | // Stored Job Report #1~15 |
| | | char szBuffer[256]; |
| | | for (int i = 0; i < 15; i++) { |
| | | for (int i = 0; i < 1; i++) { |
| | | CEqReadStep* pStep = new CEqReadStep(0x15b23 + 18 * i, 18 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // process start/end report |
| | | { |
| | | CEqReadStep* pStep = new CEqReadStep(0x15D3F, 13 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | decodeJobProcessStartReport((CStep*)pFrom, pszData, size); |
| | | } |
| | | return -1; |
| | | }); |
| | | pStep->setName(STEP_EQ_JOB_PROCESS_START_REPORT); |
| | | pStep->setProp("Port", (void*)1); |
| | | pStep->setWriteSignalDev(0xc33); |
| | | if (addStep(STEP_ID_JOB_PROCESS_START_REPORT, pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | | } |
| | | { |
| | | CEqReadStep* pStep = new CEqReadStep(0x15D4C, 13 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | decodeJobProcessEndReport((CStep*)pFrom, pszData, size); |
| | | } |
| | | return -1; |
| | | }); |
| | | pStep->setName(STEP_EQ_JOB_PROCESS_END_REPORT); |
| | | pStep->setProp("Port", (void*)1); |
| | | pStep->setWriteSignalDev(0xc34); |
| | | if (addStep(STEP_ID_JOB_PROCESS_END_REPORT, pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 必须要实现的虚函数,在此初始化Slot信息 |