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

Method RequestValue

cpp/src/command_classes/SoundSwitch.cpp:103–128  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

101// Request current value from the device
102//-----------------------------------------------------------------------------
103bool SoundSwitch::RequestValue
104(
105 uint32 const _requestFlags,
106 uint16 const _index, // = 0 (not used)
107 uint8 const _instance,
108 Driver::MsgQueue const _queue
109)
110{
111 if (_index == SoundSwitchIndex_Tone_Count ) {
112 if ( m_com.GetFlagBool(COMPAT_FLAG_GETSUPPORTED) )
113 {
114 Msg* msg = new Msg( "SoundSwitchCmd_Tones_Number_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
115 msg->SetInstance( this, _instance );
116 msg->Append( GetNodeId() );
117 msg->Append( 2 );
118 msg->Append( GetCommandClassId() );
119 msg->Append( SoundSwitchCmd_Tones_Number_Get );
120 msg->Append( GetDriver()->GetTransmitOptions() );
121 GetDriver()->SendMsg( msg, _queue );
122 return true;
123 } else {
124 Log::Write( LogLevel_Info, GetNodeId(), "SoundSwitchCmd_Tones_Number_Get Not Supported on this node");
125 }
126 }
127 return false;
128}
129
130//-----------------------------------------------------------------------------
131// <SoundSwitch::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