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

Method GetDriver

cpp/src/Manager.cpp:409–424  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get a pointer to the driver for a Z-Wave PC Interface -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

407// Get a pointer to the driver for a Z-Wave PC Interface
408//-----------------------------------------------------------------------------
409Driver* Manager::GetDriver
410(
411 uint32 const _homeId
412)
413{
414 map<uint32,Driver*>::iterator it = m_readyDrivers.find( _homeId );
415 if( it != m_readyDrivers.end() )
416 {
417 return it->second;
418 }
419
420 Log::Write( LogLevel_Error, "mgr, Manager::GetDriver failed - Home ID 0x%.8x is unknown", _homeId );
421 OZW_ERROR(OZWException::OZWEXCEPTION_INVALID_HOMEID, "Invalid HomeId passed to GetDriver");
422 //assert(0); << Don't assert as this might be a valid condition when we call RemoveDriver. See comments above.
423 return NULL;
424}
425
426//-----------------------------------------------------------------------------
427// <Manager::SetDriverReady>

Callers

nothing calls this directly

Calls 3

WriteFunction · 0.85
findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected