----------------------------------------------------------------------------- Handle a message from the Z-Wave network -----------------------------------------------------------------------------
| 100 | // Handle a message from the Z-Wave network |
| 101 | //----------------------------------------------------------------------------- |
| 102 | bool 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> |
nothing calls this directly
no test coverage detected