----------------------------------------------------------------------------- Handle a message from the Z-Wave network -----------------------------------------------------------------------------
| 97 | // Handle a message from the Z-Wave network |
| 98 | //----------------------------------------------------------------------------- |
| 99 | bool SwitchToggleBinary::HandleMsg |
| 100 | ( |
| 101 | uint8 const* _data, |
| 102 | uint32 const _length, |
| 103 | uint32 const _instance // = 1 |
| 104 | ) |
| 105 | { |
| 106 | if( SwitchToggleBinaryCmd_Report == (SwitchToggleBinaryCmd)_data[0] ) |
| 107 | { |
| 108 | Log::Write( LogLevel_Info, GetNodeId(), "Received SwitchToggleBinary report: %s", _data[1] ? "On" : "Off" ); |
| 109 | |
| 110 | if( ValueBool* value = static_cast<ValueBool*>( GetValue( _instance, 0 ) ) ) |
| 111 | { |
| 112 | value->OnValueRefreshed( _data[1] != 0 ); |
| 113 | value->Release(); |
| 114 | } |
| 115 | return true; |
| 116 | } |
| 117 | |
| 118 | return false; |
| 119 | } |
| 120 | |
| 121 | //----------------------------------------------------------------------------- |
| 122 | // <SwitchToggleBinary::SetValue> |
nothing calls this directly
no test coverage detected