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

Method HandleSetSlaveLearnModeResponse

cpp/src/Driver.cpp:6613–6636  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

6611// Process a response from the Z-Wave PC interface
6612//-----------------------------------------------------------------------------
6613bool Driver::HandleSetSlaveLearnModeResponse
6614(
6615 uint8* _data
6616)
6617{
6618 bool res = true;
6619 ControllerState state = ControllerState_InProgress;
6620 uint8 nodeId = GetNodeNumber( m_currentMsg );
6621 if( _data[2] )
6622 {
6623 Log::Write( LogLevel_Info, nodeId, "Received reply to FUNC_ID_ZW_SET_SLAVE_LEARN_MODE - command in progress" );
6624 }
6625 else
6626 {
6627 // Failed
6628 Log::Write( LogLevel_Warning, nodeId, "WARNING: Received reply to FUNC_ID_ZW_SET_SLAVE_LEARN_MODE - command failed" );
6629 state = ControllerState_Failed;
6630 res = false;
6631 SendSlaveLearnModeOff();
6632 }
6633
6634 UpdateControllerState( state );
6635 return res;
6636}
6637
6638//-----------------------------------------------------------------------------
6639// <Driver::HandleSetSlaveLearnModeRequest>

Callers

nothing calls this directly

Calls 1

WriteFunction · 0.85

Tested by

no test coverage detected