MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / ClearAlarm

Method ClearAlarm

cpp/src/command_classes/Alarm.cpp:639–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639void 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

Callers

nothing calls this directly

Calls 6

WriteFunction · 0.85
findMethod · 0.80
GetNodeIdFunction · 0.70
endMethod · 0.45
OnValueRefreshedMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected