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

Method HandleNodeNeighborUpdateRequest

cpp/src/Driver.cpp:3929–3970  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

3927// Process a request from the Z-Wave PC interface
3928//-----------------------------------------------------------------------------
3929void Driver::HandleNodeNeighborUpdateRequest
3930(
3931 uint8* _data
3932)
3933{
3934 uint8 nodeId = GetNodeNumber( m_currentMsg );
3935 ControllerState state = ControllerState_Normal;
3936 switch( _data[3] )
3937 {
3938 case REQUEST_NEIGHBOR_UPDATE_STARTED:
3939 {
3940 Log::Write( LogLevel_Info, nodeId, "REQUEST_NEIGHBOR_UPDATE_STARTED" );
3941 state = ControllerState_InProgress;
3942 break;
3943 }
3944 case REQUEST_NEIGHBOR_UPDATE_DONE:
3945 {
3946 Log::Write( LogLevel_Info, nodeId, "REQUEST_NEIGHBOR_UPDATE_DONE" );
3947 state = ControllerState_Completed;
3948
3949 // We now request the neighbour information from the
3950 // controller and store it in our node object.
3951 if( m_currentControllerCommand != NULL )
3952 {
3953 RequestNodeNeighbors( m_currentControllerCommand->m_controllerCommandNode, 0 );
3954 }
3955 break;
3956 }
3957 case REQUEST_NEIGHBOR_UPDATE_FAILED:
3958 {
3959 Log::Write( LogLevel_Warning, nodeId, "WARNING: REQUEST_NEIGHBOR_UPDATE_FAILED" );
3960 state = ControllerState_Failed;
3961 break;
3962 }
3963 default:
3964 {
3965 break;
3966 }
3967 }
3968
3969 UpdateControllerState( state );
3970}
3971
3972//-----------------------------------------------------------------------------
3973// <Driver::HandleApplicationUpdateRequest>

Callers

nothing calls this directly

Calls 1

WriteFunction · 0.85

Tested by

no test coverage detected