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

Method RequestValue

cpp/src/command_classes/Powerlevel.cpp:115–141  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Request current value from the device -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

113// Request current value from the device
114//-----------------------------------------------------------------------------
115bool Powerlevel::RequestValue
116(
117 uint32 const _requestFlags,
118 uint16 const _index,
119 uint8 const _instance,
120 Driver::MsgQueue const _queue
121)
122{
123 if( _index == 0 )
124 {
125 if ( m_com.GetFlagBool(COMPAT_FLAG_GETSUPPORTED) )
126 {
127 Msg* msg = new Msg( "PowerlevelCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
128 msg->SetInstance( this, _instance );
129 msg->Append( GetNodeId() );
130 msg->Append( 2 );
131 msg->Append( GetCommandClassId() );
132 msg->Append( PowerlevelCmd_Get );
133 msg->Append( GetDriver()->GetTransmitOptions() );
134 GetDriver()->SendMsg( msg, _queue );
135 return true;
136 } else {
137 Log::Write( LogLevel_Info, GetNodeId(), "Powerlevel_Get Not Supported on this node");
138 }
139 }
140 return false;
141}
142
143//-----------------------------------------------------------------------------
144// <Powerlevel::HandleMsg>

Callers

nothing calls this directly

Calls 7

GetCommandClassIdFunction · 0.85
WriteFunction · 0.85
GetFlagBoolMethod · 0.80
SendMsgMethod · 0.80
GetNodeIdFunction · 0.70
SetInstanceMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected