| | |
| | | |
| | | void CEquipment::init() |
| | | { |
| | | CStep* pStep = new CStep(); |
| | | if (addStep(0x360, pStep) == 0) { |
| | | pStep->init(); |
| | | } |
| | | else { |
| | | delete pStep; |
| | | for (auto item : m_mapStep) { |
| | | item.second->init(); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | // 以下根据信号做流程处理 |
| | | CStep* pStep; |
| | | |
| | | // Equipment Mode Change Report |
| | | index = 0x360; |
| | | // Equipment Mode Change Report(0x360) |
| | | // Equipment Status Change Report(0x361) |
| | | // Equipment Alarm Change Report(0x362 ~ 0x366) |
| | | for (int i = 0; i < 7; i++) { |
| | | index = 0x360 + i;; |
| | | bFlag = isBitOn(pszData, size, index); |
| | | CStep* pStep = getStep(0x360); |
| | | pStep = getStep(index); |
| | | if (pStep != nullptr) { |
| | | pStep->onSignal(bFlag); |
| | | } |
| | | } |
| | | } |
| | | |
| | | BOOL CEquipment::isBitOn(const char* pszData, size_t size, int index) |
| | | { |