| 637 | } |
| 638 | |
| 639 | void Alarm::ClearAlarm(uint32 type) { |
| 640 | uint32 _instance; |
| 641 | if (m_TimersToInstances.find(type) != m_TimersToInstances.end()) { |
| 642 | _instance = m_TimersToInstances.at(type); |
| 643 | m_TimersToInstances.erase(type); |
| 644 | } else { |
| 645 | Log::Write(LogLevel_Warning, GetNodeId(), "Cant Find Notification Type %d in m_TimersToInstances", type); |
| 646 | return; |
| 647 | } |
| 648 | ClearEventParams(_instance); |
| 649 | /* update the actual value only after we set the Params */ |
| 650 | if ( ValueList *value = static_cast<ValueList *>( GetValue( _instance, type ) ) ) |
| 651 | { |
| 652 | value->OnValueRefreshed(0); |
| 653 | value->Release(); |
| 654 | } else { |
| 655 | Log::Write ( LogLevel_Warning, GetNodeId(), "Couldn't Find a ValueList to ClearAlarm for Notification Type %d (%d)", type, _instance); |
| 656 | } |
| 657 | } |
| 658 | |