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

Method CreateVars

cpp/src/command_classes/Protection.cpp:173–192  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

171// Create the values managed by this command class
172//-----------------------------------------------------------------------------
173void Protection::CreateVars
174(
175 uint8 const _instance
176)
177{
178 if( Node* node = GetNodeUnsafe() )
179 {
180 vector<ValueList::Item> items;
181
182 ValueList::Item item;
183 for( uint8 i=0; i<3; ++i )
184 {
185 item.m_label = c_protectionStateNames[i];
186 item.m_value = i;
187 items.push_back( item );
188 }
189
190 node->CreateValueList( ValueID::ValueGenre_System, GetCommandClassId(), _instance, 0, "Protection", "", false, false, 1, items, 0, 0 );
191 }
192}

Callers

nothing calls this directly

Calls 2

GetCommandClassIdFunction · 0.85
CreateValueListMethod · 0.80

Tested by

no test coverage detected