----------------------------------------------------------------------------- Request current value from the device -----------------------------------------------------------------------------
| 79 | // Request current value from the device |
| 80 | //----------------------------------------------------------------------------- |
| 81 | bool SwitchBinary::RequestValue |
| 82 | ( |
| 83 | uint32 const _requestFlags, |
| 84 | uint16 const _dummy1, // = 0 (not used) |
| 85 | uint8 const _instance, |
| 86 | Driver::MsgQueue const _queue |
| 87 | ) |
| 88 | { |
| 89 | if ( m_com.GetFlagBool(COMPAT_FLAG_GETSUPPORTED) ) |
| 90 | { |
| 91 | Msg* msg = new Msg( "SwitchBinaryCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() ); |
| 92 | msg->SetInstance( this, _instance ); |
| 93 | msg->Append( GetNodeId() ); |
| 94 | msg->Append( 2 ); |
| 95 | msg->Append( GetCommandClassId() ); |
| 96 | msg->Append( SwitchBinaryCmd_Get ); |
| 97 | msg->Append( GetDriver()->GetTransmitOptions() ); |
| 98 | GetDriver()->SendMsg( msg, _queue ); |
| 99 | return true; |
| 100 | } else { |
| 101 | Log::Write( LogLevel_Info, GetNodeId(), "SwitchBinaryCmd_Get Not Supported on this node"); |
| 102 | } |
| 103 | return false; |
| 104 | } |
| 105 | |
| 106 | //----------------------------------------------------------------------------- |
| 107 | // <SwitchBinary::HandleMsg> |
nothing calls this directly
no test coverage detected