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

Method RemoveCommandClass

cpp/src/Node.cpp:2175–2198  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Remove a command class from the node -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2173// Remove a command class from the node
2174//-----------------------------------------------------------------------------
2175void Node::RemoveCommandClass
2176(
2177 uint8 const _commandClassId
2178)
2179{
2180 map<uint8,CommandClass*>::iterator it = m_commandClassMap.find( _commandClassId );
2181 if( it == m_commandClassMap.end() )
2182 {
2183 // Class is not found
2184 return;
2185 }
2186
2187 // Remove all the values associated with this class
2188 if( ValueStore* store = GetValueStore() )
2189 {
2190 store->RemoveCommandClassValues( _commandClassId );
2191 }
2192
2193 // Destroy the command class object and remove it from our map
2194 Log::Write( LogLevel_Info, m_nodeId, "RemoveCommandClass - Removed support for %s", it->second->GetCommandClassName().c_str() );
2195
2196 delete it->second;
2197 m_commandClassMap.erase( it );
2198}
2199
2200//-----------------------------------------------------------------------------
2201// <Node::SetConfigParam>

Callers

nothing calls this directly

Calls 6

WriteFunction · 0.85
findMethod · 0.80
endMethod · 0.45
c_strMethod · 0.45
GetCommandClassNameMethod · 0.45

Tested by

no test coverage detected