| | |
| | | alarmData.strUnitName = alarmManager.getUnitNameById(alarmData.nDeviceId, alarmData.nUnitId); |
| | | alarmData.strStartTime = CToolUnits::timeToString2(CToolUnits::getTimestamp()); |
| | | alarmData.strEndTime = ""; |
| | | alarmData.strDescription = ""; |
| | | |
| | | const AlarmInfo* alarmInfo = alarmManager.getAlarmInfoByID(alarmData.nId); |
| | | alarmData.strDescription = alarmInfo != nullptr ? alarmInfo->strAlarmText : ""; |
| | | if (alarmInfo != nullptr) { |
| | | if (alarmInfo->strDescription.empty()) { |
| | | alarmData.strDescription = alarmInfo->strAlarmText; |
| | | } |
| | | else { |
| | | alarmData.strDescription = alarmInfo->strAlarmText + "," + alarmInfo->strDescription + "."; |
| | | } |
| | | } |
| | | |
| | | |
| | | int nAlarmEventId = 0; |
| | | bool result = alarmManager.addAlarm(alarmData, nAlarmEventId); |
| | |
| | | |
| | | int CModel::term() |
| | | { |
| | | m_configuration.setPortCassetteSnSeed(1, m_master.getPortCassetteSnSeed(1)); |
| | | m_configuration.setPortCassetteSnSeed(2, m_master.getPortCassetteSnSeed(2)); |
| | | m_configuration.setPortCassetteSnSeed(3, m_master.getPortCassetteSnSeed(3)); |
| | | m_configuration.setPortCassetteSnSeed(4, m_master.getPortCassetteSnSeed(4)); |
| | | m_hsmsPassive.saveCache(); |
| | | m_hsmsPassive.term(); |
| | | CLog::GetLog()->SetOnLogCallback(nullptr); |