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

Method RequestValue

cpp/src/command_classes/SwitchBinary.cpp:81–104  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

79// Request current value from the device
80//-----------------------------------------------------------------------------
81bool SwitchBinary::RequestValue
82(
83 uint32 const _requestFlags,
84 uint16 const _dummy1, // = 0 (not used)
85 uint8 const _instance,
86 Driver::MsgQueue const _queue
87)
88{
89 if ( m_com.GetFlagBool(COMPAT_FLAG_GETSUPPORTED) )
90 {
91 Msg* msg = new Msg( "SwitchBinaryCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
92 msg->SetInstance( this, _instance );
93 msg->Append( GetNodeId() );
94 msg->Append( 2 );
95 msg->Append( GetCommandClassId() );
96 msg->Append( SwitchBinaryCmd_Get );
97 msg->Append( GetDriver()->GetTransmitOptions() );
98 GetDriver()->SendMsg( msg, _queue );
99 return true;
100 } else {
101 Log::Write( LogLevel_Info, GetNodeId(), "SwitchBinaryCmd_Get Not Supported on this node");
102 }
103 return false;
104}
105
106//-----------------------------------------------------------------------------
107// <SwitchBinary::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