| | |
| | | |
| | | |
| | | SECSListener listener; |
| | | listener.onEQConstantRequest = [&](void* pFrom, const std::vector<unsigned int>& ecids, |
| | | std::vector<unsigned int>& ecvs) -> void { |
| | | listener.onEQConstantRequest = [&](void* pFrom, std::vector<EQConstant>& eqcs) -> void { |
| | | // 在此填充常量值,目前仅是加1后返回 |
| | | for (auto item : ecids) { |
| | | ecvs.push_back(item + 1); |
| | | for (auto& item : eqcs) { |
| | | sprintf_s(item.szValue, 256, "Test%d", item.id+1); |
| | | } |
| | | }; |
| | | listener.onEQConstantSend = [&](void* pFrom, std::vector<EQConstant>& eqcs) -> void { |
| | | // 在此保存和设置机器常量值 |
| | | for (auto& item : eqcs) { |
| | | LOGI("onEQConstantRequest: %d, %s", item.id, item.szValue); |
| | | } |
| | | }; |
| | | |
| | | m_hsmsPassive.setListener(listener); |
| | | m_hsmsPassive.setEquipmentModelType((LPTSTR)(LPCTSTR)strModeType); |
| | | m_hsmsPassive.setSoftRev((LPTSTR)(LPCTSTR)strSoftRev); |