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

Method CreateVars

cpp/src/command_classes/WakeUp.cpp:516–543  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

514// Create the values managed by this command class
515//-----------------------------------------------------------------------------
516void WakeUp::CreateVars
517(
518 uint8 const _instance
519)
520{
521 if( Node* node = GetNodeUnsafe() )
522 {
523 if( !node->IsController() ) // We don't add the interval value for controllers, because they don't appear to ever wake up on their own.
524 {
525 switch( GetVersion() )
526 {
527 case 1:
528 {
529 node->CreateValueInt( ValueID::ValueGenre_System, GetCommandClassId(), _instance, 0, "Wake-up Interval", "Seconds", false, false, 3600, 0 );
530 break;
531 }
532 case 2:
533 {
534 node->CreateValueInt( ValueID::ValueGenre_System, GetCommandClassId(), _instance, 1, "Minimum Wake-up Interval", "Seconds", true, false, 0, 0 );
535 node->CreateValueInt( ValueID::ValueGenre_System, GetCommandClassId(), _instance, 2, "Maximum Wake-up Interval", "Seconds", true, false, 0, 0 );
536 node->CreateValueInt( ValueID::ValueGenre_System, GetCommandClassId(), _instance, 3, "Default Wake-up Interval", "Seconds", true, false, 0, 0 );
537 node->CreateValueInt( ValueID::ValueGenre_System, GetCommandClassId(), _instance, 4, "Wake-up Interval Step", "Seconds", true, false, 0, 0 );
538 break;
539 }
540 }
541 }
542 }
543}

Callers

nothing calls this directly

Calls 4

GetVersionFunction · 0.85
GetCommandClassIdFunction · 0.85
IsControllerMethod · 0.80
CreateValueIntMethod · 0.80

Tested by

no test coverage detected