----------------------------------------------------------------------------- Nothing to do for wakeup -----------------------------------------------------------------------------
| 152 | // Nothing to do for wakeup |
| 153 | //----------------------------------------------------------------------------- |
| 154 | bool WakeUp::RequestValue |
| 155 | ( |
| 156 | uint32 const _requestFlags, |
| 157 | uint16 const _getTypeEnum, |
| 158 | uint8 const _instance, |
| 159 | Driver::MsgQueue const _queue |
| 160 | ) |
| 161 | { |
| 162 | if( _instance != 1 ) |
| 163 | { |
| 164 | // This command class doesn't work with multiple instances |
| 165 | return false; |
| 166 | } |
| 167 | |
| 168 | if( _getTypeEnum == WakeUpCmd_IntervalCapabilitiesGet ) |
| 169 | { |
| 170 | Msg* msg = new Msg( "WakeUpCmd_IntervalCapabilityGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() ); |
| 171 | msg->Append( GetNodeId() ); |
| 172 | msg->Append( 2 ); |
| 173 | msg->Append( GetCommandClassId() ); |
| 174 | msg->Append( WakeUpCmd_IntervalCapabilitiesGet ); |
| 175 | msg->Append( GetDriver()->GetTransmitOptions() ); |
| 176 | GetDriver()->SendMsg( msg, _queue ); |
| 177 | } |
| 178 | |
| 179 | |
| 180 | if( _getTypeEnum == 0 ) |
| 181 | { |
| 182 | // We won't get a response until the device next wakes up |
| 183 | Msg* msg = new Msg( "WakeUpCmd_IntervalGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() ); |
| 184 | msg->Append( GetNodeId() ); |
| 185 | msg->Append( 2 ); |
| 186 | msg->Append( GetCommandClassId() ); |
| 187 | msg->Append( WakeUpCmd_IntervalGet ); |
| 188 | msg->Append( GetDriver()->GetTransmitOptions() ); |
| 189 | GetDriver()->SendMsg( msg, _queue ); |
| 190 | return true; |
| 191 | } |
| 192 | |
| 193 | return false; |
| 194 | } |
| 195 | |
| 196 | //----------------------------------------------------------------------------- |
| 197 | // <WakeUp::HandleMsg> |
nothing calls this directly
no test coverage detected