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

Method CreateVars

cpp/src/command_classes/SwitchAll.cpp:209–227  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

207// Create the values managed by this command class
208//-----------------------------------------------------------------------------
209void SwitchAll::CreateVars
210(
211 uint8 const _instance
212)
213{
214 if( Node* node = GetNodeUnsafe() )
215 {
216 vector<ValueList::Item> items;
217 for( int i=0; i<4; ++i )
218 {
219 ValueList::Item item;
220 item.m_label = c_switchAllStateName[i];
221 item.m_value = (i==3) ? 0x000000ff : i;
222 items.push_back( item );
223 }
224
225 node->CreateValueList( ValueID::ValueGenre_System, GetCommandClassId(), _instance, 0, "Switch All", "", false, false, 1, items, 0, 0 );
226 }
227}
228
229
230

Callers

nothing calls this directly

Calls 2

GetCommandClassIdFunction · 0.85
CreateValueListMethod · 0.80

Tested by

no test coverage detected