From c8aaa8a3b8bbb0f26267c44529582b01931a17f0 Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Fri, 14 Jan 2022 15:09:07 -0500 Subject: [PATCH] Update/Add Level control features based on lastest cluster revision (#13338) * 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 Fix min and max Level usage and consideing the attributes and featuremap. add behaviour tied with lighting Enable Feature map for level control and update cluster revision * regen * enable test lvl control cluster revision and featuremap and update values * regen * 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 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 add level control effect on off commmands * rebase regen * Use move to handler as precondition level setter as it doesn't depend of the current level Address PR comments * Fix conflicts after rebase and use new nonVolatile method instead of tokenized * regen & restyle rebase and regen, fix conflicts and error * Init persistance storage before InitDatamodel to allow attribute nvm storage in init callbacks. Rework Levelcontrol StartupCurrentLevel. Workaround zap can't generate default value to null. Use 255 for StartupCurrentLevel * Rebase and regen to fix conflicts. LVL tests changed recently but do not match those new feature from this PR. Fix that * Rebase and fix conflicts, add some wait time to a test that sometimes get delayed in Darwin test and reads the value too soon * Update src/app/clusters/level-control/level-control.cpp Co-authored-by: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> * Fix Cirque test due to lvl ctrl changes Co-authored-by: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> --- .../all-clusters-common/all-clusters-app.zap | 23 +- .../bridge-app/bridge-common/bridge-app.zap | 25 +- .../lighting-common/lighting-app.zap | 31 +- .../thermostat-common/thermostat.zap | 4 +- examples/tv-app/tv-common/tv-app.zap | 23 +- .../tv-casting-common/tv-casting-app.zap | 10 +- .../color-control-server.h | 4 + .../ias-zone-server/ias-zone-server.cpp | 29 +- .../clusters/level-control/level-control.cpp | 531 +++++++++-------- .../clusters/on-off-server/on-off-server.cpp | 44 +- .../clusters/on-off-server/on-off-server.h | 4 +- src/app/server/Server.cpp | 4 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 13 +- .../suites/certification/Test_TC_LVL_2_1.yaml | 33 +- .../suites/certification/Test_TC_LVL_2_2.yaml | 12 +- .../suites/certification/Test_TC_LVL_3_1.yaml | 4 +- .../suites/certification/Test_TC_LVL_4_1.yaml | 9 +- .../suites/certification/Test_TC_LVL_6_1.yaml | 9 +- src/app/util/af.h | 8 - src/app/util/util.cpp | 20 + src/app/util/util.h | 4 + .../templates/app/gen_config.zapt | 2 +- .../zcl/data-model/silabs/general.xml | 12 +- .../data_model/controller-clusters.zap | 34 +- .../java/zap-generated/CHIPCallbackTypes.h | 2 + .../java/zap-generated/CHIPClusters-JNI.cpp | 15 +- .../zap-generated/CHIPClustersRead-JNI.cpp | 40 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 61 ++ .../java/zap-generated/CHIPReadCallbacks.h | 30 + .../chip/devicecontroller/ChipClusters.java | 33 +- .../devicecontroller/ClusterReadMapping.java | 15 +- .../python/chip/clusters/CHIPClusters.py | 5 + .../python/chip/clusters/Objects.py | 8 +- .../python/test/test_scripts/base.py | 14 +- .../CHIPAttributeTLVValueDecoder.mm | 19 +- .../CHIP/zap-generated/CHIPClustersObjc.h | 6 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 39 +- .../CHIP/zap-generated/CHIPTestClustersObjc.h | 1 + .../zap-generated/CHIPTestClustersObjc.mm | 18 + .../Framework/CHIPTests/CHIPClustersTests.m | 278 ++++++--- .../zap-generated/endpoint_config.h | 555 +++++++++--------- .../zap-generated/gen_config.h | 2 +- .../zap-generated/attributes/Accessors.cpp | 32 +- .../zap-generated/attributes/Accessors.h | 4 +- .../zap-generated/cluster-objects.h | 16 +- .../app-common/zap-generated/enums.h | 6 + .../zap-generated/endpoint_config.h | 63 +- .../bridge-app/zap-generated/gen_config.h | 2 +- .../zap-generated/cluster/Commands.h | 41 +- .../chip-tool/zap-generated/test/Commands.h | 540 +++++++++-------- .../zap-generated/endpoint_config.h | 171 +++--- .../zap-generated/endpoint_config.h | 64 +- .../lighting-app/zap-generated/gen_config.h | 2 +- .../app1/zap-generated/gen_config.h | 2 +- .../app2/zap-generated/gen_config.h | 2 +- .../pump-app/zap-generated/gen_config.h | 2 +- .../tv-app/zap-generated/endpoint_config.h | 141 +++-- .../tv-app/zap-generated/gen_config.h | 2 +- .../zap-generated/endpoint_config.h | 22 +- .../tv-casting-app/zap-generated/gen_config.h | 2 +- 60 files changed, 1934 insertions(+), 1213 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 16e066cd2397ae..290c774cd21191 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 @@ -8134,7 +8134,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8281,15 +8281,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 0, "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, @@ -8299,7 +8314,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 5b0a5680dc403d..f35c00e0335920 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -3793,7 +3793,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3841,7 +3841,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3988,15 +3988,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "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, @@ -4006,7 +4021,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 0fdfa137b28bc5..50788263665078 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4957,7 +4957,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -5017,7 +5017,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5164,10 +5164,10 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5212,7 +5212,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5359,15 +5359,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 0, "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, @@ -5377,7 +5392,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 2c8181b6c56088..f4475cf122b75f 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -7520,7 +7520,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7670,7 +7670,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "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 f1d3b04f738a40..e4953135d3cbc2 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -8474,7 +8474,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -8669,15 +8669,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "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, @@ -8687,7 +8702,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 bac7bbd71cc378..a8fcda9213be34 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 @@ -7289,7 +7289,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -7484,10 +7484,10 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7502,7 +7502,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7517,7 +7517,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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..aae68293b1c1ed 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 // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP diff --git a/src/app/clusters/ias-zone-server/ias-zone-server.cpp b/src/app/clusters/ias-zone-server/ias-zone-server.cpp index 5a219448c26dc5..77cbb555976f19 100644 --- a/src/app/clusters/ias-zone-server/ias-zone-server.cpp +++ b/src/app/clusters/ias-zone-server/ias-zone-server.cpp @@ -63,9 +63,11 @@ #include #include #include +#include #include using namespace chip; +using namespace chip::app::Clusters; using namespace chip::app::Clusters::IasZone; #define UNDEFINED_ZONE_ID 0xFF @@ -592,29 +594,10 @@ uint8_t emberAfPluginIasZoneServerGetZoneId(EndpointId endpoint) //------------------------------------------------------------------------------ static bool areZoneServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = - emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_STATE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_TYPE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_ID_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (!emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::IasCieAddress::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneState::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneType::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneId::Id, true)) { return false; } diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 06e7b152a31c8b..79e1ccecd3e65a 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include @@ -59,9 +60,9 @@ #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 // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP #include @@ -69,23 +70,18 @@ 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 areStartUpLevelControlServerAttributesNonVolatile(EndpointId endpoint); -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL #if (EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE == 0) #define FASTEST_TRANSITION_TIME_MS 0 #else #define FASTEST_TRANSITION_TIME_MS (MILLISECOND_TICKS_PER_SECOND / EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE) -#endif +#endif // EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE -#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 @@ -107,10 +103,13 @@ 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, - 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); @@ -120,12 +119,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 +142,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 +153,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,13 +176,6 @@ 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 (emberAfPluginZllLevelControlServerIgnoreMoveToLevelMoveStepStop(endpoint, state->commandId)) - { - return; - } -#endif - // 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) @@ -200,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--; } @@ -230,7 +225,7 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { emberAfScenesClusterMakeInvalidCallback(endpoint); } -#endif +#endif // EMBER_AF_PLUGIN_SCENES // Are we at the requested level? if (currentLevel == state->moveToLevel) @@ -238,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) @@ -279,29 +274,32 @@ 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 +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME } static void setOnOffValue(EndpointId endpoint, bool onOff) @@ -317,86 +315,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 decision 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, @@ -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(commandPath.mEndpointId, 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(commandPath.mEndpointId, 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; @@ -531,13 +530,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 { @@ -552,7 +551,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) { @@ -575,23 +574,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 { @@ -614,12 +620,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) @@ -666,13 +675,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 = static_cast(currentLevel - minLevel); break; default: status = EMBER_ZCL_STATUS_INVALID_FIELD; @@ -687,7 +696,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) { @@ -779,10 +788,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 { @@ -791,10 +800,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 = static_cast(currentLevel - minLevel); } else { @@ -814,7 +823,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) { @@ -893,10 +902,10 @@ 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; + uint8_t minimumLevelAllowedForTheDevice = minLevel; EmberAfStatus status; // "Temporarily store CurrentLevel." @@ -908,34 +917,48 @@ 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.IsNull()) + { + // OnLevel has undefined value; fall back to CurrentLevel. + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); + } + } + else { - // OnLevel has undefined value; fall back to CurrentLevel. - resolvedLevel = temporaryCurrentLevelCache; + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); } #else - resolvedLevel = temporaryCurrentLevelCache; -#endif + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE // 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; -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME if (newValue) { @@ -950,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, currentOnOffTransitionTime, 0xFF, 0xFF, + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, resolvedLevel.Value(), currentOnOffTransitionTime, 0xFF, 0xFF, INVALID_STORED_LEVEL); // Don't revert to stored level } else @@ -958,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 @@ -969,87 +992,107 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE - // StartUp behavior relies StartUpCurrentLevel attributes being non-volatile. - if (areStartUpLevelControlServerAttributesNonVolatile(endpoint)) + // If these read only attributes are enabled we use those values as our set minLevel and maxLevel + // if get isn't possible, value stays at default + Attributes::MinLevel::Get(endpoint, &minLevel); + Attributes::MaxLevel::Get(endpoint, &maxLevel); + + 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) + { + minLevel = LEVEL_CONTROL_LIGHTING_MIN_LEVEL; + } + + if (maxLevel > LEVEL_CONTROL_LIGHTING_MAX_LEVEL) + { + maxLevel = LEVEL_CONTROL_LIGHTING_MAX_LEVEL; + } + } + + 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 Non Volatile. + if (areStartUpLevelControlServerAttributesNonVolatile(endpoint)) { - uint8_t currentLevel = 0; - status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); + // 1.5.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 4. 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. + // NULL Set the CurrentLevel attribute to its previous value. + // 0xFF Work Around ZAP Can't set default value to NULL + // https://github.com/project-chip/zap/issues/354 + + app::DataModel::Nullable startUpCurrentLevel; + status = Attributes::StartUpCurrentLevel::Get(endpoint, startUpCurrentLevel); if (status == EMBER_ZCL_STATUS_SUCCESS) { - switch (startUpCurrentLevel) + if (!startUpCurrentLevel.IsNull()) { - case STARTUP_CURRENT_LEVEL_USE_DEVICE_MINIMUM: - currentLevel = MIN_LEVEL; - break; - case STARTUP_CURRENT_LEVEL_USE_PREVIOUS_LEVEL: - // Just fetched it. - break; - default: - // 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.Value() == STARTUP_CURRENT_LEVEL_USE_DEVICE_MINIMUM) { - currentLevel = MIN_LEVEL; - } - else if (startUpCurrentLevel > MAX_LEVEL) - { - currentLevel = MAX_LEVEL; + currentLevel = minLevel; } else { - currentLevel = startUpCurrentLevel; + // Otherwise set to specified value 0x01-0xFE. + // But, need to enforce currentLevel's min/max, right? + // Spec doesn't mention this. + if (startUpCurrentLevel.Value() < minLevel) + { + currentLevel = minLevel; + } + else if (startUpCurrentLevel.Value() > maxLevel) + { + currentLevel = maxLevel; + } + else + { + currentLevel = startUpCurrentLevel.Value(); + } } - break; } - status = Attributes::CurrentLevel::Set(endpoint, currentLevel); + // Otherwise Set the CurrentLevel attribute to its previous value which was already fetch above + + Attributes::CurrentLevel::Set(endpoint, currentLevel); } } +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL + // 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); + } } -#endif + emberAfPluginLevelControlClusterServerPostInitCallback(endpoint); } -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL static bool areStartUpLevelControlServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = - emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::CurrentLevel::Id, true)) { - return false; + return emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::StartUpCurrentLevel::Id, true); } - return true; + return false; } -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL void emberAfPluginLevelControlClusterServerPostInitCallback(EndpointId endpoint) {} 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 5d9f9040019ce2..4c35510fdf9f72 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 @@ -155,12 +156,30 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm emberAfOnOffClusterPrintln("ERR: writing on/off %x", status); 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); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -194,7 +213,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 non-volatile. if (areStartUpOnOffServerAttributesNonVolatile(endpoint)) { @@ -222,7 +241,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) @@ -247,7 +266,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) } } } -#endif +#endif // IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF emberAfPluginOnOffClusterServerPostInitCallback(endpoint); } @@ -481,26 +500,17 @@ 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::areStartUpOnOffServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::OnOff::Id, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (emberAfIsNonVolatileAttribute(endpoint, OnOff::Id, Attributes::OnOff::Id, true)) { - return false; + return emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::StartUpOnOff::Id, true); } - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::StartUpOnOff::Id, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - 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 e72eb61e858715..8e2502007f1a3c 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 areStartUpOnOffServerAttributesNonVolatile(chip::EndpointId endpoint); -#endif // ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#endif EmberEventControl * getEventControl(chip::EndpointId endpoint); EmberEventControl * configureEventControl(chip::EndpointId endpoint); diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index c7394bc0d74d51..2f35404a01a55e 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -112,8 +112,6 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint // handler. SetAttributePersistenceProvider(&mAttributePersister); - InitDataModelHandler(&mExchangeMgr); - #if CHIP_DEVICE_LAYER_TARGET_DARWIN err = DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init("chip.store"); SuccessOrExit(err); @@ -121,6 +119,8 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(CHIP_CONFIG_KVS_PATH); #endif + InitDataModelHandler(&mExchangeMgr); + err = mFabrics.Init(&mServerStorage); SuccessOrExit(err); 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 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 cd5032e3dd6b6f..31a3f9ccfb2d2c 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 @@ -23,16 +23,33 @@ tests: cluster: "DelayCommands" command: "WaitForCommissionee" - - label: "Reads the CurrentLevel attribute" - command: "readAttribute" - attribute: "current level" - response: - value: 254 + # Temporary - see #13551 + - label: "Reset level to 254" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 254 + - name: "transitionTime" + value: 0 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 - label: "Reads the CurrentLevel attribute" command: "readAttribute" attribute: "current level" response: + value: 254 constraints: type: uint8 @@ -151,10 +168,10 @@ tests: constraints: type: map8 + #Disabled due to issue - #13414 - label: "Reads the StartUpCurrentLevel attribute " + disabled: true command: "readAttribute" attribute: "start up current level" response: - value: 0 - constraints: - type: uint8 + value: null diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml index d01d462b347020..3a7f0d99c1531c 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml @@ -65,13 +65,13 @@ tests: command: "writeAttribute" attribute: "on level" arguments: - value: 1 + value: 254 - label: "Reads the OnLevel attribute from the DUT" command: "readAttribute" attribute: "on level" response: - value: 1 + value: 254 constraints: type: uint8 @@ -145,11 +145,13 @@ tests: constraints: type: uint8 + #Disabled due to issue - #11670 - label: "Reads the StartUpCurrentLevel attribute from the DUT" + disabled: true command: "readAttribute" attribute: "start up current level" response: - value: 0 + value: null constraints: type: uint8 @@ -157,12 +159,12 @@ tests: command: "writeAttribute" attribute: "start up current level" arguments: - value: 1 + value: 254 - label: "reads the StartUpCurrentLevel attribute from the DUT" command: "readAttribute" attribute: "start up current level" response: - value: 1 + value: 254 constraints: type: uint8 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 05675a800ef748..365bfed122e33d 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 @@ -39,7 +39,7 @@ tests: command: "readAttribute" attribute: "max level" response: - value: 255 + value: 254 - label: "sends a Move to level command" command: "MoveToLevel" @@ -120,7 +120,7 @@ tests: arguments: values: - name: "ms" - value: 10 + value: 100 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" 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 d21a5854b10858..584862a1c14369 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 @@ -33,7 +33,7 @@ tests: command: "readAttribute" attribute: "max level" response: - value: 255 + value: 254 - label: "sends a Move up command" command: "Move" @@ -60,7 +60,7 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 255 + value: 254 - label: "reads min level attribute from DUT" command: "readAttribute" @@ -89,11 +89,14 @@ tests: - name: "ms" value: 3000 + # For lighting Device type current level minimal value is 1 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 0 + constraints: + minValue: 0 + maxValue: 1 - label: "Write default move rate attribute from DUT" command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index f95ec0767bb30f..6f098444592b34 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -48,11 +48,14 @@ tests: - name: "ms" value: 100 + # For lighting Device type current level minimal value is 1 - label: "Reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 0 + constraints: + minValue: 0 + maxValue: 1 - label: "Sends a move up command to DUT" command: "Move" @@ -88,7 +91,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 2 + constraints: + minValue: 2 + maxValue: 3 - label: "Reset level to 254" command: "MoveToLevel" diff --git a/src/app/util/af.h b/src/app/util/af.h index 3174acfbd8925f..80e122dfb14241 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -94,14 +94,6 @@ EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask); -#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); -#else -#define emberAfContainsAttribute(endpoint, clusterId, attributeId, mask) \ - (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask) != NULL) -#endif - /** * @brief Returns true if endpoint contains the ZCL cluster with specified id. * diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 55850c493e80ea..adb98637959ba8 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -964,6 +964,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) != nullptr); +} + +bool emberAfIsNonVolatileAttribute(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); + + if (metadata == nullptr) + { + return false; + } + + return metadata->IsNonVolatile(); +} + chip::Messaging::ExchangeManager * chip::ExchangeManager() { return emAfExchangeMgr; diff --git a/src/app/util/util.h b/src/app/util/util.h index 0ebbc750a45c38..f85a272740ab6e 100644 --- a/src/app/util/util.h +++ b/src/app/util/util.h @@ -277,6 +277,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 emberAfIsNonVolatileAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + bool asServer); + namespace chip { chip::Messaging::ExchangeManager * ExchangeManager(); } // namespace chip 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 c645bb2ac60628..d6a6d5cfe13be3 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -391,11 +391,11 @@ limitations under the License. LEVEL_CONTROL_CLUSTER true true - + current level remaining time min level - max level + max level current frequency min frequency max frequency @@ -406,7 +406,7 @@ limitations under the License. off transition time default move rate options - start up current level + start up current level Command description for MoveToLevel @@ -556,4 +556,10 @@ 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 0e9154291779a1..1d6753cc8be855 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, @@ -1036,7 +1051,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1207,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 810ae078cd27c8..da0ba83cbce26a 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -581,6 +581,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/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 65f41fd0a28a6b..2f12f407473fb5 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -12847,7 +12847,12 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -12890,8 +12895,10 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -12915,7 +12922,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + CHIPLevelControlStartUpCurrentLevelAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 35059ef7947460..6a8542d8b23086 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -8596,8 +8596,10 @@ JNI_METHOD(void, LevelControlCluster, readStartUpCurrentLevelAttribute) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + 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)); @@ -8661,6 +8663,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/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index d601ecc1a90fc6..ac6fc45a922ed1 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -6533,6 +6533,67 @@ void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPLevelControlStartUpCurrentLevelAttributeCallback::CHIPLevelControlStartUpCurrentLevelAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlStartUpCurrentLevelAttributeCallback::~CHIPLevelControlStartUpCurrentLevelAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPLevelControlAttributeListAttributeCallback::CHIPLevelControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 63517b51228b9f..36c5da692ac87b 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -2306,6 +2306,36 @@ class CHIPLevelControlDefaultMoveRateAttributeCallback bool keepAlive; }; +class CHIPLevelControlStartUpCurrentLevelAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlStartUpCurrentLevelAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlStartUpCurrentLevelAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlStartUpCurrentLevelAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPLevelControlAttributeListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 685d6d85a0eb2f..8e6b06cf8870df 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -7213,6 +7213,14 @@ public interface DefaultMoveRateAttributeCallback { default void onSubscriptionEstablished() {} } + public interface StartUpCurrentLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -7395,21 +7403,22 @@ public void subscribeDefaultMoveRateAttribute( subscribeDefaultMoveRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStartUpCurrentLevelAttribute(IntegerAttributeCallback callback) { + public void readStartUpCurrentLevelAttribute(StartUpCurrentLevelAttributeCallback callback) { readStartUpCurrentLevelAttribute(chipClusterPtr, callback); } - public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { + public void writeStartUpCurrentLevelAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, null); } public void writeStartUpCurrentLevelAttribute( - DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpCurrentLevelAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + StartUpCurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { subscribeStartUpCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -7417,6 +7426,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); } @@ -7550,20 +7563,26 @@ private native void subscribeDefaultMoveRateAttribute( int maxInterval); private native void readStartUpCurrentLevelAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, StartUpCurrentLevelAttributeCallback callback); private native void writeStartUpCurrentLevelAttribute( long chipClusterPtr, DefaultClusterCallback callback, - Integer value, + @Nullable Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpCurrentLevelAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + StartUpCurrentLevelAttributeCallback callback, + int minInterval, + int maxInterval); 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 683e425cab0083..7a7e0d8cd74d98 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -3301,7 +3301,8 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) .readStartUpCurrentLevelAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.LevelControlCluster.StartUpCurrentLevelAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlStartUpCurrentLevelCommandParams); @@ -3322,6 +3323,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 7249c702873c45..bfb0bfdf93a3fe 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2496,6 +2496,11 @@ class ChipClusters: "attributeId": 0x0000FFFB, "type": "int", }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 652f4e7e8ee5be..c10a80d81e035c 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -2761,7 +2761,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="onTransitionTime", Tag=0x00000012, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="offTransitionTime", Tag=0x00000013, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="defaultMoveRate", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), @@ -2780,7 +2780,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: onTransitionTime: 'typing.Union[None, Nullable, uint]' = None offTransitionTime: 'typing.Union[None, Nullable, uint]' = None defaultMoveRate: 'typing.Union[None, Nullable, uint]' = None - startUpCurrentLevel: 'typing.Optional[uint]' = None + startUpCurrentLevel: 'typing.Union[None, Nullable, uint]' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None @@ -3167,9 +3167,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class AttributeList(ClusterAttributeDescriptor): diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index ee66766ab16ab0..11fdaae5b045ec 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -176,29 +176,29 @@ def TestLevelControlCluster(self, nodeid: int, endpoint: int, group: int): self.logger.info( f"Sending MoveToLevel command to device {nodeid} endpoint {endpoint}") try: - commonArgs = dict(transitionTime=0, optionMask=0, optionOverride=0) + commonArgs = dict(transitionTime=0, optionMask=1, optionOverride=1) - # Move to 0 + # Move to 1 self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, - endpoint, group, dict(**commonArgs, level=0), blocking=True) + endpoint, group, dict(**commonArgs, level=1), blocking=True) res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl", attribute="CurrentLevel", nodeid=nodeid, endpoint=endpoint, groupid=group) TestResult("Read attribute LevelControl.CurrentLevel", - res).assertValueEqual(0) + res).assertValueEqual(1) - # Move to 255 + # Move to 254 self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, - endpoint, group, dict(**commonArgs, level=255), blocking=True) + endpoint, group, dict(**commonArgs, level=254), blocking=True) res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl", attribute="CurrentLevel", nodeid=nodeid, endpoint=endpoint, groupid=group) TestResult("Read attribute LevelControl.CurrentLevel", - res).assertValueEqual(255) + res).assertValueEqual(254) return True except Exception as ex: diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 717d51799d3ddf..906bf6724999aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -3943,8 +3943,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } case Attributes::AttributeList::Id: { @@ -3973,6 +3977,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 c44ef20fbb31b9..09c3c465d97229 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -2180,7 +2180,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished: @@ -2191,6 +2192,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 db4a324646ca5c..354fe085ca2132 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9251,15 +9251,16 @@ new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -9270,7 +9271,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -9284,14 +9290,14 @@ - (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(uint16_t)minInterv reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -9308,6 +9314,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 c5cf0391eaab4b..4cc9fda6cf6978 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -521,6 +521,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 bb89a0747e26ce..9fa13d75a158d3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -5334,6 +5334,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 463a561546abcd..bf5db54985a86d 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -10944,6 +10944,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"]; @@ -10962,7 +10986,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"]; @@ -10985,6 +11009,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 { @@ -10994,31 +11083,40 @@ - (void)testSendClusterTest_TC_LVL_2_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000001_MoveToLevel { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentLevel attribute"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Reset level to 254"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentLevel attribute Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:254]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Reset level to 254 Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); - } + [expectation fulfill]; + }]; - [expectation fulfill]; - }]; + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_2_1_000002_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 100ms"]; + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 100); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentLevel attribute"]; @@ -11032,12 +11130,17 @@ - (void)testSendClusterTest_TC_LVL_2_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 254); + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the RemainingTime attribute"]; @@ -11061,7 +11164,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MinLevel attribute"]; @@ -11085,7 +11188,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MaxLevel attribute"]; @@ -11104,7 +11207,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentFrequency attribute"]; @@ -11128,7 +11231,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MinFrequency attribute"]; @@ -11152,7 +11255,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MaxFrequency attribute"]; @@ -11176,7 +11279,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnOffTransitionTime attribute"]; @@ -11200,7 +11303,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnLevel attribute "]; @@ -11219,7 +11322,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnTransitionTime attribute "]; @@ -11238,7 +11341,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OffTransitionTime attribute "]; @@ -11257,7 +11360,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the DefaultMoveRate attribute "]; @@ -11276,7 +11379,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000015_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the Options attribute "]; @@ -11300,30 +11403,6 @@ - (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000015_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the StartUpCurrentLevel attribute "]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - (void)testSendClusterTest_TC_LVL_2_2_000000_WaitForCommissionee { @@ -11435,7 +11514,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000005_WriteAttribute XCTAssertNotNil(cluster); id onLevelArgument; - onLevelArgument = [NSNumber numberWithUnsignedChar:1]; + onLevelArgument = [NSNumber numberWithUnsignedChar:254]; [cluster writeAttributeOnLevelWithValue:onLevelArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); @@ -11464,7 +11543,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000006_ReadAttribute { id actualValue = value; XCTAssertFalse(actualValue == nil); - XCTAssertEqual([actualValue unsignedCharValue], 1); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11638,31 +11717,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000013_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_2_000014_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the StartUpCurrentLevel attribute from the DUT"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_2_000014_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"writes the StartUpCurrentLevel attribute on the DUT"]; @@ -11672,7 +11727,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute XCTAssertNotNil(cluster); id startUpCurrentLevelArgument; - startUpCurrentLevelArgument = [NSNumber numberWithUnsignedChar:1]; + startUpCurrentLevelArgument = [NSNumber numberWithUnsignedChar:254]; [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); @@ -11684,7 +11739,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_2_000016_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_2_000015_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads the StartUpCurrentLevel attribute from the DUT"]; @@ -11700,7 +11755,8 @@ - (void)testSendClusterTest_TC_LVL_2_2_000016_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 1); + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11781,7 +11837,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000003_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11957,7 +12013,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000012_WaitForMs XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 10ms"]; dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForMs(expectation, queue, 10); + WaitForMs(expectation, queue, 100); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_3_1_000013_ReadAttribute @@ -12066,7 +12122,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000002_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -12123,7 +12179,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000005_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -12204,7 +12260,15 @@ - (void)testSendClusterTest_TC_LVL_4_1_000009_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } } [expectation fulfill]; @@ -12682,7 +12746,15 @@ - (void)testSendClusterTest_TC_LVL_6_1_000004_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } } [expectation fulfill]; @@ -12762,7 +12834,15 @@ - (void)testSendClusterTest_TC_LVL_6_1_000008_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 2); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 2); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 3); + } } [expectation fulfill]; @@ -47054,7 +47134,7 @@ - (void)testSendClusterLevelControlWriteAttributeStartUpCurrentLevelWithValue XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeStartUpCurrentLevelWithValue"]; - NSNumber * _Nonnull value = @(0); + NSNumber * _Nullable value = @(0); [cluster writeAttributeStartUpCurrentLevelWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl StartUpCurrentLevel Error: %@", err); @@ -47089,6 +47169,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/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 07e7acdbbbcbf5..63edca3f85d2ce 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -298,39 +298,44 @@ /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ + \ + /* 890 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ + \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 890 - BatteryVoltage, */ \ + /* 894 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 894 - BatteryTimeRemaining, */ \ + /* 898 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 898 - ActiveBatteryFaults, */ \ + /* 902 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 906 - FeatureMap, */ \ + /* 910 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 910 - Networks, */ \ + /* 914 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 922 - LastConnectErrorValue, */ \ + /* 926 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 926 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 930 - FeatureMap, */ \ + /* 934 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 934 - label list, */ \ + /* 938 - 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, \ @@ -348,55 +353,55 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 1188 - Description, */ \ + /* 1192 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 1195 - DoorOpenEvents, */ \ + /* 1199 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1199 - DoorClosedEvents, */ \ + /* 1203 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1203 - Language, */ \ + /* 1207 - Language, */ \ 2, 'e', 'n', \ \ - /* 1206 - AutoRelockTime, */ \ + /* 1210 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 1210 - FeatureMap, */ \ + /* 1214 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 1214 - LifetimeRunningHours, */ \ + /* 1218 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1217 - Power, */ \ + /* 1221 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1220 - LifetimeEnergyConsumed, */ \ + /* 1224 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1224 - FeatureMap, */ \ + /* 1228 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 1228 - FeatureMap, */ \ + /* 1232 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 1232 - IAS CIE address, */ \ + /* 1236 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ - /* 1240 - channel list, */ \ + /* 1244 - 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, \ @@ -414,7 +419,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1494 - target navigator list, */ \ + /* 1498 - 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, \ @@ -432,24 +437,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 1748 - start time, */ \ + /* 1752 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1756 - duration, */ \ + /* 1760 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1764 - playback speed, */ \ + /* 1768 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1768 - seek range end, */ \ + /* 1772 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1776 - seek range start, */ \ + /* 1780 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 1784 - media input list, */ \ + /* 1788 - 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, \ @@ -467,7 +472,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2038 - accept header list, */ \ + /* 2042 - 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, \ @@ -483,12 +488,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, \ \ - /* 2292 - supported streaming protocols, */ \ + /* 2296 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2296 - audio output list, */ \ + /* 2300 - 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, \ @@ -506,7 +511,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2550 - application launcher list, */ \ + /* 2554 - 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, \ @@ -524,67 +529,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 2804 - allowed vendor list, */ \ + /* 2808 - allowed vendor 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, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 2836 - bitmap32, */ \ + /* 2840 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2840 - bitmap64, */ \ + /* 2844 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2848 - int24u, */ \ + /* 2852 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2851 - int32u, */ \ + /* 2855 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2855 - int40u, */ \ + /* 2859 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2860 - int48u, */ \ + /* 2864 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2866 - int56u, */ \ + /* 2870 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2873 - int64u, */ \ + /* 2877 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2881 - int24s, */ \ + /* 2885 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2884 - int32s, */ \ + /* 2888 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2888 - int40s, */ \ + /* 2892 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2893 - int48s, */ \ + /* 2897 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2899 - int56s, */ \ + /* 2903 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2906 - int64s, */ \ + /* 2910 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2914 - float_single, */ \ + /* 2918 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2918 - float_double, */ \ + /* 2922 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2926 - epoch_us, */ \ + /* 2930 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2934 - epoch_s, */ \ + /* 2938 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2938 - list_long_octet_string, */ \ + /* 2942 - 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, \ @@ -639,65 +644,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, \ \ - /* 3938 - nullable_bitmap32, */ \ + /* 3942 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3942 - nullable_bitmap64, */ \ + /* 3946 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3950 - nullable_int24u, */ \ + /* 3954 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3953 - nullable_int32u, */ \ + /* 3957 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3957 - nullable_int40u, */ \ + /* 3961 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3962 - nullable_int48u, */ \ + /* 3966 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3968 - nullable_int56u, */ \ + /* 3972 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3975 - nullable_int64u, */ \ + /* 3979 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3983 - nullable_int24s, */ \ + /* 3987 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3986 - nullable_int32s, */ \ + /* 3990 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3990 - nullable_int40s, */ \ + /* 3994 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3995 - nullable_int48s, */ \ + /* 3999 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4001 - nullable_int56s, */ \ + /* 4005 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4008 - nullable_int64s, */ \ + /* 4012 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4016 - nullable_float_single, */ \ + /* 4020 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4020 - nullable_float_double, */ \ + /* 4024 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 4028 - measurement type, */ \ + /* 4032 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4032 - total active power, */ \ + /* 4036 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 4036 - FeatureMap, */ \ + /* 4040 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -976,39 +981,44 @@ /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ + \ + /* 890 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 890 - BatteryVoltage, */ \ + /* 894 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 894 - BatteryTimeRemaining, */ \ + /* 898 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 898 - ActiveBatteryFaults, */ \ + /* 902 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 906 - FeatureMap, */ \ + /* 910 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 910 - Networks, */ \ + /* 914 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 922 - LastConnectErrorValue, */ \ + /* 926 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 926 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 930 - FeatureMap, */ \ + /* 934 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 934 - label list, */ \ + /* 938 - 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, \ @@ -1026,55 +1036,55 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 1188 - Description, */ \ + /* 1192 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 1195 - DoorOpenEvents, */ \ + /* 1199 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1199 - DoorClosedEvents, */ \ + /* 1203 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1203 - Language, */ \ + /* 1207 - Language, */ \ 2, 'e', 'n', \ \ - /* 1206 - AutoRelockTime, */ \ + /* 1210 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 1210 - FeatureMap, */ \ + /* 1214 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 1214 - LifetimeRunningHours, */ \ + /* 1218 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1217 - Power, */ \ + /* 1221 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1220 - LifetimeEnergyConsumed, */ \ + /* 1224 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1224 - FeatureMap, */ \ + /* 1228 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 1228 - FeatureMap, */ \ + /* 1232 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 1232 - IAS CIE address, */ \ + /* 1236 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ - /* 1240 - channel list, */ \ + /* 1244 - 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, \ @@ -1092,7 +1102,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1494 - target navigator list, */ \ + /* 1498 - 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, \ @@ -1110,24 +1120,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 1748 - start time, */ \ + /* 1752 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1756 - duration, */ \ + /* 1760 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1764 - playback speed, */ \ + /* 1768 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1768 - seek range end, */ \ + /* 1772 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1776 - seek range start, */ \ + /* 1780 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 1784 - media input list, */ \ + /* 1788 - 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, \ @@ -1145,7 +1155,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2038 - accept header list, */ \ + /* 2042 - 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, \ @@ -1161,12 +1171,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, \ \ - /* 2292 - supported streaming protocols, */ \ + /* 2296 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2296 - audio output list, */ \ + /* 2300 - 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, \ @@ -1184,7 +1194,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2550 - application launcher list, */ \ + /* 2554 - 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, \ @@ -1202,67 +1212,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 2804 - allowed vendor list, */ \ + /* 2808 - allowed vendor 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, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 2836 - bitmap32, */ \ + /* 2840 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2840 - bitmap64, */ \ + /* 2844 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2848 - int24u, */ \ + /* 2852 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2851 - int32u, */ \ + /* 2855 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2855 - int40u, */ \ + /* 2859 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2860 - int48u, */ \ + /* 2864 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2866 - int56u, */ \ + /* 2870 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2873 - int64u, */ \ + /* 2877 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2881 - int24s, */ \ + /* 2885 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2884 - int32s, */ \ + /* 2888 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2888 - int40s, */ \ + /* 2892 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2893 - int48s, */ \ + /* 2897 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2899 - int56s, */ \ + /* 2903 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2906 - int64s, */ \ + /* 2910 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2914 - float_single, */ \ + /* 2918 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2918 - float_double, */ \ + /* 2922 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2926 - epoch_us, */ \ + /* 2930 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2934 - epoch_s, */ \ + /* 2938 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2938 - list_long_octet_string, */ \ + /* 2942 - 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, \ @@ -1317,71 +1327,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, \ \ - /* 3938 - nullable_bitmap32, */ \ + /* 3942 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3942 - nullable_bitmap64, */ \ + /* 3946 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3950 - nullable_int24u, */ \ + /* 3954 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3953 - nullable_int32u, */ \ + /* 3957 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3957 - nullable_int40u, */ \ + /* 3961 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3962 - nullable_int48u, */ \ + /* 3966 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3968 - nullable_int56u, */ \ + /* 3972 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3975 - nullable_int64u, */ \ + /* 3979 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3983 - nullable_int24s, */ \ + /* 3987 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3986 - nullable_int32s, */ \ + /* 3990 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3990 - nullable_int40s, */ \ + /* 3994 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3995 - nullable_int48s, */ \ + /* 3999 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4001 - nullable_int56s, */ \ + /* 4005 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4008 - nullable_int64s, */ \ + /* 4012 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4016 - nullable_float_single, */ \ + /* 4020 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4020 - nullable_float_double, */ \ + /* 4024 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 4028 - measurement type, */ \ + /* 4032 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4032 - total active power, */ \ + /* 4036 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 4036 - FeatureMap, */ \ + /* 4040 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (147) +#define GENERATED_DEFAULTS_COUNT (148) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1474,7 +1484,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 614 +#define GENERATED_ATTRIBUTE_COUNT 615 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1766,7 +1776,7 @@ { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* 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 */ \ @@ -1781,9 +1791,12 @@ { 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_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* 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), \ @@ -1817,25 +1830,25 @@ { 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(890) }, /* BatteryVoltage */ \ + { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryVoltage */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryTimeRemaining */ \ + { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* BatteryTimeRemaining */ \ { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* ActiveBatteryFaults */ \ + { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(902) }, /* ActiveBatteryFaults */ \ { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(906) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* Networks */ \ + { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(914) }, /* Networks */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(922) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* FeatureMap */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* LastConnectErrorValue */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1845,11 +1858,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(930) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* 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(934) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(938) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ @@ -1866,7 +1879,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(1188) }, /* Description */ \ + { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1192) }, /* Description */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ @@ -1874,8 +1887,8 @@ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ { 0x0003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x0004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1195) }, /* DoorOpenEvents */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1199) }, /* DoorClosedEvents */ \ + { 0x0004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1199) }, /* DoorOpenEvents */ \ + { 0x0005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1203) }, /* DoorClosedEvents */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ @@ -1885,8 +1898,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(1203) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1206) }, /* AutoRelockTime */ \ + { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1207) }, /* Language */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1210) }, /* 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), \ @@ -1931,7 +1944,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(1210) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1214) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ @@ -1961,16 +1974,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(1214) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1217) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(1218) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1221) }, /* Power */ \ { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1220) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(1224) }, /* 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(1224) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1228) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ @@ -2000,7 +2013,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(1228) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1232) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ @@ -2121,7 +2134,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(1232) }, /* IAS CIE address */ \ + { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1236) }, /* 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 */ \ \ @@ -2130,25 +2143,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(1240) }, /* channel list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1244) }, /* 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(1494) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1498) }, /* 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(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1748) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1756) }, /* duration */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1764) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1776) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1752) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1760) }, /* duration */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1772) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1780) }, /* 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(1784) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1788) }, /* 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 */ \ \ @@ -2159,18 +2172,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(2038) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2042) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2292) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2296) }, /* 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(2296) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2300) }, /* 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(2550) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2554) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -2180,7 +2193,7 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2804) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2808) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ @@ -2190,28 +2203,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(2836) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2844) }, /* 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(2848) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2851) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2855) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2860) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2866) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2873) }, /* int64u */ \ + { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2852) }, /* int24u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2855) }, /* int32u */ \ + { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2859) }, /* int40u */ \ + { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2864) }, /* int48u */ \ + { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2870) }, /* int56u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2877) }, /* 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(2881) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2884) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2888) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2893) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2899) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2906) }, /* int64s */ \ + { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2885) }, /* int24s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2888) }, /* int32s */ \ + { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2892) }, /* int40s */ \ + { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2897) }, /* int48s */ \ + { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2903) }, /* int56s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2910) }, /* 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(2914) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* float_double */ \ + { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* float_single */ \ + { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2922) }, /* 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 */ \ @@ -2224,8 +2237,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(2926) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2934) }, /* epoch_s */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2930) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2938) }, /* 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_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2240,7 +2253,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(2938) }, /* list_long_octet_string */ \ + { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2942) }, /* 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), \ @@ -2250,49 +2263,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(3938) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_bitmap32 */ \ { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3946) }, /* 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(3950) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3954) }, /* nullable_int24u */ \ { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3953) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3957) }, /* nullable_int32u */ \ { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3957) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3961) }, /* nullable_int40u */ \ { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3962) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3966) }, /* nullable_int48u */ \ { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3968) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3972) }, /* nullable_int56u */ \ { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3975) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3979) }, /* 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(3983) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3987) }, /* nullable_int24s */ \ { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3986) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3990) }, /* nullable_int32s */ \ { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3990) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(3994) }, /* nullable_int40s */ \ { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3995) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(3999) }, /* nullable_int48s */ \ { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4001) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(4005) }, /* nullable_int56s */ \ { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4008) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(4012) }, /* 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(4016) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(4020) }, /* nullable_float_single */ \ { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4020) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(4024) }, /* 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), \ @@ -2317,8 +2330,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(4028) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4032) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4032) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4036) }, /* 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 */ \ @@ -2340,7 +2353,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(4036) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4040) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2521,177 +2534,177 @@ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(210), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(225), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(234), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(235), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(239), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(241), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(252), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(262), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(263), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(268), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(270), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(272), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(274), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(280), \ + ZAP_ATTRIBUTE_INDEX(281), \ 28, \ 49, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(308), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(309), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(328), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(329), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(333), \ + ZAP_ATTRIBUTE_INDEX(334), \ 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(359), \ + ZAP_ATTRIBUTE_INDEX(360), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(378), \ + ZAP_ATTRIBUTE_INDEX(379), \ 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(382), \ + ZAP_ATTRIBUTE_INDEX(383), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(435), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(436), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(441), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(446), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(447), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(450), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(451), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(455), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(456), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(460), \ + ZAP_ATTRIBUTE_INDEX(461), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(464), \ + ZAP_ATTRIBUTE_INDEX(465), \ 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(470), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(471), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(472), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(473), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(474), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(477), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(478), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(484), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(485), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(487), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(489), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(490), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(492), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(493), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(495), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(496), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(497), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(498), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(505), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(506), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(506), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(507), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(584), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(585), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(596), \ + ZAP_ATTRIBUTE_INDEX(597), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(598), \ + ZAP_ATTRIBUTE_INDEX(599), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(605), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(606), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(610), \ + ZAP_ATTRIBUTE_INDEX(611), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2703,7 +2716,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 24, 1755 }, { ZAP_CLUSTER_INDEX(24), 47, 6226 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 24, 1755 }, { ZAP_CLUSTER_INDEX(24), 47, 6230 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2713,7 +2726,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (8002) +#define ATTRIBUTE_MAX_SIZE (8006) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) 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 1f00a31f29ed1b..43bf17db7efe33 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -260,7 +260,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/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 8e9bf8fad3186e..7038c647ad73de 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -3568,24 +3568,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace StartUpCurrentLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -3595,6 +3598,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace StartUpCurrentLevel namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 1acd7c9462845c..f715ef9bcc5ec6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -632,8 +632,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace DefaultMoveRate namespace StartUpCurrentLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace StartUpCurrentLevel namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index eac0efeb0fa85b..58bd22d5af126a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -3278,6 +3278,14 @@ enum class StepMode : uint8_t using StepMode = EmberAfStepMode; #endif +// Bitmap for LevelControlFeature +enum class LevelControlFeature : uint32_t +{ + kOnOff = 0x1, + kLighting = 0x2, + kFrequency = 0x4, +}; + namespace Commands { // Forward-declarations so we can reference these later. @@ -3784,9 +3792,9 @@ struct TypeInfo namespace StartUpCurrentLevel { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartUpCurrentLevel::Id; } @@ -3851,7 +3859,7 @@ struct TypeInfo Attributes::OnTransitionTime::TypeInfo::DecodableType onTransitionTime; Attributes::OffTransitionTime::TypeInfo::DecodableType offTransitionTime; Attributes::DefaultMoveRate::TypeInfo::DecodableType defaultMoveRate; - Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel = static_cast(0); + Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel; Attributes::AttributeList::TypeInfo::DecodableType attributeList; Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); 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 e7e484c85776e0..46c60a79884f31 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -902,6 +902,12 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_KEYPAD_INPUT_FEATURE_NUMBER_KEYS_OFFSET (2) #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/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 6b91a3e0efab7c..9adb525d614173 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 184 +#define GENERATED_ATTRIBUTE_COUNT 185 #define GENERATED_ATTRIBUTES \ { \ \ @@ -805,13 +815,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(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), \ @@ -823,9 +833,12 @@ { 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_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* 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 */ \ @@ -838,11 +851,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 */ \ } @@ -919,18 +932,18 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(157), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(172), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(173), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(177), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(178), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(182), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(183), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } @@ -939,7 +952,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 15, 1031 }, { ZAP_CLUSTER_INDEX(15), 5, 291 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 1031 }, { ZAP_CLUSTER_INDEX(15), 5, 295 }, \ } // Largest attribute size is needed for various buffers @@ -949,7 +962,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1322) +#define ATTRIBUTE_MAX_SIZE (1326) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/bridge-app/zap-generated/gen_config.h b/zzz_generated/bridge-app/zap-generated/gen_config.h index c996e9c9ea84ab..3bedda895a0570 100644 --- a/zzz_generated/bridge-app/zap-generated/gen_config.h +++ b/zzz_generated/bridge-app/zap-generated/gen_config.h @@ -95,7 +95,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/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 9ecf0953e6d6bc..2dcb480bf0b253 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -23272,6 +23272,7 @@ class ReportKeypadInputClusterRevision : public ModelCommand | * DefaultMoveRate | 0x0014 | | * StartUpCurrentLevel | 0x4000 | | * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | @@ -24573,7 +24574,7 @@ class ReadLevelControlStartUpCurrentLevel : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint8_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeEventResponse(context, "LevelControl.StartUpCurrentLevel response", value); } @@ -24602,7 +24603,7 @@ class WriteLevelControlStartUpCurrentLevel : public ModelCommand } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class ReportLevelControlStartUpCurrentLevel : public ModelCommand @@ -24636,7 +24637,10 @@ class ReportLevelControlStartUpCurrentLevel : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint8_t value) { LogValue("LevelControl.StartUpCurrentLevel report", 0, value); } + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) + { + LogValue("LevelControl.StartUpCurrentLevel report", 0, value); + } private: uint16_t mMinInterval; @@ -24674,6 +24678,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) ReadAttribute 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) + { + OnGeneralAttributeEventResponse(context, "LevelControl.FeatureMap response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -56758,6 +56792,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 34f2af8e8da1f1..40c03087c7ec0e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -17361,13 +17361,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; } @@ -17380,7 +17396,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; chip::Optional mCluster; chip::Optional mEndpoint; @@ -17400,7 +17416,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 @@ -17412,7 +17465,7 @@ class Test_TC_LVL_1_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -17426,12 +17479,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 = mEndpoint.HasValue() ? mEndpoint.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 = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -17441,17 +17514,78 @@ 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 = mEndpoint.HasValue() ? mEndpoint.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 = mEndpoint.HasValue() ? mEndpoint.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 = mEndpoint.HasValue() ? mEndpoint.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 @@ -17495,64 +17629,64 @@ class Test_TC_LVL_2_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentLevel attribute\n"); - err = TestReadsTheCurrentLevelAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reset level to 254\n"); + err = TestResetLevelTo254_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentLevel attribute\n"); - err = TestReadsTheCurrentLevelAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100ms\n"); + err = TestWait100ms_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the RemainingTime attribute\n"); - err = TestReadsTheRemainingTimeAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentLevel attribute\n"); + err = TestReadsTheCurrentLevelAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); - err = TestReadsTheMinLevelAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the RemainingTime attribute\n"); + err = TestReadsTheRemainingTimeAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); - err = TestReadsTheMaxLevelAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MinLevel attribute\n"); + err = TestReadsTheMinLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the CurrentFrequency attribute\n"); - err = TestReadsTheCurrentFrequencyAttribute_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); + err = TestReadsTheMaxLevelAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the MinFrequency attribute\n"); - err = TestReadsTheMinFrequencyAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentFrequency attribute\n"); + err = TestReadsTheCurrentFrequencyAttribute_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MaxFrequency attribute\n"); - err = TestReadsTheMaxFrequencyAttribute_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MinFrequency attribute\n"); + err = TestReadsTheMinFrequencyAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the OnOffTransitionTime attribute\n"); - err = TestReadsTheOnOffTransitionTimeAttribute_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the MaxFrequency attribute\n"); + err = TestReadsTheMaxFrequencyAttribute_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnLevel attribute \n"); - err = TestReadsTheOnLevelAttribute_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnOffTransitionTime attribute\n"); + err = TestReadsTheOnOffTransitionTimeAttribute_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnTransitionTime attribute \n"); - err = TestReadsTheOnTransitionTimeAttribute_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnLevel attribute \n"); + err = TestReadsTheOnLevelAttribute_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OffTransitionTime attribute \n"); - err = TestReadsTheOffTransitionTimeAttribute_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OnTransitionTime attribute \n"); + err = TestReadsTheOnTransitionTimeAttribute_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the DefaultMoveRate attribute \n"); - err = TestReadsTheDefaultMoveRateAttribute_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OffTransitionTime attribute \n"); + err = TestReadsTheOffTransitionTimeAttribute_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the Options attribute \n"); - err = TestReadsTheOptionsAttribute_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the DefaultMoveRate attribute \n"); + err = TestReadsTheDefaultMoveRateAttribute_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the StartUpCurrentLevel attribute \n"); - err = TestReadsTheStartUpCurrentLevelAttribute_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the Options attribute \n"); + err = TestReadsTheOptionsAttribute_15(); break; } @@ -17570,34 +17704,14 @@ class Test_TC_LVL_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; - static void OnFailureCallback_1(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_1(status); - } - - static void OnSuccessCallback_1(void * context, uint8_t currentLevel) - { - (static_cast(context))->OnSuccessResponse_1(currentLevel); - } - - static void OnFailureCallback_2(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_2(status); - } - - static void OnSuccessCallback_2(void * context, uint8_t currentLevel) - { - (static_cast(context))->OnSuccessResponse_2(currentLevel); - } - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t remainingTime) + static void OnSuccessCallback_3(void * context, uint8_t currentLevel) { - (static_cast(context))->OnSuccessResponse_3(remainingTime); + (static_cast(context))->OnSuccessResponse_3(currentLevel); } static void OnFailureCallback_4(void * context, EmberAfStatus status) @@ -17605,9 +17719,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t minLevel) + static void OnSuccessCallback_4(void * context, uint16_t remainingTime) { - (static_cast(context))->OnSuccessResponse_4(minLevel); + (static_cast(context))->OnSuccessResponse_4(remainingTime); } static void OnFailureCallback_5(void * context, EmberAfStatus status) @@ -17615,9 +17729,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t maxLevel) + static void OnSuccessCallback_5(void * context, uint8_t minLevel) { - (static_cast(context))->OnSuccessResponse_5(maxLevel); + (static_cast(context))->OnSuccessResponse_5(minLevel); } static void OnFailureCallback_6(void * context, EmberAfStatus status) @@ -17625,9 +17739,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint16_t currentFrequency) + static void OnSuccessCallback_6(void * context, uint8_t maxLevel) { - (static_cast(context))->OnSuccessResponse_6(currentFrequency); + (static_cast(context))->OnSuccessResponse_6(maxLevel); } static void OnFailureCallback_7(void * context, EmberAfStatus status) @@ -17635,9 +17749,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint16_t minFrequency) + static void OnSuccessCallback_7(void * context, uint16_t currentFrequency) { - (static_cast(context))->OnSuccessResponse_7(minFrequency); + (static_cast(context))->OnSuccessResponse_7(currentFrequency); } static void OnFailureCallback_8(void * context, EmberAfStatus status) @@ -17645,9 +17759,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint16_t maxFrequency) + static void OnSuccessCallback_8(void * context, uint16_t minFrequency) { - (static_cast(context))->OnSuccessResponse_8(maxFrequency); + (static_cast(context))->OnSuccessResponse_8(minFrequency); } static void OnFailureCallback_9(void * context, EmberAfStatus status) @@ -17655,9 +17769,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint16_t onOffTransitionTime) + static void OnSuccessCallback_9(void * context, uint16_t maxFrequency) { - (static_cast(context))->OnSuccessResponse_9(onOffTransitionTime); + (static_cast(context))->OnSuccessResponse_9(maxFrequency); } static void OnFailureCallback_10(void * context, EmberAfStatus status) @@ -17665,9 +17779,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, const chip::app::DataModel::Nullable & onLevel) + static void OnSuccessCallback_10(void * context, uint16_t onOffTransitionTime) { - (static_cast(context))->OnSuccessResponse_10(onLevel); + (static_cast(context))->OnSuccessResponse_10(onOffTransitionTime); } static void OnFailureCallback_11(void * context, EmberAfStatus status) @@ -17675,9 +17789,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & onTransitionTime) + static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & onLevel) { - (static_cast(context))->OnSuccessResponse_11(onTransitionTime); + (static_cast(context))->OnSuccessResponse_11(onLevel); } static void OnFailureCallback_12(void * context, EmberAfStatus status) @@ -17685,9 +17799,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & offTransitionTime) + static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & onTransitionTime) { - (static_cast(context))->OnSuccessResponse_12(offTransitionTime); + (static_cast(context))->OnSuccessResponse_12(onTransitionTime); } static void OnFailureCallback_13(void * context, EmberAfStatus status) @@ -17695,9 +17809,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) + static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & offTransitionTime) { - (static_cast(context))->OnSuccessResponse_13(defaultMoveRate); + (static_cast(context))->OnSuccessResponse_13(offTransitionTime); } static void OnFailureCallback_14(void * context, EmberAfStatus status) @@ -17705,9 +17819,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t options) + static void OnSuccessCallback_14(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { - (static_cast(context))->OnSuccessResponse_14(options); + (static_cast(context))->OnSuccessResponse_14(defaultMoveRate); } static void OnFailureCallback_15(void * context, EmberAfStatus status) @@ -17715,9 +17829,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, uint8_t startUpCurrentLevel) + static void OnSuccessCallback_15(void * context, uint8_t options) { - (static_cast(context))->OnSuccessResponse_15(startUpCurrentLevel); + (static_cast(context))->OnSuccessResponse_15(options); } // @@ -17730,296 +17844,290 @@ class Test_TC_LVL_2_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadsTheCurrentLevelAttribute_1() + CHIP_ERROR TestResetLevelTo254_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; - void OnSuccessResponse_1(uint8_t currentLevel) - { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); + RequestType request; + request.level = 254; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; - NextTest(); - } + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_1(); + }; - CHIP_ERROR TestReadsTheCurrentLevelAttribute_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_1(status); + }; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2)); + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2(uint8_t currentLevel) + void OnSuccessResponse_1() { NextTest(); } + + CHIP_ERROR TestWait100ms_2() { - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - NextTest(); + SetIdentity(kIdentityAlpha); + return WaitForMs(100); } - CHIP_ERROR TestReadsTheRemainingTimeAttribute_3() + CHIP_ERROR TestReadsTheCurrentLevelAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(uint16_t remainingTime) + void OnSuccessResponse_3(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); } - CHIP_ERROR TestReadsTheMinLevelAttribute_4() + CHIP_ERROR TestReadsTheRemainingTimeAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_4, OnFailureCallback_4)); return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(uint8_t minLevel) + void OnSuccessResponse_4(uint16_t remainingTime) { - VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); + VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheMaxLevelAttribute_5() + CHIP_ERROR TestReadsTheMinLevelAttribute_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_5, OnFailureCallback_5)); return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5(uint8_t maxLevel) + void OnSuccessResponse_5(uint8_t minLevel) { - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); + NextTest(); } - CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_6() + CHIP_ERROR TestReadsTheMaxLevelAttribute_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_6, OnFailureCallback_6)); return CHIP_NO_ERROR; } void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6(uint16_t currentFrequency) + void OnSuccessResponse_6(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("currentFrequency", currentFrequency, 0U)); - + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheMinFrequencyAttribute_7() + CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_7, OnFailureCallback_7)); return CHIP_NO_ERROR; } void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7(uint16_t minFrequency) + void OnSuccessResponse_7(uint16_t currentFrequency) { - VerifyOrReturn(CheckValue("minFrequency", minFrequency, 0U)); + VerifyOrReturn(CheckValue("currentFrequency", currentFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheMaxFrequencyAttribute_8() + CHIP_ERROR TestReadsTheMinFrequencyAttribute_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_8, OnFailureCallback_8)); return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8(uint16_t maxFrequency) + void OnSuccessResponse_8(uint16_t minFrequency) { - VerifyOrReturn(CheckValue("maxFrequency", maxFrequency, 0U)); + VerifyOrReturn(CheckValue("minFrequency", minFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_9() + CHIP_ERROR TestReadsTheMaxFrequencyAttribute_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_9, OnFailureCallback_9)); return CHIP_NO_ERROR; } void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9(uint16_t onOffTransitionTime) + void OnSuccessResponse_9(uint16_t maxFrequency) { - VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); + VerifyOrReturn(CheckValue("maxFrequency", maxFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheOnLevelAttribute_10() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_10, OnFailureCallback_10)); return CHIP_NO_ERROR; } void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(const chip::app::DataModel::Nullable & onLevel) + void OnSuccessResponse_10(uint16_t onOffTransitionTime) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); + NextTest(); } - CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_11() + CHIP_ERROR TestReadsTheOnLevelAttribute_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_11, OnFailureCallback_11)); return CHIP_NO_ERROR; } void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11(const chip::app::DataModel::Nullable & onTransitionTime) + void OnSuccessResponse_11(const chip::app::DataModel::Nullable & onLevel) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_12() + CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_12, OnFailureCallback_12)); return CHIP_NO_ERROR; } void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12(const chip::app::DataModel::Nullable & offTransitionTime) + void OnSuccessResponse_12(const chip::app::DataModel::Nullable & onTransitionTime) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_13() + CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_13, OnFailureCallback_13)); return CHIP_NO_ERROR; } void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13(const chip::app::DataModel::Nullable & defaultMoveRate) + void OnSuccessResponse_13(const chip::app::DataModel::Nullable & offTransitionTime) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadsTheOptionsAttribute_14() + CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_14, OnFailureCallback_14)); return CHIP_NO_ERROR; } void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14(uint8_t options) + void OnSuccessResponse_14(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValue("options", options, 0)); - + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_15() + CHIP_ERROR TestReadsTheOptionsAttribute_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_15, OnFailureCallback_15)); return CHIP_NO_ERROR; } void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15(uint8_t startUpCurrentLevel) + void OnSuccessResponse_15(uint8_t options) { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 0)); + VerifyOrReturn(CheckValue("options", options, 0)); NextTest(); } @@ -18118,16 +18226,12 @@ class Test_TC_LVL_2_2 : public TestCommand err = TestReadsTheDefaultMoveRateAttributeFromTheDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : writes the StartUpCurrentLevel attribute on the DUT\n"); + err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : writes the StartUpCurrentLevel attribute on the DUT\n"); - err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16(); + ChipLogProgress(chipTool, " ***** Test Step 15 : reads the StartUpCurrentLevel attribute from the DUT\n"); + err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15(); break; } @@ -18140,7 +18244,7 @@ class Test_TC_LVL_2_2 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; @@ -18262,26 +18366,16 @@ class Test_TC_LVL_2_2 : public TestCommand (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t startUpCurrentLevel) - { - (static_cast(context))->OnSuccessResponse_14(startUpCurrentLevel); - } + static void OnSuccessCallback_14(void * context) { (static_cast(context))->OnSuccessResponse_14(); } static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } - - static void OnFailureCallback_16(void * context, EmberAfStatus status) + static void OnSuccessCallback_15(void * context, const chip::app::DataModel::Nullable & startUpCurrentLevel) { - (static_cast(context))->OnFailureResponse_16(status); - } - - static void OnSuccessCallback_16(void * context, uint8_t startUpCurrentLevel) - { - (static_cast(context))->OnSuccessResponse_16(startUpCurrentLevel); + (static_cast(context))->OnSuccessResponse_15(startUpCurrentLevel); } // @@ -18378,7 +18472,7 @@ class Test_TC_LVL_2_2 : public TestCommand chip::app::DataModel::Nullable onLevelArgument; onLevelArgument.SetNonNull(); - onLevelArgument.Value() = 1; + onLevelArgument.Value() = 254; ReturnErrorOnFailure(cluster.WriteAttribute( onLevelArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); @@ -18405,7 +18499,7 @@ class Test_TC_LVL_2_2 : public TestCommand void OnSuccessResponse_6(const chip::app::DataModel::Nullable & onLevel) { VerifyOrReturn(CheckValueNonNull("onLevel", onLevel)); - VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(), 1)); + VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(), 254)); NextTest(); } @@ -18551,60 +18645,42 @@ class Test_TC_LVL_2_2 : public TestCommand NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_14() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_14(uint8_t startUpCurrentLevel) - { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 0)); - - NextTest(); - } - - CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_15() + CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t startUpCurrentLevelArgument; - startUpCurrentLevelArgument = 1; + chip::app::DataModel::Nullable startUpCurrentLevelArgument; + startUpCurrentLevelArgument.SetNonNull(); + startUpCurrentLevelArgument.Value() = 254; ReturnErrorOnFailure(cluster.WriteAttribute( - startUpCurrentLevelArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); + startUpCurrentLevelArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15() { NextTest(); } + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16() + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_16, OnFailureCallback_16)); + this, OnSuccessCallback_15, OnFailureCallback_15)); return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16(uint8_t startUpCurrentLevel) + void OnSuccessResponse_15(const chip::app::DataModel::Nullable & startUpCurrentLevel) { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 1)); + VerifyOrReturn(CheckValueNonNull("startUpCurrentLevel", startUpCurrentLevel)); + VerifyOrReturn(CheckValue("startUpCurrentLevel.Value()", startUpCurrentLevel.Value(), 254)); NextTest(); } @@ -18861,7 +18937,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_3(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 255)); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); } @@ -19022,7 +19098,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestWait10ms_12() { SetIdentity(kIdentityAlpha); - return WaitForMs(10); + return WaitForMs(100); } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() @@ -19321,7 +19397,7 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_2(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 255)); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); } @@ -19374,7 +19450,7 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_5(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 255)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); } @@ -19447,8 +19523,8 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_9(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -20170,8 +20246,8 @@ class Test_TC_LVL_6_1 : public TestCommand void OnSuccessResponse_4(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -20248,8 +20324,8 @@ class Test_TC_LVL_6_1 : public TestCommand void OnSuccessResponse_8(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 2)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 2)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 3)); NextTest(); } diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index f38eedda6b7b15..d9cd693bcbd68f 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,166 +340,166 @@ 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) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(14), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(15), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (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) */ \ } @@ -497,7 +508,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 61, 138 }, \ + { ZAP_CLUSTER_INDEX(0), 61, 142 }, \ } // Largest attribute size is needed for various buffers @@ -507,7 +518,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 3ec287cc36faa6..46a74e4fad741c 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 229 +#define GENERATED_ATTRIBUTE_COUNT 230 #define GENERATED_ATTRIBUTES \ { \ \ @@ -799,22 +809,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(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(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -826,9 +837,12 @@ { 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_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* 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 */ \ @@ -976,30 +990,30 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(179), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(194), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(195), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(199), \ + ZAP_ATTRIBUTE_INDEX(200), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(221), \ + ZAP_ATTRIBUTE_INDEX(222), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(225), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(226), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(226), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } @@ -1008,7 +1022,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1479 }, { ZAP_CLUSTER_INDEX(18), 6, 82 }, { ZAP_CLUSTER_INDEX(24), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 1479 }, { ZAP_CLUSTER_INDEX(18), 6, 86 }, { ZAP_CLUSTER_INDEX(24), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -1018,7 +1032,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1567) +#define ATTRIBUTE_MAX_SIZE (1571) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index e801337b0acc11..0107a4d822f95a 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -116,7 +116,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 ff71d08595d15d..0072840d51d6ad 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_config.h @@ -84,7 +84,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 ff71d08595d15d..0072840d51d6ad 100644 --- a/zzz_generated/placeholder/app2/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/gen_config.h @@ -84,7 +84,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 f7026fcb38420f..ae1bc0f0452caf 100644 --- a/zzz_generated/pump-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-app/zap-generated/gen_config.h @@ -103,7 +103,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/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 5c6861c64f3ea3..dcf9fca56f83dd 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,18 +462,18 @@ 0x00, 0x00, 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: 3, Cluster: Application Basic (server), big-endian */ \ \ - /* 2949 - allowed vendor list, */ \ + /* 2953 - allowed vendor 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, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2981 - accept header list, */ \ + /* 2985 - 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, \ @@ -484,12 +489,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, \ \ - /* 3235 - supported streaming protocols, */ \ + /* 3239 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), big-endian */ \ \ - /* 3239 - allowed vendor list, */ \ + /* 3243 - allowed vendor 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, \ } @@ -875,9 +880,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, \ @@ -895,24 +905,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, \ @@ -928,18 +938,18 @@ 0x00, 0x00, 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: 3, Cluster: Application Basic (server), little-endian */ \ \ - /* 2949 - allowed vendor list, */ \ + /* 2953 - allowed vendor 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, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2981 - accept header list, */ \ + /* 2985 - 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, \ @@ -955,19 +965,19 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3235 - supported streaming protocols, */ \ + /* 3239 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), little-endian */ \ \ - /* 3239 - allowed vendor list, */ \ + /* 3243 - allowed vendor 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, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (93) +#define GENERATED_DEFAULTS_COUNT (94) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1000,7 +1010,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 284 +#define GENERATED_ATTRIBUTE_COUNT 285 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1290,13 +1300,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), \ @@ -1308,9 +1318,12 @@ { 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_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* 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 */ \ @@ -1320,7 +1333,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 */ \ \ @@ -1333,19 +1346,19 @@ \ /* Endpoint: 3, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2655) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2663) }, /* duration */ \ + { 0x0001, ZAP_TYPE(EPOCH_US), 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) */ \ @@ -1357,7 +1370,7 @@ ZAP_EMPTY_DEFAULT() }, /* application app */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2949) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2953) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Account Login (server) */ \ @@ -1371,9 +1384,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(2981) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2985) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3235) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(3239) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ @@ -1385,7 +1398,7 @@ ZAP_EMPTY_DEFAULT() }, /* application app */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3239) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3243) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 5, Cluster: Descriptor (server) */ \ @@ -1533,45 +1546,45 @@ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(205), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(220), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(221), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(225), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(226), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(228), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(233), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(234), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(241), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(242), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(244), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(245), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(253), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(254), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(254), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(255), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(259), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(260), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(262), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(263), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(271), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(272), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(276), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(277), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } @@ -1580,7 +1593,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 23, 2005 }, { ZAP_CLUSTER_INDEX(23), 10, 1328 }, { ZAP_CLUSTER_INDEX(33), 4, 283 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 2005 }, { ZAP_CLUSTER_INDEX(23), 10, 1328 }, { ZAP_CLUSTER_INDEX(33), 4, 287 }, \ { ZAP_CLUSTER_INDEX(37), 5, 439 }, { ZAP_CLUSTER_INDEX(42), 3, 398 }, { ZAP_CLUSTER_INDEX(45), 2, 106 }, \ } @@ -1591,7 +1604,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (686) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4559) +#define ATTRIBUTE_MAX_SIZE (4563) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-app/zap-generated/gen_config.h b/zzz_generated/tv-app/zap-generated/gen_config.h index 6bfc53dfb17504..0d1f199a7701fb 100644 --- a/zzz_generated/tv-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-app/zap-generated/gen_config.h @@ -167,7 +167,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/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 3bf6bc97daa0e7..b5df347029fb0d 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1126,13 +1126,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), \ @@ -1144,9 +1144,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_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* 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), \ 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 6d1336ae44732a..db956ac807034a 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -215,7 +215,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