| | |
| | | #include "stdafx.h" |
| | | #include "CReadStep.h" |
| | | #include "Common.h" |
| | | #include "CEquipment.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | |
| | | nextStep(); |
| | | ASSERT(m_pCclink); |
| | | if (0 == onReadData()) { |
| | | if (m_listener.onEvent != nullptr) { |
| | | m_listener.onEvent(this, STEP_EVENT_READDATA, nullptr); |
| | | } |
| | | ASSERT(m_pEquipment); |
| | | m_pEquipment->onStepEvent(this, STEP_EVENT_READDATA); |
| | | } |
| | | |
| | | // 2.给对方写ON |
| | |
| | | // 6.完成 |
| | | nextStep(); |
| | | if (0 == onComplete()) { |
| | | if (m_listener.onEvent != nullptr) { |
| | | m_listener.onEvent(this, STEP_EVENT_COMPLETE, nullptr); |
| | | } |
| | | ASSERT(m_pEquipment); |
| | | m_pEquipment->onStepEvent(this, STEP_EVENT_COMPLETE); |
| | | } |
| | | } |
| | | } |