1.Panel Data Report数据的获取,
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | { |
| | | // Panel Data Report |
| | | CEqReadStep* pStep = new CEqReadStep(0xA17f, 386 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | decodePanelDataReport((CStep*)pFrom, pszData, size); |
| | | } |
| | | return -1; |
| | | }); |
| | | pStep->setName(STEP_EQ_PANEL_DATA_REPORT); |
| | | pStep->setProp("Port", (void*)1); |
| | | pStep->setWriteSignalDev(0x45e); |
| | | if (addStep(STEP_ID_PANEL_DATA_REPORT, pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 必须要实现的虚函数,在此初始化Slot信息 |
| | |
| | | delete pStep; |
| | | } |
| | | } |
| | | |
| | | { |
| | | // Panel Data Report |
| | | CEqReadStep* pStep = new CEqReadStep(0x617f, 386 * 2, |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | decodePanelDataReport((CStep*)pFrom, pszData, size); |
| | | } |
| | | return -1; |
| | | }); |
| | | pStep->setName(STEP_EQ_PANEL_DATA_REPORT); |
| | | pStep->setProp("Port", (void*)1); |
| | | pStep->setWriteSignalDev(0x15e); |
| | | if (addStep(STEP_ID_PANEL_DATA_REPORT, pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 必须要实现的虚函数,在此初始化Slot信息 |
| | |
| | | return 0; |
| | | } |
| | | |
| | | int CEquipment::decodePanelDataReport(CStep* pStep, const char* pszData, size_t size) |
| | | { |
| | | short cassetteNo, jobSequenceNo; |
| | | int index = 0; |
| | | std::string strPanelJudgeData, strPanelGradeData; |
| | | memcpy(&cassetteNo, &pszData[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | memcpy(&jobSequenceNo, &pszData[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | CToolUnits::convertString(&pszData[index], 128 * 2, strPanelJudgeData); |
| | | index += 128 * 2; |
| | | CToolUnits::convertString(&pszData[index], 256 * 2, strPanelJudgeData); |
| | | index += 256 * 2; |
| | | |
| | | |
| | | // 缓存Attribute,用于调试时显示信息 |
| | | unsigned int weight = 201; |
| | | pStep->addAttribute(new CAttribute("CassetteNo", |
| | | std::to_string(cassetteNo).c_str(), "", weight++)); |
| | | pStep->addAttribute(new CAttribute("JobSequenceNo", |
| | | std::to_string(jobSequenceNo).c_str(), "", weight++)); |
| | | pStep->addAttribute(new CAttribute("PanelJudgeData", |
| | | strPanelJudgeData.c_str(), "", weight++)); |
| | | pStep->addAttribute(new CAttribute("PanelGradeData", |
| | | strPanelGradeData.c_str(), "", weight++)); |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | int CEquipment::onPreStoredJob(int port, CJobDataB* pJobDataB, short& putSlot) |
| | | { |
| | | LOGI("<CEquipment-%s>onPreStoredJob:port:%d|GlassId:%s", |
| | |
| | | int decodeFetchedOutJobReport(CStep* pStep, int port, const char* pszData, size_t size); |
| | | int decodeStoredJobReport(CStep* pStep, int port, const char* pszData, size_t size); |
| | | int decodeVCREventReport(CStep* pStep, const char* pszData, size_t size); |
| | | int decodePanelDataReport(CStep* pStep, const char* pszData, size_t size); |
| | | int addJobDataB(CJobDataB* pJobDataB); |
| | | int removeJobDataB(int nCassetteSequenceNo, int nJobSequenceNo); |
| | | CJobDataB* getJobDataB(int nCassetteSequenceNo, int nJobSequenceNo); |
| | |
| | | #define STEP_PORT2_CASSETTE_TYPE_CHANGE _T("Port2CassetteTypeChange") |
| | | #define STEP_PORT3_CASSETTE_TYPE_CHANGE _T("Port3CassetteTypeChange") |
| | | #define STEP_PORT4_CASSETTE_TYPE_CHANGE _T("Port4CassetteTypeChange") |
| | | #define STEP_EQ_PANEL_DATA_REPORT _T("EQPanelDataReport") |
| | | |
| | | |
| | | /* Step ID */ |
| | |
| | | #define STEP_ID_PROT3_CASSETTE_TYPE_CHANGE_REPLY 0x69A |
| | | #define STEP_ID_PROT4_CASSETTE_TYPE_CHANGE_REPLY 0x69B |
| | | #define STEP_ID_ROBOT_CMD_REPLY 0x6b0 |
| | | |
| | | #define STEP_ID_PANEL_DATA_REPORT 0x5D1 |
| | | |
| | | |
| | | /* base alarm */ |