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

Method CreateVars

cpp/src/command_classes/Clock.cpp:237–257  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

235// Create the values managed by this command class
236//-----------------------------------------------------------------------------
237void Clock::CreateVars
238(
239 uint8 const _instance
240)
241{
242 if( Node* node = GetNodeUnsafe() )
243 {
244 vector<ValueList::Item> items;
245 for( int i=1; i<=7; ++i )
246 {
247 ValueList::Item item;
248 item.m_label = c_dayNames[i];
249 item.m_value = i;
250 items.push_back( item );
251 }
252
253 node->CreateValueList( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ClockIndex_Day, "Day", "", false, false, 1, items, 0, 0 );
254 node->CreateValueByte( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ClockIndex_Hour, "Hour", "", false, false, 12, 0 );
255 node->CreateValueByte( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ClockIndex_Minute, "Minute", "", false, false, 0, 0 );
256 }
257}

Callers

nothing calls this directly

Calls 3

GetCommandClassIdFunction · 0.85
CreateValueListMethod · 0.80
CreateValueByteMethod · 0.80

Tested by

no test coverage detected