----------------------------------------------------------------------------- Request current value from the device -----------------------------------------------------------------------------
| 160 | // Request current value from the device |
| 161 | //----------------------------------------------------------------------------- |
| 162 | bool DoorLock::RequestValue |
| 163 | ( |
| 164 | uint32 const _requestFlags, |
| 165 | uint16 const _what, |
| 166 | uint8 const _instance, |
| 167 | Driver::MsgQueue const _queue |
| 168 | ) |
| 169 | { |
| 170 | if ( _what >= Value_System_Config_Mode) { |
| 171 | Msg* msg = new Msg( "DoorLockCmd_Configuration_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() ); |
| 172 | msg->SetInstance( this, _instance ); |
| 173 | msg->Append( GetNodeId() ); |
| 174 | msg->Append( 2 ); |
| 175 | msg->Append( GetCommandClassId() ); |
| 176 | msg->Append( DoorLockCmd_Configuration_Get ); |
| 177 | msg->Append( GetDriver()->GetTransmitOptions() ); |
| 178 | GetDriver()->SendMsg( msg, _queue ); |
| 179 | return true; |
| 180 | |
| 181 | } else if ((_what == Value_Lock) || (_what == Value_Lock_Mode)) { |
| 182 | |
| 183 | if ( m_com.GetFlagBool(COMPAT_FLAG_GETSUPPORTED) ) |
| 184 | { |
| 185 | Msg* msg = new Msg( "DoorLockCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() ); |
| 186 | msg->SetInstance( this, _instance ); |
| 187 | msg->Append( GetNodeId() ); |
| 188 | msg->Append( 2 ); |
| 189 | msg->Append( GetCommandClassId() ); |
| 190 | msg->Append( DoorLockCmd_Get ); |
| 191 | msg->Append( GetDriver()->GetTransmitOptions() ); |
| 192 | GetDriver()->SendMsg( msg, _queue ); |
| 193 | return true; |
| 194 | } else { |
| 195 | Log::Write( LogLevel_Info, GetNodeId(), "DoorLockCmd_Get Not Supported on this node"); |
| 196 | } |
| 197 | } |
| 198 | return false; |
| 199 | } |
| 200 | |
| 201 | |
| 202 | //----------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected