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