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

Method HandleGetVirtualNodesResponse

cpp/src/Driver.cpp:6329–6352  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Process a response from the Z-Wave PC interface -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

6327// Process a response from the Z-Wave PC interface
6328//-----------------------------------------------------------------------------
6329void Driver::HandleGetVirtualNodesResponse
6330(
6331 uint8* _data
6332)
6333{
6334 uint8 nodeId = GetNodeNumber( m_currentMsg );
6335 Log::Write( LogLevel_Info, nodeId, "Received reply to FUNC_ID_ZW_GET_VIRTUAL_NODES" );
6336 memcpy( m_virtualNeighbors, &_data[2], 29 );
6337 m_virtualNeighborsReceived = true;
6338 bool bNeighbors = false;
6339 for( int by=0; by<29; by++ )
6340 {
6341 for( int bi=0; bi<8; bi++ )
6342 {
6343 if( (_data[2+by] & (0x01<<bi)) )
6344 {
6345 Log::Write( LogLevel_Info, nodeId, " Node %d", (by<<3)+bi+1 );
6346 bNeighbors = true;
6347 }
6348 }
6349 }
6350 if( !bNeighbors )
6351 Log::Write( LogLevel_Info, nodeId, " (none reported)" );
6352}
6353
6354//-----------------------------------------------------------------------------
6355// <Driver::GetVirtualNeighbors>

Callers

nothing calls this directly

Calls 1

WriteFunction · 0.85

Tested by

no test coverage detected