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

Method RequestCommandClassVersion

cpp/src/command_classes/Version.cpp:189–211  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Request the version of a command class used by the device -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

187// Request the version of a command class used by the device
188//-----------------------------------------------------------------------------
189bool Version::RequestCommandClassVersion
190(
191 CommandClass const* _commandClass
192)
193{
194 if( m_com.GetFlagBool(COMPAT_FLAG_VERSION_GETCLASSVERSION) )
195 {
196 if( _commandClass->HasStaticRequest( StaticRequest_Version ) )
197 {
198 Msg* msg = new Msg( "VersionCmd_CommandClassGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
199 msg->Append( GetNodeId() );
200 msg->Append( 3 );
201 msg->Append( GetCommandClassId() );
202 msg->Append( VersionCmd_CommandClassGet );
203 msg->Append( _commandClass->GetCommandClassId() );
204 msg->Append( GetDriver()->GetTransmitOptions() );
205 GetDriver()->SendMsg( msg, Driver::MsgQueue_Send );
206 return true;
207 }
208 }
209
210 return false;
211}
212
213//-----------------------------------------------------------------------------
214// <Version::CreateVars>

Callers 1

AdvanceQueriesMethod · 0.80

Calls 6

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

Tested by

no test coverage detected