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