----------------------------------------------------------------------------- Create the values managed by this command class -----------------------------------------------------------------------------
| 377 | // Create the values managed by this command class |
| 378 | //----------------------------------------------------------------------------- |
| 379 | void ClimateControlSchedule::CreateVars |
| 380 | ( |
| 381 | uint8 const _instance |
| 382 | ) |
| 383 | { |
| 384 | if( Node* node = GetNodeUnsafe() ) |
| 385 | { |
| 386 | // Add a ValueSchedule for each day of the week. |
| 387 | for( uint8 i=0; i<7; ++i ) |
| 388 | { |
| 389 | node->CreateValueSchedule( ValueID::ValueGenre_User, GetCommandClassId(), _instance, i+1, c_dayNames[i+1], "", false, false, 0 ); |
| 390 | } |
| 391 | |
| 392 | // Add values for the override state and setback |
| 393 | vector<ValueList::Item> items; |
| 394 | |
| 395 | ValueList::Item item; |
| 396 | for( uint8 i=0; i<3; ++i ) |
| 397 | { |
| 398 | item.m_label = c_overrideStateNames[i]; |
| 399 | item.m_value = i; |
| 400 | items.push_back( item ); |
| 401 | } |
| 402 | |
| 403 | node->CreateValueList( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ClimateControlScheduleIndex_OverrideState, "Override State", "", false, false, 1, items, 0, 0 ); |
| 404 | node->CreateValueByte( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ClimateControlScheduleIndex_OverrideSetback, "Override Setback", "", false, false, 0, 0 ); |
| 405 | } |
| 406 | } |
| 407 |
nothing calls this directly
no test coverage detected