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

Method HandleMsg

cpp/src/command_classes/Lock.cpp:100–120  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

98// Handle a message from the Z-Wave network
99//-----------------------------------------------------------------------------
100bool 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>

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