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

Method HandleMultiInstanceReport

cpp/src/command_classes/MultiInstance.cpp:232–250  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Handle a message from the Z-Wave network -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

230// Handle a message from the Z-Wave network
231//-----------------------------------------------------------------------------
232void MultiInstance::HandleMultiInstanceReport
233(
234 uint8 const* _data,
235 uint32 const _length
236)
237{
238 if( Node* node = GetNodeUnsafe() )
239 {
240 uint8 commandClassId = _data[1];
241 uint8 instances = _data[2];
242
243 if( CommandClass* pCommandClass = node->GetCommandClass( commandClassId ) )
244 {
245 Log::Write( LogLevel_Info, GetNodeId(), "Received MultiInstanceReport from node %d for %s: Number of instances = %d", GetNodeId(), pCommandClass->GetCommandClassName().c_str(), instances );
246 pCommandClass->SetInstances( instances );
247 pCommandClass->ClearStaticRequest( StaticRequest_Instances );
248 }
249 }
250}
251
252//-----------------------------------------------------------------------------
253// <MultiInstance::HandleMultiInstanceEncap>

Callers

nothing calls this directly

Calls 7

WriteFunction · 0.85
GetCommandClassMethod · 0.80
SetInstancesMethod · 0.80
ClearStaticRequestMethod · 0.80
GetNodeIdFunction · 0.70
c_strMethod · 0.45
GetCommandClassNameMethod · 0.45

Tested by

no test coverage detected