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

Method HandleSendSlaveNodeInfoResponse

cpp/src/Driver.cpp:6713–6745  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

6711// Process a response from the Z-Wave PC interface
6712//-----------------------------------------------------------------------------
6713bool Driver::HandleSendSlaveNodeInfoResponse
6714(
6715 uint8* _data
6716)
6717{
6718 bool res = true;
6719 ControllerState state = ControllerState_InProgress;
6720 uint8 nodeId = GetNodeNumber( m_currentMsg );
6721 if( m_currentControllerCommand == NULL )
6722 {
6723 return false;
6724 }
6725 if( _data[2] )
6726 {
6727 Log::Write( LogLevel_Info, nodeId, "Received reply to FUNC_ID_ZW_SEND_SLAVE_NODE_INFO - command in progress" );
6728 }
6729 else
6730 {
6731 // Failed
6732 Log::Write( LogLevel_Info, nodeId, "Received reply to FUNC_ID_ZW_SEND_SLAVE_NODE_INFO - command failed" );
6733 state = ControllerState_Failed;
6734 // Undo button map settings
6735 Node* node = GetNodeUnsafe( m_currentControllerCommand->m_controllerCommandNode );
6736 if( node != NULL )
6737 {
6738 node->m_buttonMap.erase( m_currentControllerCommand->m_controllerCommandArg );
6739 }
6740 res = false;
6741 }
6742
6743 UpdateControllerState( state );
6744 return res;
6745}
6746
6747//-----------------------------------------------------------------------------
6748// <Driver::HandleSendSlaveNodeInfoRequest>

Callers

nothing calls this directly

Calls 1

WriteFunction · 0.85

Tested by

no test coverage detected