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

Method SetLocation

cpp/src/Node.cpp:1998–2013  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Set the location of the node -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1996// Set the location of the node
1997//-----------------------------------------------------------------------------
1998void Node::SetLocation
1999(
2000 string const& _location
2001)
2002{
2003 m_location = _location;
2004 // Notify the watchers of the name changes
2005 Notification* notification = new Notification( Notification::Type_NodeNaming );
2006 notification->SetHomeAndNodeIds( m_homeId, m_nodeId );
2007 GetDriver()->QueueNotification( notification );
2008 if( NodeNaming* cc = static_cast<NodeNaming*>( GetCommandClass( NodeNaming::StaticGetCommandClassId() ) ) )
2009 {
2010 // The node supports naming, so we try to write the location into the device
2011 cc->SetLocation( _location );
2012 }
2013}
2014
2015//-----------------------------------------------------------------------------
2016// <Node::ApplicationCommandHandler>

Callers 1

SetNodeLocationMethod · 0.45

Calls 1

QueueNotificationMethod · 0.80

Tested by

no test coverage detected