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

Method CreateVars

cpp/src/command_classes/ControllerReplication.cpp:306–327  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Create the values managed by this command class -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

304// Create the values managed by this command class
305//-----------------------------------------------------------------------------
306void ControllerReplication::CreateVars
307(
308 uint8 const _instance
309)
310{
311 if( Node* node = GetNodeUnsafe() )
312 {
313 node->CreateValueByte( ValueID::ValueGenre_System, GetCommandClassId(), _instance, ControllerReplicationIndex_NodeId, "Node", "", false, false, 0, 0 );
314 vector<ValueList::Item> items;
315
316 ValueList::Item item;
317 for( uint8 i=0; i<4; ++i )
318 {
319 item.m_label = c_controllerReplicationFunctionNames[i];
320 item.m_value = ControllerReplicationCmd_TransferGroup + i;
321 items.push_back( item );
322 }
323
324 node->CreateValueList( ValueID::ValueGenre_System, GetCommandClassId(), _instance, ControllerReplicationIndex_Function, "Functions", "", false, false, 1, items, 0, 0 );
325 node->CreateValueButton( ValueID::ValueGenre_System, GetCommandClassId(), _instance, ControllerReplicationIndex_Replicate, "Replicate", 0 );
326 }
327}

Callers

nothing calls this directly

Calls 4

GetCommandClassIdFunction · 0.85
CreateValueByteMethod · 0.80
CreateValueListMethod · 0.80
CreateValueButtonMethod · 0.80

Tested by

no test coverage detected