From 042b759f7c9049cf1846bc558ad09cb75eaed0dc Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 14 Dec 2021 08:50:09 -0500 Subject: [PATCH 01/12] Some level control lighting behaviours were disable by ember and zll unused defines. Add runtime attribute metadata checks to validate that the need attributes exist for that code. Replace the #ifdef gates to compiled that code by default but still allow toggling it off by defining the right IGNORE_LEVEL_CONTROL_XXX defines --- .../lighting-common/lighting-app.zap | 6 +- .../color-control-server.h | 4 + .../clusters/level-control/level-control.cpp | 322 ++++++++++-------- .../clusters/on-off-server/on-off-server.cpp | 29 +- .../clusters/on-off-server/on-off-server.h | 4 +- src/app/util/af.h | 9 - src/app/util/util.cpp | 20 ++ src/app/util/util.h | 4 + .../lighting-app/zap-generated/gen_config.h | 4 +- 9 files changed, 220 insertions(+), 182 deletions(-) diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index a0f66f9986e364..98f9feec03d8e9 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4919,7 +4919,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4949,7 +4949,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4964,7 +4964,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index 7ce355db3ee870..f76f16455bd4ab 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -270,3 +270,7 @@ void emberAfPluginColorControlServerXyTransitionEventHandler(chip::EndpointId en #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV void emberAfPluginColorControlServerHueSatTransitionEventHandler(chip::EndpointId endpoint); #endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV + +#ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP +void emberAfPluginLevelControlCoupledColorTempChangeCallback(chip::EndpointId endpoint); +#endif diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 7e0b574bc994f7..581b465756e440 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -48,12 +48,13 @@ #include #include #include +#include #include #ifdef EMBER_AF_PLUGIN_SCENES #include -#endif // EMBER_AF_PLUGIN_SCENES +#endif #ifdef EMBER_AF_PLUGIN_ON_OFF #include @@ -63,13 +64,17 @@ #include "app/framework/plugin/zll-level-control-server/zll-level-control-server.h" #endif // EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER +#ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP +#include +#endif + #include using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::LevelControl; -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL static bool areStartUpLevelControlServerAttributesTokenized(EndpointId endpoint); #endif @@ -120,12 +125,12 @@ static void setOnOffValue(EndpointId endpoint, bool onOff); static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs); static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride); -#if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint); #define updateCoupledColorTemp(endpoint) reallyUpdateCoupledColorTemp(endpoint) #else #define updateCoupledColorTemp(endpoint) -#endif // LEVEL...OPTIONS_ATTRIBUTE && COLOR...SERVER_TEMP +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS && EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP static void schedule(EndpointId endpoint, uint32_t delayMs) { @@ -143,7 +148,7 @@ static EmberAfLevelControlState * getState(EndpointId endpoint) return (ep == 0xFFFF ? NULL : &stateTable[ep]); } -#if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint) { uint8_t options; @@ -154,12 +159,15 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint) return; } - if (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL)) + if (emberAfContainsAttribute(endpoint, ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true)) { - emberAfPluginLevelControlCoupledColorTempChangeCallback(endpoint); + if (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL)) + { + emberAfPluginLevelControlCoupledColorTempChangeCallback(endpoint); + } } } -#endif // LEVEL...OPTIONS_ATTRIBUTE && COLOR...SERVER_TEMP +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS && EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { @@ -174,12 +182,12 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) state->elapsedTimeMs += state->eventDurationMs; -#if !defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER) if (emberAfPluginZllLevelControlServerIgnoreMoveToLevelMoveStepStop(endpoint, state->commandId)) { return; } -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS // Read the attribute; print error message and return if it can't be read status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); @@ -279,27 +287,30 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME_ATTRIBUTE - // Convert milliseconds to tenths of a second, rounding any fractional value - // up to the nearest whole value. This means: - // - // 0 ms = 0.00 ds = 0 ds - // 1 ms = 0.01 ds = 1 ds - // ... - // 100 ms = 1.00 ds = 1 ds - // 101 ms = 1.01 ds = 2 ds - // ... - // 200 ms = 2.00 ds = 2 ds - // 201 ms = 2.01 ds = 3 ds - // ... - // - // This is done to ensure that the attribute, in tenths of a second, only - // goes to zero when the remaining time in milliseconds is actually zero. - uint16_t remainingTimeDs = (remainingTimeMs + 99) / 100; - EmberStatus status = Attributes::LevelControlRemainingTime::Set(endpoint, remainingTypeDs); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, LevelControl::Attributes::RemainingTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: writing remaining time %x", status); + // Convert milliseconds to tenths of a second, rounding any fractional value + // up to the nearest whole value. This means: + // + // 0 ms = 0.00 ds = 0 ds + // 1 ms = 0.01 ds = 1 ds + // ... + // 100 ms = 1.00 ds = 1 ds + // 101 ms = 1.01 ds = 2 ds + // ... + // 200 ms = 2.00 ds = 2 ds + // 201 ms = 2.01 ds = 3 ds + // ... + // + // This is done to ensure that the attribute, in tenths of a second, only + // goes to zero when the remaining time in milliseconds is actually zero. + uint16_t remainingTimeDs = static_cast((remainingTimeMs + 99) / 100); + EmberStatus status = LevelControl::Attributes::RemainingTime::Set(endpoint, remainingTimeDs); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: writing remaining time %x", status); + } } #endif } @@ -317,86 +328,88 @@ static void setOnOffValue(EndpointId endpoint, bool onOff) static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE - // From 3.10.2.2.8.1 of ZCL7 document 14-0127-20j-zcl-ch-3-general.docx: - // "Command execution SHALL NOT continue beyond the Options processing if - // all of these criteria are true: - // - The command is one of the ‘without On/Off’ commands: Move, Move to - // Level, Stop, or Step. - // - The On/Off cluster exists on the same endpoint as this cluster. - // - The OnOff attribute of the On/Off cluster, on this endpoint, is 0x00 - // (FALSE). - // - The value of the ExecuteIfOff bit is 0." - if (commandId > Commands::Stop::Id) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::Options::Id, true)) { - return true; - } + // From 3.10.2.2.8.1 of ZCL7 document 14-0127-20j-zcl-ch-3-general.docx: + // "Command execution SHALL NOT continue beyond the Options processing if + // all of these criteria are true: + // - The command is one of the ‘without On/Off’ commands: Move, Move to + // Level, Stop, or Step. + // - The On/Off cluster exists on the same endpoint as this cluster. + // - The OnOff attribute of the On/Off cluster, on this endpoint, is 0x00 + // (FALSE). + // - The value of the ExecuteIfOff bit is 0." + if (commandId > Commands::Stop::Id) + { + return true; + } - if (!emberAfContainsServer(endpoint, OnOff::Id)) - { - return true; - } + if (!emberAfContainsServer(endpoint, OnOff::Id)) + { + return true; + } - uint8_t options; - EmberAfStatus status = Attributes::Options::Get(&options); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - emberAfLevelControlClusterPrintln("Unable to read Options attribute: 0x%X", status); - // If we can't read the attribute, then we should just assume that it has its - // default value. - options = 0x00; - } + uint8_t options; + EmberAfStatus status = Attributes::Options::Get(endpoint, &options); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("Unable to read Options attribute: 0x%X", status); + // If we can't read the attribute, then we should just assume that it has its + // default value. + options = 0x00; + } - bool on; - status = OnOff::Attributes::OnOff::Get(endpoint, &on); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - emberAfLevelControlClusterPrintln("Unable to read OnOff attribute: 0x%X", status); - return true; - } - // The device is on - hence ExecuteIfOff does not matter - if (on) - { - return true; - } - // The OptionsMask & OptionsOverride fields SHALL both be present or both - // omitted in the command. A temporary Options bitmap SHALL be created from - // the Options attribute, using the OptionsMask & OptionsOverride fields, if - // present. Each bit of the temporary Options bitmap SHALL be determined as - // follows: - // Each bit in the Options attribute SHALL determine the corresponding bit in - // the temporary Options bitmap, unless the OptionsMask field is present and - // has the corresponding bit set to 1, in which case the corresponding bit in - // the OptionsOverride field SHALL determine the corresponding bit in the - // temporary Options bitmap. - // The resulting temporary Options bitmap SHALL then be processed as defined - // in section 3.10.2.2.3. - - // ---------- The following order is important in decission making ------- - // -----------more readable ---------- - // - if (optionMask == 0xFF && optionOverride == 0xFF) - { - // 0xFF are the default values passed to the command handler when - // the payload is not present - in that case there is use of option - // attribute to decide execution of the command - return READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); - } - // ---------- The above is to distinguish if the payload is present or not + bool on; + status = OnOff::Attributes::OnOff::Get(endpoint, &on); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("Unable to read OnOff attribute: 0x%X", status); + return true; + } + // The device is on - hence ExecuteIfOff does not matter + if (on) + { + return true; + } + // The OptionsMask & OptionsOverride fields SHALL both be present or both + // omitted in the command. A temporary Options bitmap SHALL be created from + // the Options attribute, using the OptionsMask & OptionsOverride fields, if + // present. Each bit of the temporary Options bitmap SHALL be determined as + // follows: + // Each bit in the Options attribute SHALL determine the corresponding bit in + // the temporary Options bitmap, unless the OptionsMask field is present and + // has the corresponding bit set to 1, in which case the corresponding bit in + // the OptionsOverride field SHALL determine the corresponding bit in the + // temporary Options bitmap. + // The resulting temporary Options bitmap SHALL then be processed as defined + // in section 3.10.2.2.3. + + // ---------- The following order is important in decission making ------- + // -----------more readable ---------- + // + if (optionMask == 0xFF && optionOverride == 0xFF) + { + // 0xFF are the default values passed to the command handler when + // the payload is not present - in that case there is use of option + // attribute to decide execution of the command + return READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + } + // ---------- The above is to distinguish if the payload is present or not - if (READBITS(optionMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) - { - // Mask is present and set in the command payload, this indicates - // use the over ride as temporary option - return READBITS(optionOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + if (READBITS(optionMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) + { + // Mask is present and set in the command payload, this indicates + // use the over ride as temporary option + return READBITS(optionOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + } + // if we are here - use the option bits + return (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)); } - // if we are here - use the option bits - return (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)); -#else +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS // By default, we return true to continue supporting backwards compatibility. return true; -#endif } bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, @@ -575,23 +588,30 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran // as fast as it is able. if (transitionTimeDs == 0xFFFF) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - status = Attributes::OnOffTransitionTime::Get(endpoint, &transitionTimeDs); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnOffTransitionTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading on/off transition time %x", status); - goto send_default_response; - } + status = Attributes::OnOffTransitionTime::Get(endpoint, &transitionTimeDs); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading on/off transition time %x", status); + goto send_default_response; + } - // Transition time comes in (or is stored, in the case of On/Off Transition - // Time) as tenths of a second, but we work in milliseconds. - state->transitionTimeMs = (transitionTimeDs * MILLISECOND_TICKS_PER_SECOND / 10); -#else // ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - // If the Transition Time field is 0xFFFF and On/Off Transition Time, - // which is an optional attribute, is not present, the device shall move to - // its new level as fast as it is able. + // Transition time comes in (or is stored, in the case of On/Off Transition + // Time) as tenths of a second, but we work in milliseconds. + state->transitionTimeMs = (transitionTimeDs * MILLISECOND_TICKS_PER_SECOND / 10); + } + else + { + state->transitionTimeMs = FASTEST_TRANSITION_TIME_MS; + } +#else + // If the Transition Time field is 0xFFFF and On/Off Transition Time, + // which is an optional attribute, is not present, the device shall move to + // its new level as fast as it is able. state->transitionTimeMs = FASTEST_TRANSITION_TIME_MS; -#endif // ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME } else { @@ -893,9 +913,9 @@ static void stopHandler(CommandId commandId, uint8_t optionMask, uint8_t optionO // Quotes are from table 3.46. void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool newValue) { + app::DataModel::Nullable resolvedLevel; uint8_t temporaryCurrentLevelCache; uint16_t currentOnOffTransitionTime; - uint8_t resolvedLevel; uint8_t minimumLevelAllowedForTheDevice = MIN_LEVEL; EmberAfStatus status; @@ -908,30 +928,44 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new } // Read the OnLevel attribute. -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE - status = Attributes::OnLevel::Get(endpoint, &resolvedLevel); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnLevel::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); - return; - } + status = Attributes::OnLevel::Get(endpoint, resolvedLevel); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + return; + } - if (resolvedLevel == 0xFF) + if (resolvedLevel.Value() == 0xFF) + { + // OnLevel has undefined value; fall back to CurrentLevel. + resolvedLevel.Value() = temporaryCurrentLevelCache; + } + } + else { - // OnLevel has undefined value; fall back to CurrentLevel. - resolvedLevel = temporaryCurrentLevelCache; + resolvedLevel.Value() = temporaryCurrentLevelCache; } #else - resolvedLevel = temporaryCurrentLevelCache; + resolvedLevel.Value() = temporaryCurrentLevelCache; #endif // Read the OnOffTransitionTime attribute. -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - status = Attributes::OnOffTransitionTime::Get(endpoint, ¤tOnOffTransitionTime); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnOffTransitionTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); - return; + status = Attributes::OnOffTransitionTime::Get(endpoint, ¤tOnOffTransitionTime); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + return; + } + } + else + { + currentOnOffTransitionTime = 0xFFFF; } #else currentOnOffTransitionTime = 0xFFFF; @@ -950,7 +984,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // "Move CurrentLevel to OnLevel, or to the stored level if OnLevel is not // defined, over the time period OnOffTransitionTime." - moveToLevelHandler(Commands::MoveToLevel::Id, resolvedLevel, currentOnOffTransitionTime, 0xFF, 0xFF, + moveToLevelHandler(Commands::MoveToLevel::Id, resolvedLevel.Value(), currentOnOffTransitionTime, 0xFF, 0xFF, INVALID_STORED_LEVEL); // Don't revert to stored level } else @@ -969,7 +1003,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL // StartUp behavior relies StartUpCurrentLevel attributes being tokenized. if (areStartUpLevelControlServerAttributesTokenized(endpoint)) { @@ -1029,26 +1063,18 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) emberAfPluginLevelControlClusterServerPostInitCallback(endpoint); } -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL static bool areStartUpLevelControlServerAttributesTokenized(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); - if (!emberAfAttributeIsTokenized(metadata)) + if (emberAfHasTokenizedAttribute(endpoint, LevelControl::Id, Attributes::CurrentLevel::Id, true)) { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, EMBER_AF_NULL_MANUFACTURER_CODE); - if (!emberAfAttributeIsTokenized(metadata)) - { - return false; + if (emberAfHasTokenizedAttribute(endpoint, LevelControl::Id, Attributes::StartUpCurrentLevel::Id, true)) + { + return true; + } } - return true; + return false; } #endif diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index d844739d97b480..4c7233f71aa438 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -194,7 +195,7 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm void OnOffServer::initOnOffServer(chip::EndpointId endpoint) { -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF // StartUp behavior relies on OnOff and StartUpOnOff attributes being tokenized. if (areStartUpOnOffServerAttributesTokenized(endpoint)) { @@ -222,7 +223,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) { // Initialise updated value to 0 bool updatedOnOff = 0; - status = Attributes::OnOff::Get(endpoint, &udpateOnOff); + status = Attributes::OnOff::Get(endpoint, &updatedOnOff); if (status == EMBER_ZCL_STATUS_SUCCESS) { switch (startUpOnOff) @@ -481,28 +482,20 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) } } -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF bool OnOffServer::areStartUpOnOffServerAttributesTokenized(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::OnOff::Id, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); - if (!emberAfAttributeIsTokenized(metadata)) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::StartUpOnOff::Id, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); - if (!emberAfAttributeIsTokenized(metadata)) + if (emberAfHasTokenizedAttribute(endpoint, LevelControl::Id, Attributes::OnOff::Id, true)) { - return false; + if (emberAfHasTokenizedAttribute(endpoint, LevelControl::Id, Attributes::StartUpOnOff::Id, true)) + { + return true; + } } - return true; + return false; } -#endif // ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#endif // IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF /** * @brief event control object for an endpoint diff --git a/src/app/clusters/on-off-server/on-off-server.h b/src/app/clusters/on-off-server/on-off-server.h index 4e3c6efd845f3c..352229ed194f4e 100644 --- a/src/app/clusters/on-off-server/on-off-server.h +++ b/src/app/clusters/on-off-server/on-off-server.h @@ -62,9 +62,9 @@ class OnOffServer * Functions Definitions *********************************************************/ -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF bool areStartUpOnOffServerAttributesTokenized(chip::EndpointId endpoint); -#endif // ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#endif // IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF EmberEventControl * getEventControl(chip::EndpointId endpoint); EmberEventControl * configureEventControl(chip::EndpointId endpoint); diff --git a/src/app/util/af.h b/src/app/util/af.h index 9520b1ab588c71..b724f65af6aae6 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -94,15 +94,6 @@ EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask, uint16_t manufacturerCode); -#ifdef DOXYGEN_SHOULD_SKIP_THIS -/** @brief Returns true if the attribute exists. */ -bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode); -#else -#define emberAfContainsAttribute(endpoint, clusterId, attributeId, mask, manufacturerCode) \ - (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask, manufacturerCode) != NULL) -#endif - /** * @brief Returns true if endpoint contains a cluster, checking for mfg code. * diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 4a99b32d53d890..a4a1049e125547 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -1169,6 +1169,26 @@ uint8_t emberAfMake8bitEncodedChanPg(uint8_t page, uint8_t channel) } } +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, bool asServer) +{ + uint8_t mask = asServer ? CLUSTER_MASK_SERVER : CLUSTER_MASK_CLIENT; + return (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask, 0) != nullptr); +} + +bool emberAfHasTokenizedAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + bool asServer) +{ + uint8_t mask = asServer ? CLUSTER_MASK_SERVER : CLUSTER_MASK_CLIENT; + EmberAfAttributeMetadata * metadata = emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask, 0); + + if (metadata == nullptr) + { + return false; + } + + return emberAfAttributeIsTokenized(metadata); +} + chip::Messaging::ExchangeManager * chip::ExchangeManager() { return emAfExchangeMgr; diff --git a/src/app/util/util.h b/src/app/util/util.h index 5145a6de0c04a2..eb96609c229d87 100644 --- a/src/app/util/util.h +++ b/src/app/util/util.h @@ -289,6 +289,10 @@ uint8_t emberAfGetChannelFrom8bitEncodedChanPg(uint8_t chanPg); */ uint8_t emberAfMake8bitEncodedChanPg(uint8_t page, uint8_t channel); +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, bool asServer); +bool emberAfHasTokenizedAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + bool asServer); + namespace chip { chip::Messaging::ExchangeManager * ExchangeManager(); } // namespace chip diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index 1ce9f36f46e1aa..106c48d27b3aed 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -114,8 +114,8 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 1 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 // Use this macro to check if the server side of the Network Commissioning cluster is included From 161e5fb1e3510b83f482e0e2790572bfe0fe2fac Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 14 Dec 2021 10:57:47 -0500 Subject: [PATCH 02/12] Fix min and max Level usage and consideing the attributes and featuremap. add behaviour tied with lighting --- .../clusters/level-control/level-control.cpp | 109 ++++++++++-------- .../zcl/data-model/silabs/general.xml | 5 + 2 files changed, 64 insertions(+), 50 deletions(-) diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 581b465756e440..e4341e27e77da9 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -60,10 +60,6 @@ #include #endif // EMBER_AF_PLUGIN_ON_OFF -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER -#include "app/framework/plugin/zll-level-control-server/zll-level-control-server.h" -#endif // EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER - #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP #include #endif @@ -84,13 +80,8 @@ static bool areStartUpLevelControlServerAttributesTokenized(EndpointId endpoint) #define FASTEST_TRANSITION_TIME_MS (MILLISECOND_TICKS_PER_SECOND / EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE) #endif -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER -#define MIN_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MINIMUM_LEVEL -#define MAX_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MAXIMUM_LEVEL -#else -#define MIN_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL -#define MAX_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL -#endif +#define LEVEL_CONTROL_LIGHTING_MIN_LEVEL 0x01 +#define LEVEL_CONTROL_LIGHTING_MAX_LEVEL 0xFE #define INVALID_STORED_LEVEL 0xFFFF @@ -112,6 +103,9 @@ typedef struct static EmberAfLevelControlState stateTable[EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT]; +static uint8_t minLevel = EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL; +static uint8_t maxLevel = EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL; + static EmberAfLevelControlState * getState(EndpointId endpoint); static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t transitionTimeDs, uint8_t optionMask, @@ -148,7 +142,7 @@ static EmberAfLevelControlState * getState(EndpointId endpoint) return (ep == 0xFFFF ? NULL : &stateTable[ep]); } -#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) static void reallyUpdateCoupledColorTemp(EndpointId endpoint) { uint8_t options; @@ -167,7 +161,7 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint) } } } -#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS && EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { @@ -182,13 +176,6 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) state->elapsedTimeMs += state->eventDurationMs; -#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER) - if (emberAfPluginZllLevelControlServerIgnoreMoveToLevelMoveStepStop(endpoint, state->commandId)) - { - return; - } -#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS - // Read the attribute; print error message and return if it can't be read status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -208,13 +195,13 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) } else if (state->increasing) { - assert(currentLevel < MAX_LEVEL); + assert(currentLevel < maxLevel); assert(currentLevel < state->moveToLevel); currentLevel++; } else { - assert(MIN_LEVEL < currentLevel); + assert(minLevel < currentLevel); assert(state->moveToLevel < currentLevel); currentLevel--; } @@ -246,8 +233,8 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) if (state->commandId == Commands::MoveToLevelWithOnOff::Id || state->commandId == Commands::MoveWithOnOff::Id || state->commandId == Commands::StepWithOnOff::Id) { - setOnOffValue(endpoint, (currentLevel != MIN_LEVEL)); - if (currentLevel == MIN_LEVEL && state->useOnLevel) + setOnOffValue(endpoint, (currentLevel != minLevel)); + if (currentLevel == minLevel && state->useOnLevel) { status = Attributes::CurrentLevel::Set(endpoint, state->onLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -544,13 +531,13 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran // Move To Level commands cause the device to move from its current level to // the specified level at the specified rate. - if (MAX_LEVEL <= level) + if (maxLevel <= level) { - state->moveToLevel = MAX_LEVEL; + state->moveToLevel = maxLevel; } - else if (level <= MIN_LEVEL) + else if (level <= minLevel) { - state->moveToLevel = MIN_LEVEL; + state->moveToLevel = minLevel; } else { @@ -565,7 +552,7 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran { if (commandId == Commands::MoveToLevelWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -634,12 +621,15 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran schedule(endpoint, state->eventDurationMs); status = EMBER_ZCL_STATUS_SUCCESS; -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER if (commandId == Commands::MoveToLevelWithOnOff::Id) { - emberAfPluginZllLevelControlServerMoveToLevelWithOnOffZllExtensions(emberAfCurrentCommand()); + uint32_t featureMap; + if (Attributes::FeatureMap::Get(Endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && + READBITS(featureMap, EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING)) + { + OnOff::Attributes::GlobalSceneControl::Set(endpoint, true); + } } -#endif send_default_response: if (emberAfCurrentCommand()->apsFrame->clusterId == LevelControl::Id) @@ -686,13 +676,13 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin { case EMBER_ZCL_MOVE_MODE_UP: state->increasing = true; - state->moveToLevel = MAX_LEVEL; - difference = static_cast(MAX_LEVEL - currentLevel); + state->moveToLevel = maxLevel; + difference = static_cast(maxLevel - currentLevel); break; case EMBER_ZCL_MOVE_MODE_DOWN: state->increasing = false; - state->moveToLevel = MIN_LEVEL; - difference = currentLevel - MIN_LEVEL; + state->moveToLevel = minLevel; + difference = currentLevel - minLevel; break; default: status = EMBER_ZCL_STATUS_INVALID_FIELD; @@ -707,7 +697,7 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin { if (commandId == Commands::MoveWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -799,10 +789,10 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, { case EMBER_ZCL_STEP_MODE_UP: state->increasing = true; - if (MAX_LEVEL - currentLevel < stepSize) + if (maxLevel - currentLevel < stepSize) { - state->moveToLevel = MAX_LEVEL; - actualStepSize = static_cast(MAX_LEVEL - currentLevel); + state->moveToLevel = maxLevel; + actualStepSize = static_cast(maxLevel - currentLevel); } else { @@ -811,10 +801,10 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, break; case EMBER_ZCL_STEP_MODE_DOWN: state->increasing = false; - if (currentLevel - MIN_LEVEL < stepSize) + if (currentLevel - minLevel < stepSize) { - state->moveToLevel = MIN_LEVEL; - actualStepSize = (currentLevel - MIN_LEVEL); + state->moveToLevel = minLevel; + actualStepSize = (currentLevel - minLevel); } else { @@ -834,7 +824,7 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, { if (commandId == Commands::StepWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -916,7 +906,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new app::DataModel::Nullable resolvedLevel; uint8_t temporaryCurrentLevelCache; uint16_t currentOnOffTransitionTime; - uint8_t minimumLevelAllowedForTheDevice = MIN_LEVEL; + uint8_t minimumLevelAllowedForTheDevice = minLevel; EmberAfStatus status; // "Temporarily store CurrentLevel." @@ -1003,6 +993,25 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) { + // If Those read only attribute are enabled we use those values as our set minLevel and maxLevel + // if get isn't possible, value stats at default + Attributes::MinLevel::Get(endpoint, &minLevel); + Attributes::MaxLevel::Get(endpoint, &maxLevel); + + if (Attributes::FeatureMap::Get(Endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && + READBITS(featureMap, EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING)) + { + if (minLevel < LEVEL_CONTROL_LIGHTING_MIN_LEVEL) + { + minLevel = LEVEL_CONTROL_LIGHTING_MIN_LEVEL; + } + + if (maxLevel > LEVEL_CONTROL_LIGHTING_MAX_LEVEL) + { + maxLevel = LEVEL_CONTROL_LIGHTING_MAX_LEVEL; + } + } + #ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL // StartUp behavior relies StartUpCurrentLevel attributes being tokenized. if (areStartUpLevelControlServerAttributesTokenized(endpoint)) @@ -1032,7 +1041,7 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) switch (startUpCurrentLevel) { case STARTUP_CURRENT_LEVEL_USE_DEVICE_MINIMUM: - currentLevel = MIN_LEVEL; + currentLevel = minLevel; break; case STARTUP_CURRENT_LEVEL_USE_PREVIOUS_LEVEL: // Just fetched it. @@ -1041,13 +1050,13 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) // Otherwise set to specified value 0x01-0xFE. // But, need to enforce currentLevel's min/max, right? // Spec doesn't mention this. - if (startUpCurrentLevel < MIN_LEVEL) + if (startUpCurrentLevel < minLevel) { - currentLevel = MIN_LEVEL; + currentLevel = minLevel; } - else if (startUpCurrentLevel > MAX_LEVEL) + else if (startUpCurrentLevel > maxLevel) { - currentLevel = MAX_LEVEL; + currentLevel = maxLevel; } else { diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index c645bb2ac60628..3bd930e74a8f7b 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -469,6 +469,11 @@ limitations under the License. Command description for StopWithOnOff + + + + + Alarms From 052ef390074d014d2fb7e35400b2e376cc77db55 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 14 Dec 2021 11:26:39 -0500 Subject: [PATCH 03/12] Enable Feature map for level control and update cluster revision --- .../all-clusters-common/all-clusters-app.zap | 17 ++++++++++++++++- .../bridge-app/bridge-common/bridge-app.zap | 17 ++++++++++++++++- .../lighting-common/lighting-app.zap | 17 ++++++++++++++++- examples/tv-app/tv-common/tv-app.zap | 17 ++++++++++++++++- .../zcl/data-model/silabs/general.xml | 12 ++++++------ .../data_model/controller-clusters.zap | 17 ++++++++++++++++- 6 files changed, 86 insertions(+), 11 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index db4fdf6ecc0a55..cb9b8d40a6724a 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -8116,6 +8116,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -8125,7 +8140,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 79aa436e01699c..25dcb22ef100b3 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -3946,6 +3946,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -3955,7 +3970,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 98f9feec03d8e9..34e72f2f7e06ac 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -5120,6 +5120,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5129,7 +5144,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 0597f0a333dd27..228e48c909bfd9 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -8464,6 +8464,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -8473,7 +8488,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index 3bd930e74a8f7b..205ff2a402b3ec 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -391,7 +391,7 @@ limitations under the License. LEVEL_CONTROL_CLUSTER true true - + current level remaining time min level @@ -469,11 +469,6 @@ limitations under the License. Command description for StopWithOnOff - - - - - Alarms @@ -561,4 +556,9 @@ limitations under the License. status flags application type + + + + + diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 7290cbb0c2b783..ca56c8cee4f10c 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -956,6 +956,21 @@ } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -965,7 +980,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, From 984d4f104d0c5a3dd2737abc554d8249358c5105 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 14 Dec 2021 11:53:09 -0500 Subject: [PATCH 04/12] regen --- third_party/qpg_sdk/repo | 2 +- zzz_generated/app-common/app-common/zap-generated/enums.h | 6 ++++++ zzz_generated/lighting-app/zap-generated/gen_config.h | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index edb134291c9f0c..8742616cc7e8fe 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit edb134291c9f0cb661c2e95dcf643cd334dca810 +Subproject commit 8742616cc7e8fef7ec40241b9d6ff550627e0500 diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 93d0a3b6728194..08b47d90946fef 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -1104,6 +1104,12 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_IAS_ZONE_STATUS_BATTERY_DEFECT_OFFSET (9) #define EMBER_AF_LAMP_ALARM_MODE_LAMP_BURN_HOURS (1) #define EMBER_AF_LAMP_ALARM_MODE_LAMP_BURN_HOURS_OFFSET (0) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_ON_OFF (1) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_ON_OFF_OFFSET (0) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING (2) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING_OFFSET (1) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_FREQUENCY (4) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_FREQUENCY_OFFSET (2) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW (1) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW_OFFSET (0) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_HIGH (2) diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index 106c48d27b3aed..1ce9f36f46e1aa 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -114,8 +114,8 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 1 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 // Use this macro to check if the server side of the Network Commissioning cluster is included From 2ecce48fc8d3d6ab55c69017972cd126b45090f5 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 14 Dec 2021 12:16:18 -0500 Subject: [PATCH 05/12] enable test lvl control cluster revision and featuremap and update values --- .../tests/suites/certification/Test_TC_LVL_1_1.yaml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 111317c8d9a82b..9807cca38ece32 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -23,13 +23,11 @@ tests: cluster: "DelayCommands" command: "WaitForCommissionee" - #issue #12190 as per spec default value is 5 but expecting 3 - label: "read the global attribute: ClusterRevision" - disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 4 + value: 5 - label: "Read the global attribute constraints: ClusterRevision" command: "readAttribute" @@ -49,11 +47,10 @@ tests: error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" - disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 4 + value: 5 #issue #11053 disabled steps below Global attributes missing from YAML framework - label: "Read the global attribute: AttributeList" @@ -101,10 +98,9 @@ tests: command: "readAttribute" attribute: "FeatureMap" response: - value: 0 + value: 3 - label: "Read the optional global attribute : FeatureMap" - disabled: true command: "readAttribute" attribute: "FeatureMap" response: @@ -112,7 +108,6 @@ tests: type: map32 - label: "write the default values to optional global attribute: FeatureMap" - disabled: true command: "writeAttribute" attribute: "FeatureMap" arguments: @@ -125,4 +120,4 @@ tests: command: "readAttribute" attribute: "FeatureMap" response: - value: 0 + value: 3 From 283f77f4074833f2180fdf6300cf10edbd1c08f0 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 14 Dec 2021 12:34:34 -0500 Subject: [PATCH 06/12] regen --- .../clusters/level-control/level-control.cpp | 3 +- .../data_model/controller-clusters.zap | 15 ++ .../java/zap-generated/CHIPCallbackTypes.h | 2 + .../zap-generated/CHIPClustersRead-JNI.cpp | 34 ++++ .../chip/devicecontroller/ChipClusters.java | 7 + .../devicecontroller/ClusterReadMapping.java | 12 ++ .../python/chip/clusters/CHIPClusters.py | 5 + .../CHIPAttributeTLVValueDecoder.mm | 11 ++ .../CHIP/zap-generated/CHIPClustersObjc.h | 3 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 11 ++ .../CHIP/zap-generated/CHIPTestClustersObjc.h | 1 + .../zap-generated/CHIPTestClustersObjc.mm | 18 ++ .../Framework/CHIPTests/CHIPClustersTests.m | 115 ++++++++++++- .../zap-generated/cluster/Commands.h | 32 ++++ .../chip-tool/zap-generated/test/Commands.h | 157 ++++++++++++++++-- 15 files changed, 413 insertions(+), 13 deletions(-) diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index e4341e27e77da9..c8d24f9ec29366 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -998,7 +998,8 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) Attributes::MinLevel::Get(endpoint, &minLevel); Attributes::MaxLevel::Get(endpoint, &maxLevel); - if (Attributes::FeatureMap::Get(Endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && + uint32_t featureMap; + if (Attributes::FeatureMap::Get(endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && READBITS(featureMap, EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING)) { if (minLevel < LEVEL_CONTROL_LIGHTING_MIN_LEVEL) diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index ca56c8cee4f10c..fb834b4d085268 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1222,6 +1222,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 531732aec635a7..828735ec7226bd 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -585,6 +585,8 @@ typedef void (*CHIPLevelControlClusterStartUpCurrentLevelAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo::DecodableArgType); typedef void (*CHIPLevelControlClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::LevelControl::Attributes::AttributeList::TypeInfo::DecodableType &); +typedef void (*CHIPLevelControlClusterFeatureMapAttributeCallbackType)( + void *, chip::app::Clusters::LevelControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPLevelControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index d34965f01cd872..998ef239a24d1b 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -8622,6 +8622,40 @@ JNI_METHOD(void, LevelControlCluster, readAttributeListAttribute)(JNIEnv * env, onFailure.release(); } +JNI_METHOD(void, LevelControlCluster, readFeatureMapAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::FeatureMap::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, LevelControlCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 2357f6512e7e17..87b0e7127066c3 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -6090,6 +6090,10 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void readFeatureMapAttribute(LongAttributeCallback callback) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6216,6 +6220,9 @@ private native void subscribeStartUpCurrentLevelAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index b88892a190f0a1..0765cb15975efa 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -3304,6 +3304,18 @@ public Map> getReadAttributeMap() { readLevelControlAttributeListCommandParams); readLevelControlInteractionInfo.put( "readAttributeListAttribute", readLevelControlAttributeListAttributeInteractionInfo); + Map readLevelControlFeatureMapCommandParams = + new LinkedHashMap(); + InteractionInfo readLevelControlFeatureMapAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LevelControlCluster) cluster) + .readFeatureMapAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readLevelControlFeatureMapCommandParams); + readLevelControlInteractionInfo.put( + "readFeatureMapAttribute", readLevelControlFeatureMapAttributeInteractionInfo); Map readLevelControlClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readLevelControlClusterRevisionAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index b1bbe59f5c58a1..b71bdce227f13e 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2500,6 +2500,11 @@ class ChipClusters: "attributeId": 0x0000FFFB, "type": "int", }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 3c4b84ec5f5d05..dbbb12e012918f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -3953,6 +3953,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = array_0; return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 7cea8a544e8ed1..f10aae35734c04 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -2189,6 +2189,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 4662add387325b..4b18e03d7127d2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9311,6 +9311,17 @@ new CHIPLevelControlAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 00a81841930b3c..d57ce526b2316a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -520,6 +520,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMinFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index c5af15f8019223..17eec64f2c44d3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -5296,6 +5296,24 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 3e804f29c887d1..b6eb11a52ed2d1 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -10163,6 +10163,30 @@ - (void)testSendClusterTest_TC_LVL_1_1_000000_WaitForCommissionee [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 5U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; @@ -10181,7 +10205,7 @@ - (void)testSendClusterTest_TC_LVL_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_1_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_LVL_1_1_000003_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; @@ -10204,6 +10228,71 @@ - (void)testSendClusterTest_TC_LVL_1_1_000002_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_LVL_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 5U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional global attribute : FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute : FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000006_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to optional global attribute: FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id featureMapArgument; + featureMapArgument = [NSNumber numberWithUnsignedInt:0UL]; + [cluster writeAttributeFeatureMapWithValue:featureMapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_LVL_2_1_000000_WaitForCommissionee { @@ -42162,6 +42251,30 @@ - (void)testSendClusterLevelControlReadAttributeAttributeListWithCompletionHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterLevelControlReadAttributeFeatureMapWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeFeatureMapWithCompletionHandler"]; + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"LevelControl FeatureMap Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterLevelControlReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 65d27f9fd1e237..0236e536e05beb 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -21203,6 +21203,7 @@ class ReportKeypadInputClusterRevision : public ModelCommand | * DefaultMoveRate | 0x0014 | | * StartUpCurrentLevel | 0x4000 | | * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -22603,6 +22604,36 @@ class ReadLevelControlAttributeList : public ModelCommand } }; +/* + * Attribute FeatureMap + */ +class ReadLevelControlFeatureMap : public ModelCommand +{ +public: + ReadLevelControlFeatureMap() : ModelCommand("read") + { + AddArgument("attr-name", "feature-map"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlFeatureMap() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, uint32_t value) + { + OnGeneralAttributeResponse(context, "LevelControl.FeatureMap response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -51848,6 +51879,7 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 9a32144e3dc5d7..8345a9151634de 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -16047,13 +16047,29 @@ class Test_TC_LVL_1_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + case 3: ChipLogProgress(chipTool, - " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional global attribute : FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6(); break; } @@ -16066,7 +16082,7 @@ class Test_TC_LVL_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 7; static void OnFailureCallback_1(void * context, EmberAfStatus status) { @@ -16083,7 +16099,44 @@ class Test_TC_LVL_1_1 : public TestCommand (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_2(clusterRevision); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_4(clusterRevision); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_5(featureMap); + } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } // // Tests methods @@ -16095,7 +16148,7 @@ class Test_TC_LVL_1_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -16109,12 +16162,32 @@ class Test_TC_LVL_1_1 : public TestCommand void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } void OnSuccessResponse_1(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 5U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint16_t clusterRevision) { VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -16124,17 +16197,79 @@ class Test_TC_LVL_1_1 : public TestCommand clusterRevisionArgument = 4U; ReturnErrorOnFailure(cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) + void OnFailureResponse_3(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_2() { ThrowSuccessResponse(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 5U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_5() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint32_t featureMap) + { + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + + NextTest(); + } + + CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint32_t featureMapArgument; + featureMapArgument = 0UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + featureMapArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_6() { ThrowSuccessResponse(); } }; class Test_TC_LVL_2_1 : public TestCommand From 50c9dbbd73ade1870b99eb72280fc4c9463682e5 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 14 Dec 2021 14:28:03 -0500 Subject: [PATCH 07/12] Fix build for other platforms. Fix test LVL min max level changes with level controll ligthing feature Set max Level to 254 for all Set CurrentLevel And StatUpCurrentLevel to NVM storage to support Start up current level behaviour --- .../all-clusters-common/all-clusters-app.zap | 6 +++--- examples/bridge-app/bridge-common/bridge-app.zap | 6 +++--- .../lighting-app/lighting-common/lighting-app.zap | 8 ++++---- examples/thermostat/thermostat-common/thermostat.zap | 2 +- examples/tv-app/tv-common/tv-app.zap | 4 ++-- .../tv-casting-common/tv-casting-app.zap | 8 ++++---- src/app/clusters/level-control/level-control.cpp | 12 ++++++------ .../tests/suites/certification/Test_TC_LVL_3_1.yaml | 12 ++++++------ src/app/zap-templates/templates/app/gen_config.zapt | 2 +- .../zap-templates/zcl/data-model/silabs/general.xml | 2 +- src/controller/data_model/controller-clusters.zap | 2 +- third_party/openthread/ot-qorvo | 2 +- third_party/zap/repo | 2 +- .../all-clusters-app/zap-generated/endpoint_config.h | 2 +- .../all-clusters-app/zap-generated/gen_config.h | 2 +- .../bridge-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/bridge-app/zap-generated/gen_config.h | 2 +- .../chip-tool/zap-generated/test/Commands.h | 8 ++++---- .../lighting-app/zap-generated/gen_config.h | 2 +- .../placeholder/app1/zap-generated/gen_config.h | 2 +- .../placeholder/app2/zap-generated/gen_config.h | 2 +- zzz_generated/pump-app/zap-generated/gen_config.h | 2 +- zzz_generated/tv-app/zap-generated/gen_config.h | 2 +- .../tv-casting-app/zap-generated/gen_config.h | 2 +- 24 files changed, 48 insertions(+), 48 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index cb9b8d40a6724a..32963e01a988e3 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -7912,7 +7912,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -7960,7 +7960,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8107,7 +8107,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 25dcb22ef100b3..415fbc22a5e0aa 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -3742,7 +3742,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3790,7 +3790,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3937,7 +3937,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 34e72f2f7e06ac..e84673bde92951 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4709,7 +4709,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -4769,7 +4769,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4916,7 +4916,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -5111,7 +5111,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 72a105e2ef979a..eb224f5dd208e0 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -7469,7 +7469,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 228e48c909bfd9..96f6107e3000b9 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -8260,7 +8260,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -8455,7 +8455,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 4a41c7eead8a24..eb9ce6662958f7 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -7238,7 +7238,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -7433,7 +7433,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7451,7 +7451,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7466,7 +7466,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index c8d24f9ec29366..9b4224509fe9e6 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -142,7 +142,7 @@ static EmberAfLevelControlState * getState(EndpointId endpoint) return (ep == 0xFFFF ? NULL : &stateTable[ep]); } -#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint) { uint8_t options; @@ -161,7 +161,7 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint) } } } -#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS && EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { @@ -624,7 +624,7 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran if (commandId == Commands::MoveToLevelWithOnOff::Id) { uint32_t featureMap; - if (Attributes::FeatureMap::Get(Endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && + if (Attributes::FeatureMap::Get(endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && READBITS(featureMap, EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING)) { OnOff::Attributes::GlobalSceneControl::Set(endpoint, true); @@ -682,7 +682,7 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin case EMBER_ZCL_MOVE_MODE_DOWN: state->increasing = false; state->moveToLevel = minLevel; - difference = currentLevel - minLevel; + difference = static_cast(currentLevel - minLevel); break; default: status = EMBER_ZCL_STATUS_INVALID_FIELD; @@ -804,7 +804,7 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, if (currentLevel - minLevel < stepSize) { state->moveToLevel = minLevel; - actualStepSize = (currentLevel - minLevel); + actualStepSize = static_cast(currentLevel - minLevel); } else { @@ -994,7 +994,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) { // If Those read only attribute are enabled we use those values as our set minLevel and maxLevel - // if get isn't possible, value stats at default + // if get isn't possible, value stays at default Attributes::MinLevel::Get(endpoint, &minLevel); Attributes::MaxLevel::Get(endpoint, &maxLevel); diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index 246ee1e3515685..b7373cb9db4cf4 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -27,13 +27,13 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 0 + value: 1 - label: "reads max level attribute from DUT" command: "readAttribute" attribute: "max level" response: - value: 255 + value: 254 - label: "sends a Move up command" command: "Move" @@ -60,13 +60,13 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 255 + value: 254 - label: "reads min level attribute from DUT" command: "readAttribute" attribute: "min level" response: - value: 0 + value: 1 - label: "sends a Move down command" command: "Move" @@ -93,7 +93,7 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 0 + value: 1 - label: "Write default move rate attribute from DUT" command: "writeAttribute" @@ -133,4 +133,4 @@ tests: attribute: "current level" response: constraints: - notValue: 255 + notValue: 254 diff --git a/src/app/zap-templates/templates/app/gen_config.zapt b/src/app/zap-templates/templates/app/gen_config.zapt index d6e3dfad0eddae..6a88ddc37da67a 100644 --- a/src/app/zap-templates/templates/app/gen_config.zapt +++ b/src/app/zap-templates/templates/app/gen_config.zapt @@ -43,7 +43,7 @@ {{else if (isStrEqual name "Level Control")}} {{#if (isServer side)}} // User options for {{side}} plugin {{name}} -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 {{/if}} diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index 205ff2a402b3ec..40d9420affb140 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -395,7 +395,7 @@ limitations under the License. current level remaining time min level - max level + max level current frequency min frequency max frequency diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index fb834b4d085268..a31f82cc19c579 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1051,7 +1051,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/third_party/openthread/ot-qorvo b/third_party/openthread/ot-qorvo index db1990748c4f80..fc44db085e6e3d 160000 --- a/third_party/openthread/ot-qorvo +++ b/third_party/openthread/ot-qorvo @@ -1 +1 @@ -Subproject commit db1990748c4f801e75b2763ae492a1b37184d57a +Subproject commit fc44db085e6e3d95496f91432038914c4a294cce diff --git a/third_party/zap/repo b/third_party/zap/repo index d22a17a54c0b16..3a351d88489f2d 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit d22a17a54c0b16379acbb31ecc6d6d8092df4218 +Subproject commit 3a351d88489f2d77de469e52a216dc02b4f92d92 diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index ed9a383989188f..895b2c386556b0 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1677,7 +1677,7 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index f3d653e43ab817..9905fb5eb5dfab 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -259,7 +259,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 651fa813f44f5f..ffdd601589df06 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -804,7 +804,7 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ diff --git a/zzz_generated/bridge-app/zap-generated/gen_config.h b/zzz_generated/bridge-app/zap-generated/gen_config.h index 9803e3fc719eb2..8f46d8788c83fe 100644 --- a/zzz_generated/bridge-app/zap-generated/gen_config.h +++ b/zzz_generated/bridge-app/zap-generated/gen_config.h @@ -94,7 +94,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 8345a9151634de..1810ad5ca6fbb5 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -16869,7 +16869,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_1(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -16942,7 +16942,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_5(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 255)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); } @@ -17015,7 +17015,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_9(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -17107,7 +17107,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_14(uint8_t currentLevel) { - VerifyOrReturn(CheckConstraintNotValue("currentLevel", currentLevel, 255)); + VerifyOrReturn(CheckConstraintNotValue("currentLevel", currentLevel, 254)); NextTest(); } diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index 1ce9f36f46e1aa..df9ce1bc0331d6 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -114,7 +114,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_config.h b/zzz_generated/placeholder/app1/zap-generated/gen_config.h index c9929ba83dd5b0..839f8901cdb164 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_config.h @@ -81,7 +81,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/placeholder/app2/zap-generated/gen_config.h b/zzz_generated/placeholder/app2/zap-generated/gen_config.h index d00ef1b602b0a2..9f23d46f817f04 100644 --- a/zzz_generated/placeholder/app2/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/gen_config.h @@ -71,7 +71,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/pump-app/zap-generated/gen_config.h b/zzz_generated/pump-app/zap-generated/gen_config.h index e88eb960407f5d..5d3ad3f5d424ba 100644 --- a/zzz_generated/pump-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-app/zap-generated/gen_config.h @@ -102,7 +102,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/tv-app/zap-generated/gen_config.h b/zzz_generated/tv-app/zap-generated/gen_config.h index 44886faf0b7ca5..49f9fb0028b503 100644 --- a/zzz_generated/tv-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-app/zap-generated/gen_config.h @@ -161,7 +161,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_config.h b/zzz_generated/tv-casting-app/zap-generated/gen_config.h index 150102a30eecd3..ba87cf6932becc 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -221,7 +221,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 From 301585bc793edd28d87d291c47bf18cf340c28f8 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Wed, 15 Dec 2021 12:46:44 -0500 Subject: [PATCH 08/12] Change current level and Start up current level to NVM storage for the startup functionnality. Update yaml lvl control test support lighting device using a minimum level of 1 instead of 0 --- .../clusters/level-control/level-control.cpp | 58 +++++++++++-------- .../suites/certification/Test_TC_LVL_2_1.yaml | 4 +- .../suites/certification/Test_TC_LVL_3_1.yaml | 6 +- .../suites/certification/Test_TC_LVL_4_1.yaml | 12 +++- .../suites/certification/Test_TC_LVL_5_1.yaml | 8 ++- .../chip-tool/zap-generated/test/Commands.h | 15 +++-- .../zap-generated/endpoint_config.h | 21 +++---- 7 files changed, 76 insertions(+), 48 deletions(-) diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 9b4224509fe9e6..d6050cf295aa13 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -1013,30 +1013,30 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) } } -#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL - // StartUp behavior relies StartUpCurrentLevel attributes being tokenized. - if (areStartUpLevelControlServerAttributesTokenized(endpoint)) + uint8_t currentLevel = 0; + EmberAfStatus status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); + if (status == EMBER_ZCL_STATUS_SUCCESS) { - // Read the StartUpOnOff attribute and set the OnOff attribute as per - // following from zcl 7 14-0127-20i-zcl-ch-3-general.doc. - // 3.10.2.2.14 StartUpCurrentLevel Attribute - // The StartUpCurrentLevel attribute SHALL define the desired startup level - // for a device when it is supplied with power and this level SHALL be - // reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel - // attribute are listed below: - // Table 3 58. Values of the StartUpCurrentLevel Attribute - // Value Action on power up - // 0x00 Set the CurrentLevel attribute to the minimum value permitted on the device. - // 0x01-0xfe Set the CurrentLevel attribute to this value. - // 0xff Set the CurrentLevel attribute to its previous value. - - // Initialize startUpCurrentLevel to assume previous value for currentLevel. - uint8_t startUpCurrentLevel = STARTUP_CURRENT_LEVEL_USE_PREVIOUS_LEVEL; - EmberAfStatus status = Attributes::StartUpCurrentLevel::Get(endpoint, &startUpCurrentLevel); - if (status == EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL + // StartUp behavior relies StartUpCurrentLevel attributes being tokenized. + if (areStartUpLevelControlServerAttributesTokenized(endpoint)) { - uint8_t currentLevel = 0; - status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); + // Read the StartUpOnOff attribute and set the OnOff attribute as per + // following from zcl 7 14-0127-20i-zcl-ch-3-general.doc. + // 3.10.2.2.14 StartUpCurrentLevel Attribute + // The StartUpCurrentLevel attribute SHALL define the desired startup level + // for a device when it is supplied with power and this level SHALL be + // reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel + // attribute are listed below: + // Table 3 58. Values of the StartUpCurrentLevel Attribute + // Value Action on power up + // 0x00 Set the CurrentLevel attribute to the minimum value permitted on the device. + // 0x01-0xfe Set the CurrentLevel attribute to this value. + // 0xff Set the CurrentLevel attribute to its previous value. + + // Initialize startUpCurrentLevel to assume previous value for currentLevel. + uint8_t startUpCurrentLevel = STARTUP_CURRENT_LEVEL_USE_PREVIOUS_LEVEL; + status = Attributes::StartUpCurrentLevel::Get(endpoint, &startUpCurrentLevel); if (status == EMBER_ZCL_STATUS_SUCCESS) { switch (startUpCurrentLevel) @@ -1065,11 +1065,21 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) } break; } - status = Attributes::CurrentLevel::Set(endpoint, currentLevel); + Attributes::CurrentLevel::Set(endpoint, currentLevel); } } - } #endif + // In any case, we make sure that the respects min/max + if (currentLevel < minLevel) + { + Attributes::CurrentLevel::Set(endpoint, minLevel); + } + else if (currentLevel > maxLevel) + { + Attributes::CurrentLevel::Set(endpoint, maxLevel); + } + } + emberAfPluginLevelControlClusterServerPostInitCallback(endpoint); } diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml index 05407ec4697ac9..92ce96b0758ef1 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -27,7 +27,9 @@ tests: command: "readAttribute" attribute: "current Level" response: - value: 0 + constraints: + minValue: 0 + maxValue: 1 - label: "sends a Move to level command" command: "MoveToLevel" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index b7373cb9db4cf4..ce43687c03f72b 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -27,7 +27,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 1 + constraints: + minValue: 0 + maxValue: 1 - label: "reads max level attribute from DUT" command: "readAttribute" @@ -66,7 +68,7 @@ tests: command: "readAttribute" attribute: "min level" response: - value: 1 + value: 0 - label: "sends a Move down command" command: "Move" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index 43da0afcf0dcea..5e16072884eea1 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -54,7 +54,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 128 + constraints: + minValue: 128 + maxValue: 129 - label: "Sends step down command to DUT" command: "Step" @@ -83,7 +85,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 64 + constraints: + minValue: 64 + maxValue: 65 - label: "Sends a Step up command" command: "Step" @@ -112,7 +116,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 128 + constraints: + minValue: 128 + maxValue: 129 - label: "Sending off command" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml index 7e2cc8b2f28fd2..89542f7e9ba46a 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml @@ -56,7 +56,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 128 + constraints: + minValue: 128 + maxValue: 129 - label: "Sends a move up command to DUT" command: "Move" @@ -94,7 +96,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 133 + constraints: + minValue: 133 + maxValue: 134 - label: "Sending off command" cluster: "On/Off" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1810ad5ca6fbb5..3b995cf0658b0a 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -16446,7 +16446,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_1(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -16869,7 +16869,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_1(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 1)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -16889,7 +16889,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_2(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 255)); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); } @@ -17316,7 +17316,8 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_4(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 128)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 129)); NextTest(); } @@ -17370,7 +17371,8 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_7(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 64)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 64)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 65)); NextTest(); } @@ -17424,7 +17426,8 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_10(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 128)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 129)); NextTest(); } diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 098619b66074ed..0924657e44927f 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1332,13 +1332,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1350,9 +1350,10 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ From 05a4fd0f9770bf05e1c0413601c08f7e56f9f1d9 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Wed, 15 Dec 2021 13:53:07 -0500 Subject: [PATCH 09/12] rebase regen --- .../zap-generated/endpoint_config.h | 62 +++++++++++-------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index ffdd601589df06..884b6539d0a17c 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -272,14 +272,19 @@ /* 611 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ - /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ \ /* 615 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ + \ + /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ + \ + /* 619 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 619 - label list, */ \ + /* 623 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -545,14 +550,19 @@ /* 611 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ \ /* 615 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ + \ + /* 619 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 619 - label list, */ \ + /* 623 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -571,7 +581,7 @@ #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (74) +#define GENERATED_DEFAULTS_COUNT (75) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -604,7 +614,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 182 +#define GENERATED_ATTRIBUTE_COUNT 183 #define GENERATED_ATTRIBUTES \ { \ \ @@ -801,13 +811,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -819,9 +829,11 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -834,11 +846,11 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* current position */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } @@ -912,18 +924,18 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(155), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(171), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(175), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(176), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(180), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(181), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } @@ -932,7 +944,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 14, 995 }, { ZAP_CLUSTER_INDEX(14), 5, 291 }, \ + { ZAP_CLUSTER_INDEX(0), 14, 995 }, { ZAP_CLUSTER_INDEX(14), 5, 295 }, \ } // Largest attribute size is needed for various buffers @@ -942,7 +954,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1286) +#define ATTRIBUTE_MAX_SIZE (1290) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) From 3549c4bc021564a4b01120456c28bd9e20c1b2c7 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Fri, 17 Dec 2021 09:45:18 -0500 Subject: [PATCH 10/12] add level control effect on off commmands --- .../clusters/level-control/level-control.cpp | 19 +++++++++---------- .../clusters/on-off-server/on-off-server.cpp | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index d6050cf295aa13..a29c9f6fbf5e69 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -108,8 +108,8 @@ static uint8_t maxLevel = EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL; static EmberAfLevelControlState * getState(EndpointId endpoint); -static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t transitionTimeDs, uint8_t optionMask, - uint8_t optionOverride, uint16_t storedLevel); +static void moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, + uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel); static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, uint8_t optionOverride); static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTimeDs, uint8_t optionMask, uint8_t optionOverride); @@ -409,7 +409,7 @@ bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * command emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime, optionMask, optionOverride); - moveToLevelHandler(Commands::MoveToLevel::Id, level, transitionTime, optionMask, optionOverride, + moveToLevelHandler(emberAfCurrentEndpoint(), Commands::MoveToLevel::Id, level, transitionTime, optionMask, optionOverride, INVALID_STORED_LEVEL); // Don't revert to the stored level return true; } @@ -422,7 +422,7 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler auto & transitionTime = commandData.transitionTime; emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL_WITH_ON_OFF %x %2x", "RX level-control:", level, transitionTime); - moveToLevelHandler(Commands::MoveToLevelWithOnOff::Id, level, transitionTime, 0xFF, 0xFF, + moveToLevelHandler(emberAfCurrentEndpoint(), Commands::MoveToLevelWithOnOff::Id, level, transitionTime, 0xFF, 0xFF, INVALID_STORED_LEVEL); // Don't revert to the stored level return true; } @@ -496,10 +496,9 @@ bool emberAfLevelControlClusterStopWithOnOffCallback(app::CommandHandler * comma return true; } -static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t transitionTimeDs, uint8_t optionMask, - uint8_t optionOverride, uint16_t storedLevel) +static void moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, + uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel) { - EndpointId endpoint = emberAfCurrentEndpoint(); EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; uint8_t currentLevel; @@ -974,7 +973,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // "Move CurrentLevel to OnLevel, or to the stored level if OnLevel is not // defined, over the time period OnOffTransitionTime." - moveToLevelHandler(Commands::MoveToLevel::Id, resolvedLevel.Value(), currentOnOffTransitionTime, 0xFF, 0xFF, + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, resolvedLevel.Value(), currentOnOffTransitionTime, 0xFF, 0xFF, INVALID_STORED_LEVEL); // Don't revert to stored level } else @@ -982,8 +981,8 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // ...else if newValue is OnOff::Commands::Off::Id... // "Move CurrentLevel to the minimum level allowed for the device over the // time period OnOffTransitionTime." - moveToLevelHandler(Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF, 0xFF, - temporaryCurrentLevelCache); + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF, + 0xFF, temporaryCurrentLevelCache); // "If OnLevel is not defined, set the CurrentLevel to the stored level." // The emberAfLevelControlClusterServerTickCallback implementation handles diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 4c7233f71aa438..9a4f265b655984 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -156,12 +156,26 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm emberAfOnOffClusterPrintln("ERR: writing on/off %x", status); return status; } + + // If initiatedByLevelChange is false, then we assume that the level change + // ZCL stuff has not happened and we do it here + if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id)) + { + emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); + } } else // Set Off { emberAfOnOffClusterPrintln("Off Command - OnTime : 0"); Attributes::OnTime::Set(endpoint, 0); // Reset onTime + // If initiatedByLevelChange is false, then we assume that the level change + // ZCL stuff has not happened and we do it here + if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id)) + { + emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); + } + // write the new on/off value status = Attributes::OnOff::Set(endpoint, newValue); if (status != EMBER_ZCL_STATUS_SUCCESS) From 2ade6b4ba4da40781ae04d013ba729d80eac45d8 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Fri, 17 Dec 2021 10:00:52 -0500 Subject: [PATCH 11/12] rebase regen --- .../clusters/on-off-server/on-off-server.cpp | 4 + .../Framework/CHIPTests/CHIPClustersTests.m | 46 +- third_party/openthread/ot-qorvo | 2 +- third_party/qpg_sdk/repo | 2 +- third_party/zap/repo | 2 +- .../zap-generated/endpoint_config.h | 526 +++++++++--------- .../chip-tool/zap-generated/test/Commands.h | 6 - .../zap-generated/endpoint_config.h | 169 +++--- .../zap-generated/endpoint_config.h | 63 ++- .../tv-app/zap-generated/endpoint_config.h | 128 +++-- 10 files changed, 511 insertions(+), 437 deletions(-) diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 9a4f265b655984..0b548ea7d4d995 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -157,24 +157,28 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm return status; } +#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL // If initiatedByLevelChange is false, then we assume that the level change // ZCL stuff has not happened and we do it here if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id)) { emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); } +#endif } else // Set Off { emberAfOnOffClusterPrintln("Off Command - OnTime : 0"); Attributes::OnTime::Set(endpoint, 0); // Reset onTime +#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL // If initiatedByLevelChange is false, then we assume that the level change // ZCL stuff has not happened and we do it here if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id)) { emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); } +#endif // write the new on/off value status = Attributes::OnOff::Set(endpoint, newValue); diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index b6eb11a52ed2d1..a56dbdaf4c378c 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -10318,7 +10318,9 @@ - (void)testSendClusterTest_TC_LVL_2_1_000001_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } } [expectation fulfill]; @@ -10579,7 +10581,9 @@ - (void)testSendClusterTest_TC_LVL_3_1_000001_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } } [expectation fulfill]; @@ -10603,7 +10607,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000002_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -10660,7 +10664,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000005_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -10741,7 +10745,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000009_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + XCTAssertEqual([actualValue unsignedCharValue], 1); } [expectation fulfill]; @@ -10846,7 +10850,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000014_ReadAttribute { id actualValue = value; if (actualValue != nil) { - XCTAssertNotEqual([actualValue unsignedCharValue], 255); + XCTAssertNotEqual([actualValue unsignedCharValue], 254); } } @@ -10933,7 +10937,15 @@ - (void)testSendClusterTest_TC_LVL_4_1_000004_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 128); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 128); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 129); + } } [expectation fulfill]; @@ -10991,7 +11003,15 @@ - (void)testSendClusterTest_TC_LVL_4_1_000007_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 64); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 64); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 65); + } } [expectation fulfill]; @@ -11049,7 +11069,15 @@ - (void)testSendClusterTest_TC_LVL_4_1_000010_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 128); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 128); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 129); + } } [expectation fulfill]; diff --git a/third_party/openthread/ot-qorvo b/third_party/openthread/ot-qorvo index fc44db085e6e3d..db1990748c4f80 160000 --- a/third_party/openthread/ot-qorvo +++ b/third_party/openthread/ot-qorvo @@ -1 +1 @@ -Subproject commit fc44db085e6e3d95496f91432038914c4a294cce +Subproject commit db1990748c4f801e75b2763ae492a1b37184d57a diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index 8742616cc7e8fe..edb134291c9f0c 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit 8742616cc7e8fef7ec40241b9d6ff550627e0500 +Subproject commit edb134291c9f0cb661c2e95dcf643cd334dca810 diff --git a/third_party/zap/repo b/third_party/zap/repo index 3a351d88489f2d..d22a17a54c0b16 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 3a351d88489f2d77de469e52a216dc02b4f92d92 +Subproject commit d22a17a54c0b16379acbb31ecc6d6d8092df4218 diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 895b2c386556b0..872e831f0198fa 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -280,28 +280,33 @@ /* 632 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ + \ + /* 636 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ + \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 636 - BatteryVoltage, */ \ + /* 640 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 640 - BatteryTimeRemaining, */ \ + /* 644 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 644 - ActiveBatteryFaults, */ \ + /* 648 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 652 - FeatureMap, */ \ + /* 656 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 656 - FeatureMap, */ \ + /* 660 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 660 - label list, */ \ + /* 664 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -319,49 +324,49 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 914 - Description, */ \ + /* 918 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 921 - Language, */ \ + /* 925 - Language, */ \ 2, 'e', 'n', \ \ - /* 924 - AutoRelockTime, */ \ + /* 928 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 928 - FeatureMap, */ \ + /* 932 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 932 - LifetimeRunningHours, */ \ + /* 936 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 935 - Power, */ \ + /* 939 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 938 - LifetimeEnergyConsumed, */ \ + /* 942 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 942 - FeatureMap, */ \ + /* 946 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 946 - FeatureMap, */ \ + /* 950 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 950 - IAS CIE address, */ \ + /* 954 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ - /* 958 - channel list, */ \ + /* 962 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -379,7 +384,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1212 - target navigator list, */ \ + /* 1216 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -397,24 +402,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 1466 - start time, */ \ + /* 1470 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1474 - duration, */ \ + /* 1478 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1482 - playback speed, */ \ + /* 1486 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1486 - seek range end, */ \ + /* 1490 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1494 - seek range start, */ \ + /* 1498 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 1502 - media input list, */ \ + /* 1506 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -432,7 +437,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 1756 - accept header list, */ \ + /* 1760 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -448,12 +453,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2010 - supported streaming protocols, */ \ + /* 2014 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2014 - audio output list, */ \ + /* 2018 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -471,7 +476,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2268 - application launcher list, */ \ + /* 2272 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -489,61 +494,61 @@ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 2522 - bitmap32, */ \ + /* 2526 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2526 - bitmap64, */ \ + /* 2530 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2534 - int24u, */ \ + /* 2538 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2537 - int32u, */ \ + /* 2541 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2541 - int40u, */ \ + /* 2545 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2546 - int48u, */ \ + /* 2550 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2552 - int56u, */ \ + /* 2556 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2559 - int64u, */ \ + /* 2563 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2567 - int24s, */ \ + /* 2571 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2570 - int32s, */ \ + /* 2574 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2574 - int40s, */ \ + /* 2578 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2579 - int48s, */ \ + /* 2583 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2585 - int56s, */ \ + /* 2589 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2592 - int64s, */ \ + /* 2596 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2600 - float_single, */ \ + /* 2604 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2604 - float_double, */ \ + /* 2608 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2612 - epoch_us, */ \ + /* 2616 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2620 - epoch_s, */ \ + /* 2624 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2624 - list_long_octet_string, */ \ + /* 2628 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -598,65 +603,65 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3624 - nullable_bitmap32, */ \ + /* 3628 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3628 - nullable_bitmap64, */ \ + /* 3632 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3636 - nullable_int24u, */ \ + /* 3640 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3639 - nullable_int32u, */ \ + /* 3643 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3643 - nullable_int40u, */ \ + /* 3647 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3648 - nullable_int48u, */ \ + /* 3652 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3654 - nullable_int56u, */ \ + /* 3658 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3661 - nullable_int64u, */ \ + /* 3665 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3669 - nullable_int24s, */ \ + /* 3673 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3672 - nullable_int32s, */ \ + /* 3676 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3676 - nullable_int40s, */ \ + /* 3680 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3681 - nullable_int48s, */ \ + /* 3685 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3687 - nullable_int56s, */ \ + /* 3691 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3694 - nullable_int64s, */ \ + /* 3698 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3702 - nullable_float_single, */ \ + /* 3706 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3706 - nullable_float_double, */ \ + /* 3710 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 3714 - measurement type, */ \ + /* 3718 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3718 - total active power, */ \ + /* 3722 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 3722 - FeatureMap, */ \ + /* 3726 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -917,28 +922,33 @@ /* 632 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ + \ + /* 636 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 636 - BatteryVoltage, */ \ + /* 640 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 640 - BatteryTimeRemaining, */ \ + /* 644 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 644 - ActiveBatteryFaults, */ \ + /* 648 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 652 - FeatureMap, */ \ + /* 656 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 656 - FeatureMap, */ \ + /* 660 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 660 - label list, */ \ + /* 664 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -956,49 +966,49 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 914 - Description, */ \ + /* 918 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 921 - Language, */ \ + /* 925 - Language, */ \ 2, 'e', 'n', \ \ - /* 924 - AutoRelockTime, */ \ + /* 928 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 928 - FeatureMap, */ \ + /* 932 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 932 - LifetimeRunningHours, */ \ + /* 936 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 935 - Power, */ \ + /* 939 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 938 - LifetimeEnergyConsumed, */ \ + /* 942 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 942 - FeatureMap, */ \ + /* 946 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 946 - FeatureMap, */ \ + /* 950 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 950 - IAS CIE address, */ \ + /* 954 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ - /* 958 - channel list, */ \ + /* 962 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1016,7 +1026,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1212 - target navigator list, */ \ + /* 1216 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1034,24 +1044,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 1466 - start time, */ \ + /* 1470 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1474 - duration, */ \ + /* 1478 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1482 - playback speed, */ \ + /* 1486 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1486 - seek range end, */ \ + /* 1490 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1494 - seek range start, */ \ + /* 1498 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 1502 - media input list, */ \ + /* 1506 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1069,7 +1079,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 1756 - accept header list, */ \ + /* 1760 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1085,12 +1095,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2010 - supported streaming protocols, */ \ + /* 2014 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2014 - audio output list, */ \ + /* 2018 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1108,7 +1118,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2268 - application launcher list, */ \ + /* 2272 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1126,61 +1136,61 @@ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 2522 - bitmap32, */ \ + /* 2526 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2526 - bitmap64, */ \ + /* 2530 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2534 - int24u, */ \ + /* 2538 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2537 - int32u, */ \ + /* 2541 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2541 - int40u, */ \ + /* 2545 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2546 - int48u, */ \ + /* 2550 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2552 - int56u, */ \ + /* 2556 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2559 - int64u, */ \ + /* 2563 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2567 - int24s, */ \ + /* 2571 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2570 - int32s, */ \ + /* 2574 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2574 - int40s, */ \ + /* 2578 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2579 - int48s, */ \ + /* 2583 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2585 - int56s, */ \ + /* 2589 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2592 - int64s, */ \ + /* 2596 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2600 - float_single, */ \ + /* 2604 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2604 - float_double, */ \ + /* 2608 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2612 - epoch_us, */ \ + /* 2616 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2620 - epoch_s, */ \ + /* 2624 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2624 - list_long_octet_string, */ \ + /* 2628 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1235,71 +1245,71 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3624 - nullable_bitmap32, */ \ + /* 3628 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3628 - nullable_bitmap64, */ \ + /* 3632 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3636 - nullable_int24u, */ \ + /* 3640 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3639 - nullable_int32u, */ \ + /* 3643 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3643 - nullable_int40u, */ \ + /* 3647 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3648 - nullable_int48u, */ \ + /* 3652 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3654 - nullable_int56u, */ \ + /* 3658 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3661 - nullable_int64u, */ \ + /* 3665 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3669 - nullable_int24s, */ \ + /* 3673 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3672 - nullable_int32s, */ \ + /* 3676 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3676 - nullable_int40s, */ \ + /* 3680 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3681 - nullable_int48s, */ \ + /* 3685 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3687 - nullable_int56s, */ \ + /* 3691 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3694 - nullable_int64s, */ \ + /* 3698 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3702 - nullable_float_single, */ \ + /* 3706 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3706 - nullable_float_double, */ \ + /* 3710 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 3714 - measurement type, */ \ + /* 3718 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3718 - total active power, */ \ + /* 3722 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 3722 - FeatureMap, */ \ + /* 3726 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (140) +#define GENERATED_DEFAULTS_COUNT (141) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1392,7 +1402,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 588 +#define GENERATED_ATTRIBUTE_COUNT 589 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1674,13 +1684,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1692,9 +1702,11 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(636) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1724,13 +1736,13 @@ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(636) }, /* BatteryVoltage */ \ + { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(640) }, /* BatteryVoltage */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(640) }, /* BatteryTimeRemaining */ \ + { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(644) }, /* BatteryTimeRemaining */ \ { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(644) }, /* ActiveBatteryFaults */ \ + { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(648) }, /* ActiveBatteryFaults */ \ { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(652) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(656) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1740,11 +1752,11 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(656) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(660) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(660) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(664) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ @@ -1761,7 +1773,7 @@ { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedModes */ \ { 0x0002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ - { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(914) }, /* Description */ \ + { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(918) }, /* Description */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ @@ -1774,8 +1786,8 @@ { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x0018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(921) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(924) }, /* AutoRelockTime */ \ + { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(925) }, /* Language */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(928) }, /* AutoRelockTime */ \ { 0x0024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* SoundVolume */ \ { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1810,7 +1822,7 @@ { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(928) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(932) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ @@ -1840,16 +1852,16 @@ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(932) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(935) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(936) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(939) }, /* Power */ \ { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(938) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(942) }, /* LifetimeEnergyConsumed */ \ { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(942) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(946) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ @@ -1879,7 +1891,7 @@ { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(946) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(950) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ @@ -2000,7 +2012,7 @@ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(950) }, /* IAS CIE address */ \ + { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(954) }, /* IAS CIE address */ \ { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -2009,25 +2021,25 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(958) }, /* channel list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(962) }, /* channel list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1212) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1216) }, /* target navigator list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1466) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1474) }, /* duration */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1482) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1486) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1494) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1470) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1478) }, /* duration */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1486) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1490) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1498) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1502) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1506) }, /* media input list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2038,18 +2050,18 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1756) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1760) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2010) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2014) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2014) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2018) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2268) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2272) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -2068,28 +2080,28 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2522) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2526) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2526) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2530) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2534) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2537) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2541) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2546) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2552) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2559) }, /* int64u */ \ + { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2538) }, /* int24u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2541) }, /* int32u */ \ + { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2545) }, /* int40u */ \ + { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2550) }, /* int48u */ \ + { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2556) }, /* int56u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2563) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2567) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2570) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2574) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2579) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2585) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2592) }, /* int64s */ \ + { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2571) }, /* int24s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2574) }, /* int32s */ \ + { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2578) }, /* int40s */ \ + { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2583) }, /* int48s */ \ + { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2589) }, /* int56s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2596) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2600) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2604) }, /* float_double */ \ + { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2604) }, /* float_single */ \ + { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2608) }, /* float_double */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ { 0x001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ @@ -2102,8 +2114,8 @@ { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ { 0x001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2612) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2620) }, /* epoch_s */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2616) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2624) }, /* epoch_s */ \ { 0x0022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ { 0x0023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2118,7 +2130,7 @@ ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* range_restricted_int16u */ \ { 0x0029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16s */ \ - { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2624) }, /* list_long_octet_string */ \ + { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2628) }, /* list_long_octet_string */ \ { 0x0030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ ZAP_EMPTY_DEFAULT() }, /* timed_write_boolean */ \ { 0x8000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2128,49 +2140,49 @@ { 0x8002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ { 0x8003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3624) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3628) }, /* nullable_bitmap32 */ \ { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3628) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3632) }, /* nullable_bitmap64 */ \ { 0x8005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ { 0x8006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ { 0x8007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3636) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3640) }, /* nullable_int24u */ \ { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3639) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3643) }, /* nullable_int32u */ \ { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3643) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3647) }, /* nullable_int40u */ \ { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3648) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3652) }, /* nullable_int48u */ \ { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3654) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3658) }, /* nullable_int56u */ \ { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3661) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3665) }, /* nullable_int64u */ \ { 0x800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ { 0x800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ { 0x800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3669) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3673) }, /* nullable_int24s */ \ { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3672) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3676) }, /* nullable_int32s */ \ { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3676) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(3680) }, /* nullable_int40s */ \ { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3681) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(3685) }, /* nullable_int48s */ \ { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3687) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(3691) }, /* nullable_int56s */ \ { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3694) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(3698) }, /* nullable_int64s */ \ { 0x8015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ { 0x8016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ { 0x8017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3702) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(3706) }, /* nullable_float_single */ \ { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3706) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(3710) }, /* nullable_float_double */ \ { 0x8019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ { 0x801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2195,8 +2207,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3714) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3718) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3718) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3722) }, /* total active power */ \ { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ @@ -2218,7 +2230,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3722) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3726) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2395,170 +2407,170 @@ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(206), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(221), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(222), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(225), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(226), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(230), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(231), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(231), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(232), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(235), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(236), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(246), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(247), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(247), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(248), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(252), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(253), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(254), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(255), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(256), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(257), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(258), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(259), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(264), \ + ZAP_ATTRIBUTE_INDEX(265), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(283), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(284), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(303), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(304), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(308), \ + ZAP_ATTRIBUTE_INDEX(309), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(334), \ + ZAP_ATTRIBUTE_INDEX(335), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(353), \ + ZAP_ATTRIBUTE_INDEX(354), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(357), \ + ZAP_ATTRIBUTE_INDEX(358), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(410), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(411), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(416), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(417), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(421), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(422), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(425), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(426), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(430), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(431), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(435), \ + ZAP_ATTRIBUTE_INDEX(436), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(439), \ + ZAP_ATTRIBUTE_INDEX(440), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(445), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(446), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(447), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(448), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(449), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(450), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(452), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(453), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(459), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(460), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(462), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(463), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(463), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(464), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(464), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(465), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(467), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(468), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(470), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(471), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(472), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(473), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(479), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(480), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(480), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(481), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(558), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(559), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(570), \ + ZAP_ATTRIBUTE_INDEX(571), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(572), \ + ZAP_ATTRIBUTE_INDEX(573), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(579), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(580), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(584), \ + ZAP_ATTRIBUTE_INDEX(585), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2570,7 +2582,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 23, 1480 }, { ZAP_CLUSTER_INDEX(23), 45, 6078 }, { ZAP_CLUSTER_INDEX(68), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 1480 }, { ZAP_CLUSTER_INDEX(23), 45, 6082 }, { ZAP_CLUSTER_INDEX(68), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2580,7 +2592,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (7579) +#define ATTRIBUTE_MAX_SIZE (7583) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 3b995cf0658b0a..fe0ab0546e5ae6 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -16245,7 +16245,6 @@ class Test_TC_LVL_1_1 : public TestCommand void OnSuccessResponse_5(uint32_t featureMap) { VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); - NextTest(); } @@ -16447,7 +16446,6 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_1(uint8_t currentLevel) { VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); - NextTest(); } @@ -16870,7 +16868,6 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_1(uint8_t currentLevel) { VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); - NextTest(); } @@ -17318,7 +17315,6 @@ class Test_TC_LVL_4_1 : public TestCommand { VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 128)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 129)); - NextTest(); } @@ -17373,7 +17369,6 @@ class Test_TC_LVL_4_1 : public TestCommand { VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 64)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 65)); - NextTest(); } @@ -17428,7 +17423,6 @@ class Test_TC_LVL_4_1 : public TestCommand { VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 128)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 129)); - NextTest(); } diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index b595a44c43dc83..43a436ea2fd412 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -27,34 +27,39 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: General Commissioning (client), big-endian */ \ + /* Endpoint: 1, Cluster: Level Control (client), big-endian */ \ \ /* 0 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Network Commissioning (client), big-endian */ \ + /* Endpoint: 1, Cluster: General Commissioning (client), big-endian */ \ \ /* 4 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Network Commissioning (client), big-endian */ \ + \ + /* 8 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client), big-endian */ \ \ - /* 8 - FeatureMap, */ \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client), big-endian */ \ \ - /* 12 - FeatureMap, */ \ + /* 16 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client), big-endian */ \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client), big-endian */ \ \ - /* 20 - FeatureMap, */ \ + /* 24 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -62,40 +67,45 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: General Commissioning (client), little-endian */ \ + /* Endpoint: 1, Cluster: Level Control (client), little-endian */ \ \ /* 0 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Network Commissioning (client), little-endian */ \ + /* Endpoint: 1, Cluster: General Commissioning (client), little-endian */ \ \ /* 4 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Network Commissioning (client), little-endian */ \ + \ + /* 8 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client), little-endian */ \ \ - /* 8 - FeatureMap, */ \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client), little-endian */ \ \ - /* 12 - FeatureMap, */ \ + /* 16 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client), little-endian */ \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client), little-endian */ \ \ - /* 20 - FeatureMap, */ \ + /* 24 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (6) +#define GENERATED_DEFAULTS_COUNT (7) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -123,7 +133,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 64 +#define GENERATED_ATTRIBUTE_COUNT 65 #define GENERATED_ATTRIBUTES \ { \ \ @@ -143,7 +153,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -178,29 +189,29 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: General Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(4) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(4) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ @@ -238,7 +249,7 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(24) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (client) */ \ @@ -329,163 +340,163 @@ 0x0007, ZAP_ATTRIBUTE_INDEX(4), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (client) */ \ { \ - 0x0008, ZAP_ATTRIBUTE_INDEX(5), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0008, ZAP_ATTRIBUTE_INDEX(5), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Level Control (client) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(6), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (client) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (client) */ \ - { 0x001E, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Binding (client) */ \ + { 0x001E, ZAP_ATTRIBUTE_INDEX(9), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Binding (client) */ \ { \ - 0x001F, ZAP_ATTRIBUTE_INDEX(9), 1, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x001F, ZAP_ATTRIBUTE_INDEX(10), 1, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Access Control (client) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(10), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (client) */ \ - { 0x0028, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ + { 0x0028, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0029, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002A, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002E, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(16), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(17), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(18), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(19), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(20), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(21), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Diagnostic Logs (client) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(20), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(21), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(22), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(23), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(24), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(26), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(27), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ - { 0x003B, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ + { 0x003B, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: AdministratorCommissioning (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Group Key Management (client) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (client) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(34), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: User Label (client) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (client) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (client) */ \ { \ - 0x0101, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0101, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Door Lock (client) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (client) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (client) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(39), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(40), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(41), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (client) */ \ { \ - 0x0204, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0204, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (client) */ \ { \ - 0x0300, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0300, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Color Control (client) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (client) */ \ { \ - 0x0406, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0406, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Occupancy Sensing (client) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Low Power (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (client) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(64), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (client) */ \ } @@ -494,7 +505,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 60, 138 }, \ + { ZAP_CLUSTER_INDEX(0), 60, 142 }, \ } // Largest attribute size is needed for various buffers @@ -504,7 +515,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (4) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (138) +#define ATTRIBUTE_MAX_SIZE (142) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index 5707fd2edb4e5d..0182bcbcd228dc 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -276,6 +276,11 @@ \ /* 615 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ + \ + /* 619 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ } #else // !BIGENDIAN_CPU @@ -531,11 +536,16 @@ \ /* 615 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ + \ + /* 619 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (73) +#define GENERATED_DEFAULTS_COUNT (74) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -577,7 +587,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 221 +#define GENERATED_ATTRIBUTE_COUNT 222 #define GENERATED_ATTRIBUTES \ { \ \ @@ -784,22 +794,23 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ - { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x01) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -811,9 +822,11 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -955,30 +968,30 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(171), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(186), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(187), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(191), \ + ZAP_ATTRIBUTE_INDEX(192), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(213), \ + ZAP_ATTRIBUTE_INDEX(214), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(217), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(218), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(218), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(219), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } @@ -987,7 +1000,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1436 }, { ZAP_CLUSTER_INDEX(16), 6, 82 }, { ZAP_CLUSTER_INDEX(22), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 16, 1436 }, { ZAP_CLUSTER_INDEX(16), 6, 86 }, { ZAP_CLUSTER_INDEX(22), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -997,7 +1010,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1524) +#define ATTRIBUTE_MAX_SIZE (1528) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 2232cc2fc28ca8..50677ac3c4d109 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -404,9 +404,14 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 2, Cluster: Level Control (server), big-endian */ \ + \ + /* 2401 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x01, \ + \ /* Endpoint: 2, Cluster: Audio Output (server), big-endian */ \ \ - /* 2401 - audio output list, */ \ + /* 2405 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -424,24 +429,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), big-endian */ \ \ - /* 2655 - start time, */ \ + /* 2659 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 2663 - duration, */ \ + /* 2667 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2671 - playback speed, */ \ + /* 2675 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2675 - seek range end, */ \ + /* 2679 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2683 - seek range start, */ \ + /* 2687 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2691 - accept header list, */ \ + /* 2695 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -457,12 +462,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2945 - supported streaming protocols, */ \ + /* 2949 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2949 - accept header list, */ \ + /* 2953 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -478,7 +483,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3203 - supported streaming protocols, */ \ + /* 3207 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -863,9 +868,14 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 2, Cluster: Level Control (server), little-endian */ \ + \ + /* 2401 - FeatureMap, */ \ + 0x01, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 2, Cluster: Audio Output (server), little-endian */ \ \ - /* 2401 - audio output list, */ \ + /* 2405 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -883,24 +893,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), little-endian */ \ \ - /* 2655 - start time, */ \ + /* 2659 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2663 - duration, */ \ + /* 2667 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2671 - playback speed, */ \ + /* 2675 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2675 - seek range end, */ \ + /* 2679 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2683 - seek range start, */ \ + /* 2687 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2691 - accept header list, */ \ + /* 2695 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -916,12 +926,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2945 - supported streaming protocols, */ \ + /* 2949 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2949 - accept header list, */ \ + /* 2953 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -937,13 +947,13 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3203 - supported streaming protocols, */ \ + /* 3207 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (91) +#define GENERATED_DEFAULTS_COUNT (92) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -976,7 +986,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 276 +#define GENERATED_ATTRIBUTE_COUNT 277 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1259,13 +1269,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1277,9 +1287,11 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2401) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1289,7 +1301,7 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2401) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2405) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1302,19 +1314,19 @@ \ /* Endpoint: 3, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2655) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2663) }, /* duration */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2659) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2667) }, /* duration */ \ { 0x0003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* position */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2671) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2683) }, /* seek range start */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2679) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2687) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2691) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2695) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2945) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2949) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ @@ -1337,9 +1349,9 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2949) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2953) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3203) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(3207) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ @@ -1490,45 +1502,45 @@ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(202), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(217), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(218), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(222), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(223), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(225), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(226), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(230), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(231), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(238), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(239), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(241), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(242), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(248), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(249), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(249), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(250), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(254), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(255), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(257), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(258), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(264), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(265), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(269), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(270), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } @@ -1537,7 +1549,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 21, 1967 }, { ZAP_CLUSTER_INDEX(21), 10, 1328 }, { ZAP_CLUSTER_INDEX(31), 4, 283 }, \ + { ZAP_CLUSTER_INDEX(0), 21, 1967 }, { ZAP_CLUSTER_INDEX(21), 10, 1328 }, { ZAP_CLUSTER_INDEX(31), 4, 287 }, \ { ZAP_CLUSTER_INDEX(35), 5, 407 }, { ZAP_CLUSTER_INDEX(40), 3, 366 }, { ZAP_CLUSTER_INDEX(43), 2, 106 }, \ } @@ -1548,7 +1560,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (686) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4457) +#define ATTRIBUTE_MAX_SIZE (4461) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) From a7157d31ff074e5a201e2d47446c9b710a3104b5 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Fri, 17 Dec 2021 14:22:51 -0500 Subject: [PATCH 12/12] Use move to handler as precondition level setter as it doesn't depend of the current level --- .../suites/certification/Test_TC_LVL_4_1.yaml | 15 +- .../suites/certification/Test_TC_LVL_5_1.yaml | 16 +- .../Framework/CHIPTests/CHIPClustersTests.m | 74 +++++--- .../chip-tool/zap-generated/test/Commands.h | 178 ++++++++++-------- 4 files changed, 173 insertions(+), 110 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index 5e16072884eea1..ce92090b97dc8a 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -27,7 +27,20 @@ tests: cluster: "On/Off" command: "on" - - label: "Precondition: DUT level is set to 0x80" + - label: "Precondition: DUT move to minimal level" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 0 + - name: "transitionTime" + value: 0 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Sends step Up command to DUT with by a step of 0x80" command: "Step" arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml index 89542f7e9ba46a..80a6a652e92f79 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml @@ -28,19 +28,17 @@ tests: command: "on" - label: "Precondition: DUT level is set to 0x80" - command: "Step" + command: "MoveToLevel" arguments: values: - - name: "stepMode" - value: 0 - - name: "stepSize" + - name: "level" value: 128 - name: "transitionTime" - value: 20 - - name: "optionMask" value: 0 + - name: "optionMask" + value: 1 - name: "optionOverride" - value: 0 + value: 1 - label: "Wait 3000ms" cluster: "DelayCommands" @@ -56,9 +54,7 @@ tests: command: "readAttribute" attribute: "current level" response: - constraints: - minValue: 128 - maxValue: 129 + value: 128 - label: "Sends a move up command to DUT" command: "Move" diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index a56dbdaf4c378c..c4d9fcf19faffe 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -10887,9 +10887,34 @@ - (void)testSendClusterTest_TC_LVL_4_1_000001_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000002_Step +- (void)testSendClusterTest_TC_LVL_4_1_000002_MoveToLevel { - XCTestExpectation * expectation = [self expectationWithDescription:@"Precondition: DUT level is set to 0x80"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Precondition: DUT move to minimal level"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:0]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Precondition: DUT move to minimal level Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_4_1_000003_Step +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Sends step Up command to DUT with by a step of 0x80"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -10904,7 +10929,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000002_Step params.optionOverride = [NSNumber numberWithUnsignedChar:0]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: DUT level is set to 0x80 Error: %@", err); + NSLog(@"Sends step Up command to DUT with by a step of 0x80 Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -10913,7 +10938,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000002_Step [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000003_WaitForMs +- (void)testSendClusterTest_TC_LVL_4_1_000004_WaitForMs { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 3000ms"]; @@ -10921,7 +10946,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000003_WaitForMs WaitForMs(expectation, queue, 3000); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_LVL_4_1_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads current level attribute from DUT"]; @@ -10953,7 +10978,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000005_Step +- (void)testSendClusterTest_TC_LVL_4_1_000006_Step { XCTestExpectation * expectation = [self expectationWithDescription:@"Sends step down command to DUT"]; @@ -10979,7 +11004,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000005_Step [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000006_WaitForMs +- (void)testSendClusterTest_TC_LVL_4_1_000007_WaitForMs { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 3000ms"]; @@ -10987,7 +11012,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000006_WaitForMs WaitForMs(expectation, queue, 3000); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_LVL_4_1_000008_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads current level attribute from DUT"]; @@ -11019,7 +11044,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000008_Step +- (void)testSendClusterTest_TC_LVL_4_1_000009_Step { XCTestExpectation * expectation = [self expectationWithDescription:@"Sends a Step up command"]; @@ -11045,7 +11070,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000008_Step [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000009_WaitForMs +- (void)testSendClusterTest_TC_LVL_4_1_000010_WaitForMs { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 3000ms"]; @@ -11053,7 +11078,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000009_WaitForMs WaitForMs(expectation, queue, 3000); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000010_ReadAttribute +- (void)testSendClusterTest_TC_LVL_4_1_000011_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads current level attribute from DUT"]; @@ -11085,7 +11110,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000011_Off +- (void)testSendClusterTest_TC_LVL_4_1_000012_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Sending off command"]; @@ -11132,7 +11157,7 @@ - (void)testSendClusterTest_TC_LVL_5_1_000001_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_5_1_000002_Step +- (void)testSendClusterTest_TC_LVL_5_1_000002_MoveToLevel { XCTestExpectation * expectation = [self expectationWithDescription:@"Precondition: DUT level is set to 0x80"]; @@ -11141,20 +11166,19 @@ - (void)testSendClusterTest_TC_LVL_5_1_000002_Step CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0]; - params.stepSize = [NSNumber numberWithUnsignedChar:128]; - params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; - params.optionMask = [NSNumber numberWithUnsignedChar:0]; - params.optionOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster stepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: DUT level is set to 0x80 Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:128]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Precondition: DUT level is set to 0x80 Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index fe0ab0546e5ae6..e28c81f901f19c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -17149,44 +17149,48 @@ class Test_TC_LVL_4_1 : public TestCommand err = TestSendingOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to 0x80\n"); - err = TestPreconditionDutLevelIsSetTo0x80_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT move to minimal level\n"); + err = TestPreconditionDutMoveToMinimalLevel_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 3000ms\n"); - err = TestWait3000ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends step Up command to DUT with by a step of 0x80\n"); + err = TestSendsStepUpCommandToDutWithByAStepOf0x80_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 3000ms\n"); + err = TestWait3000ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step down command to DUT\n"); - err = TestSendsStepDownCommandToDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 3000ms\n"); - err = TestWait3000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends step down command to DUT\n"); + err = TestSendsStepDownCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 3000ms\n"); + err = TestWait3000ms_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step up command\n"); - err = TestSendsAStepUpCommand_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 3000ms\n"); - err = TestWait3000ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a Step up command\n"); + err = TestSendsAStepUpCommand_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 3000ms\n"); + err = TestWait3000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sending off command\n"); - err = TestSendingOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Sending off command\n"); + err = TestSendingOffCommand_12(); break; } @@ -17199,36 +17203,36 @@ class Test_TC_LVL_4_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; - static void OnFailureCallback_4(void * context, EmberAfStatus status) + static void OnFailureCallback_5(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); + (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_4(void * context, uint8_t currentLevel) + static void OnSuccessCallback_5(void * context, uint8_t currentLevel) { - (static_cast(context))->OnSuccessResponse_4(currentLevel); + (static_cast(context))->OnSuccessResponse_5(currentLevel); } - static void OnFailureCallback_7(void * context, EmberAfStatus status) + static void OnFailureCallback_8(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_7(status); + (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_7(void * context, uint8_t currentLevel) + static void OnSuccessCallback_8(void * context, uint8_t currentLevel) { - (static_cast(context))->OnSuccessResponse_7(currentLevel); + (static_cast(context))->OnSuccessResponse_8(currentLevel); } - static void OnFailureCallback_10(void * context, EmberAfStatus status) + static void OnFailureCallback_11(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_10(status); + (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_10(void * context, uint8_t currentLevel) + static void OnSuccessCallback_11(void * context, uint8_t currentLevel) { - (static_cast(context))->OnSuccessResponse_10(currentLevel); + (static_cast(context))->OnSuccessResponse_11(currentLevel); } // @@ -17264,7 +17268,34 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_2() + CHIP_ERROR TestPreconditionDutMoveToMinimalLevel_2() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + + RequestType request; + request.level = 0; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_2(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_2(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2() { NextTest(); } + + CHIP_ERROR TestSendsStepUpCommandToDutWithByAStepOf0x80_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; @@ -17277,48 +17308,48 @@ class Test_TC_LVL_4_1 : public TestCommand request.optionOverride = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_2(); + (static_cast(context))->OnSuccessResponse_3(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_3(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2() { NextTest(); } + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestWait3000ms_3() + CHIP_ERROR TestWait3000ms_4() { SetIdentity(kIdentityAlpha); return WaitForMs(3000); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4)); + this, OnSuccessCallback_5, OnFailureCallback_5)); return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(uint8_t currentLevel) + void OnSuccessResponse_5(uint8_t currentLevel) { VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 128)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 129)); NextTest(); } - CHIP_ERROR TestSendsStepDownCommandToDut_5() + CHIP_ERROR TestSendsStepDownCommandToDut_6() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; @@ -17331,48 +17362,48 @@ class Test_TC_LVL_4_1 : public TestCommand request.optionOverride = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_5(); + (static_cast(context))->OnSuccessResponse_6(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_5(status); + (static_cast(context))->OnFailureResponse_6(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5() { NextTest(); } + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestWait3000ms_6() + CHIP_ERROR TestWait3000ms_7() { SetIdentity(kIdentityAlpha); return WaitForMs(3000); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_7, OnFailureCallback_7)); + this, OnSuccessCallback_8, OnFailureCallback_8)); return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7(uint8_t currentLevel) + void OnSuccessResponse_8(uint8_t currentLevel) { VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 64)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 65)); NextTest(); } - CHIP_ERROR TestSendsAStepUpCommand_8() + CHIP_ERROR TestSendsAStepUpCommand_9() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; @@ -17385,48 +17416,48 @@ class Test_TC_LVL_4_1 : public TestCommand request.optionOverride = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_8(); + (static_cast(context))->OnSuccessResponse_9(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_8(status); + (static_cast(context))->OnFailureResponse_9(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8() { NextTest(); } + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestWait3000ms_9() + CHIP_ERROR TestWait3000ms_10() { SetIdentity(kIdentityAlpha); return WaitForMs(3000); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_10, OnFailureCallback_10)); + this, OnSuccessCallback_11, OnFailureCallback_11)); return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(uint8_t currentLevel) + void OnSuccessResponse_11(uint8_t currentLevel) { VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 128)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 129)); NextTest(); } - CHIP_ERROR TestSendingOffCommand_11() + CHIP_ERROR TestSendingOffCommand_12() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; @@ -17434,20 +17465,20 @@ class Test_TC_LVL_4_1 : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_11(); + (static_cast(context))->OnSuccessResponse_12(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_11(status); + (static_cast(context))->OnFailureResponse_12(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11() { NextTest(); } + void OnSuccessResponse_12() { NextTest(); } }; class Test_TC_LVL_5_1 : public TestCommand @@ -17561,14 +17592,13 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_2() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.stepMode = static_cast(0); - request.stepSize = 128; - request.transitionTime = 20U; - request.optionMask = 0; - request.optionOverride = 0; + request.level = 128; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2();