----------------------------------------------------------------------------- Request current state from the device -----------------------------------------------------------------------------
| 141 | // Request current state from the device |
| 142 | //----------------------------------------------------------------------------- |
| 143 | bool Meter::RequestState |
| 144 | ( |
| 145 | uint32 const _requestFlags, |
| 146 | uint8 const _instance, |
| 147 | Driver::MsgQueue const _queue |
| 148 | ) |
| 149 | { |
| 150 | bool res = false; |
| 151 | if( GetVersion() > 1 ) |
| 152 | { |
| 153 | if( _requestFlags & RequestFlag_Static ) |
| 154 | { |
| 155 | Msg* msg = new Msg( "MeterCmd_SupportedGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() ); |
| 156 | msg->SetInstance( this, _instance ); |
| 157 | msg->Append( GetNodeId() ); |
| 158 | msg->Append( 2 ); |
| 159 | msg->Append( GetCommandClassId() ); |
| 160 | msg->Append( MeterCmd_SupportedGet ); |
| 161 | msg->Append( GetDriver()->GetTransmitOptions() ); |
| 162 | GetDriver()->SendMsg( msg, _queue ); |
| 163 | res = true; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | if( _requestFlags & RequestFlag_Dynamic ) |
| 168 | { |
| 169 | res |= RequestValue( _requestFlags, 0, _instance, _queue ); |
| 170 | } |
| 171 | |
| 172 | return res; |
| 173 | } |
| 174 | |
| 175 | //----------------------------------------------------------------------------- |
| 176 | // <Meter::RequestValue> |
nothing calls this directly
no test coverage detected