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

Method HandleMsg

cpp/src/command_classes/SwitchToggleMultilevel.cpp:102–122  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

100// Handle a message from the Z-Wave network
101//-----------------------------------------------------------------------------
102bool SwitchToggleMultilevel::HandleMsg
103(
104 uint8 const* _data,
105 uint32 const _length,
106 uint32 const _instance // = 1
107)
108{
109 if( SwitchToggleMultilevelCmd_Report == (SwitchToggleMultilevelCmd)_data[0] )
110 {
111 Log::Write( LogLevel_Info, GetNodeId(), "Received SwitchToggleMultiLevel report: level=%d", _data[1] );
112
113 if( ValueByte* value = static_cast<ValueByte*>( GetValue( _instance, 0 ) ) )
114 {
115 value->OnValueRefreshed( _data[1] );
116 value->Release();
117 }
118 return true;
119 }
120
121 return false;
122}
123
124//-----------------------------------------------------------------------------
125// <SwitchToggleMultilevel::SetValue>

Callers

nothing calls this directly

Calls 4

WriteFunction · 0.85
GetNodeIdFunction · 0.70
OnValueRefreshedMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected