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

Method SetNodeName

cpp/src/Node.cpp:1977–1992  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Set the name of the node -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1975// Set the name of the node
1976//-----------------------------------------------------------------------------
1977void Node::SetNodeName
1978(
1979 string const& _nodeName
1980)
1981{
1982 m_nodeName = _nodeName;
1983 // Notify the watchers of the name changes
1984 Notification* notification = new Notification( Notification::Type_NodeNaming );
1985 notification->SetHomeAndNodeIds( m_homeId, m_nodeId );
1986 GetDriver()->QueueNotification( notification );
1987 if( NodeNaming* cc = static_cast<NodeNaming*>( GetCommandClass( NodeNaming::StaticGetCommandClassId() ) ) )
1988 {
1989 // The node supports naming, so we try to write the name into the device
1990 cc->SetName( _nodeName );
1991 }
1992}
1993
1994//-----------------------------------------------------------------------------
1995// <Node::SetLocation>

Callers

nothing calls this directly

Calls 2

QueueNotificationMethod · 0.80
SetNameMethod · 0.45

Tested by

no test coverage detected