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

Method RequestState

cpp/src/command_classes/Meter.cpp:143–173  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Request current state from the device -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

141// Request current state from the device
142//-----------------------------------------------------------------------------
143bool Meter::RequestState
144(
145 uint32 const _requestFlags,
146 uint8 const _instance,
147 Driver::MsgQueue const _queue
148)
149{
150 bool res = false;
151 if( GetVersion() > 1 )
152 {
153 if( _requestFlags & RequestFlag_Static )
154 {
155 Msg* msg = new Msg( "MeterCmd_SupportedGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
156 msg->SetInstance( this, _instance );
157 msg->Append( GetNodeId() );
158 msg->Append( 2 );
159 msg->Append( GetCommandClassId() );
160 msg->Append( MeterCmd_SupportedGet );
161 msg->Append( GetDriver()->GetTransmitOptions() );
162 GetDriver()->SendMsg( msg, _queue );
163 res = true;
164 }
165 }
166
167 if( _requestFlags & RequestFlag_Dynamic )
168 {
169 res |= RequestValue( _requestFlags, 0, _instance, _queue );
170 }
171
172 return res;
173}
174
175//-----------------------------------------------------------------------------
176// <Meter::RequestValue>

Callers

nothing calls this directly

Calls 7

GetVersionFunction · 0.85
GetCommandClassIdFunction · 0.85
RequestValueFunction · 0.85
SendMsgMethod · 0.80
GetNodeIdFunction · 0.70
SetInstanceMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected