MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / RequestValue

Method RequestValue

cpp/src/command_classes/WakeUp.cpp:154–194  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Nothing to do for wakeup -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

152// Nothing to do for wakeup
153//-----------------------------------------------------------------------------
154bool 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>

Callers

nothing calls this directly

Calls 4

GetCommandClassIdFunction · 0.85
SendMsgMethod · 0.80
GetNodeIdFunction · 0.70
AppendMethod · 0.45

Tested by

no test coverage detected