----------------------------------------------------------------------------- Set the location of the node -----------------------------------------------------------------------------
| 1996 | // Set the location of the node |
| 1997 | //----------------------------------------------------------------------------- |
| 1998 | void 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> |
no test coverage detected