1.PJStart事件上报功能实现,EAP模拟器接收数据并验证;
| | |
| | | auto pj = acquireNextProcessJob(); |
| | | if (pj != nullptr) { |
| | | m_inProcesJobs.push_back(pj); |
| | | |
| | | // 杩欓噷涓婃姤PJ Start浜嬩欢 |
| | | if (m_listener.onPjStart != nullptr) { |
| | | m_listener.onPjStart(this, pj); |
| | | } |
| | | } |
| | | } |
| | | if (m_inProcesJobs.empty()) { |
| | |
| | | typedef std::function<void(void* pMaster, CRobotTask* pTask, int code)> ONROBOTTASKEVENT; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, short status, __int64 data)> ONLOADPORTSTATUSCHANGED; |
| | | typedef std::function<void(void* pMaster, int round)> ONCTROUNDEND; |
| | | typedef std::function<void(void* pMaster, void* pj)> ONPJSTART; |
| | | typedef struct _MasterListener |
| | | { |
| | | ONMASTERSTATECHANGED onMasterStateChanged; |
| | |
| | | ONROBOTTASKEVENT onRobotTaskEvent; |
| | | ONLOADPORTSTATUSCHANGED onLoadPortStatusChanged; |
| | | ONCTROUNDEND onCTRoundEnd; |
| | | ONPJSTART onPjStart; |
| | | |
| | | } MasterListener; |
| | | |
| | | class CMaster : public IResourceView |
| | |
| | | return requestEventReportSend("PJ_Queued"); |
| | | } |
| | | |
| | | int CHsmsPassive::requestEventReportSend_PJ_Start() |
| | | { |
| | | return requestEventReportSend("PJ_Start"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | int requestEventReportSend(const char* pszEventName); |
| | | int requestEventReportSend_CarrierID_Readed(); |
| | | int requestEventReportSend_PJ_Queued(); |
| | | int requestEventReportSend_PJ_Start(); |
| | | |
| | | private: |
| | | void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName); |
| | |
| | | masterListener.onCTRoundEnd = [&](void* pMaster, int round) { |
| | | m_configuration.setContinuousTransferCount(round); |
| | | }; |
| | | masterListener.onPjStart = [&](void* pMaster, void* pj) { |
| | | m_hsmsPassive.setVariableValue("PJStartID", ((SERVO::CProcessJob*)pj)->id().c_str()); |
| | | m_hsmsPassive.requestEventReportSend_PJ_Start(); |
| | | }; |
| | | m_master.setListener(masterListener); |
| | | m_master.setContinuousTransferCount(m_configuration.getContinuousTransferCount()); |
| | | |
| | |
| | | 40001,E90_SPSM_InProcess_To_ProcessCompleted,,(40000) |
| | | 50000,CarrierID_Readed,,(50000) |
| | | 50001,PJ_Queued,,(50001) |
| | | 50002,PJ_Start,,(50002) |
| | |
| | | 40000,(1,10203,20000) |
| | | 50000,(5000) |
| | | 50001,(5003) |
| | | 50002,(5004) |
| | | |
| | |
| | | 5000,CarrierID,A20,鍗″專ID |
| | | 5001,CJobSpace,U1,CJ Space |
| | | 5002,PJobSpace,U1,PJ Space |
| | | 5003,PJQueued,L,PJ Queued |
| | | 5003,PJQueued,L,PJ Queued |
| | | 5004,PJStartID,A20,PJStartID |