----------------------------------------------------------------------------- Request current value from the device -----------------------------------------------------------------------------
| 101 | // Request current value from the device |
| 102 | //----------------------------------------------------------------------------- |
| 103 | bool 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> |
nothing calls this directly
no test coverage detected