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

Method HandleGetNodeProtocolInfoResponse

cpp/src/Driver.cpp:2932–2953  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2930// Process a response from the Z-Wave PC interface
2931//-----------------------------------------------------------------------------
2932void Driver::HandleGetNodeProtocolInfoResponse
2933(
2934 uint8* _data
2935)
2936{
2937 // The node that the protocol info response is for is not included in the message.
2938 // We have to assume that the node is the same one as in the most recent request.
2939 if( !m_currentMsg )
2940 {
2941 Log::Write( LogLevel_Warning, "WARNING: Received unexpected FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO message - ignoring.");
2942 return;
2943 }
2944
2945 uint8 nodeId = m_currentMsg->GetTargetNodeId();
2946 Log::Write( LogLevel_Info, nodeId, "Received reply to FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO" );
2947
2948 // Update the node with the protocol info
2949 if( Node* node = GetNodeUnsafe( nodeId ) )
2950 {
2951 node->UpdateProtocolInfo( &_data[2] );
2952 }
2953}
2954
2955//-----------------------------------------------------------------------------
2956// <Driver::HandleAssignReturnRouteResponse>

Callers

nothing calls this directly

Calls 2

WriteFunction · 0.85
UpdateProtocolInfoMethod · 0.80

Tested by

no test coverage detected