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

Method HandleMsg

cpp/src/command_classes/Indicator.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 Indicator::HandleMsg
101(
102 uint8 const* _data,
103 uint32 const _length,
104 uint32 const _instance // = 1
105)
106{
107 if( IndicatorCmd_Report == (IndicatorCmd)_data[0] )
108 {
109 Log::Write( LogLevel_Info, GetNodeId(), "Received an Indicator report: Indicator=%d", _data[1] );
110
111 if( ValueByte* value = static_cast<ValueByte*>( GetValue( _instance, 0 ) ) )
112 {
113 value->OnValueRefreshed( _data[1] );
114 value->Release();
115 }
116 return true;
117 }
118
119 return false;
120}
121
122//-----------------------------------------------------------------------------
123// <Indicator::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