From 761993c81d07ab5371247f8bf9a56428efdeb93f Mon Sep 17 00:00:00 2001 From: ricardo-casallas <77841255+ricardo-casallas@users.noreply.github.com> Date: Fri, 9 Jul 2021 17:07:11 -0400 Subject: [PATCH] Window Covering cluster: ZAP configuration updated. (#8249) --- .../window-app/common/gen/endpoint_config.h | 47 ++++- examples/window-app/common/window-app.zap | 169 ++++++++++++++---- .../data_model/controller-clusters.zap | 2 +- 3 files changed, 179 insertions(+), 39 deletions(-) diff --git a/examples/window-app/common/gen/endpoint_config.h b/examples/window-app/common/gen/endpoint_config.h index cf6872f79cae7c..cad46dd33b831d 100644 --- a/examples/window-app/common/gen/endpoint_config.h +++ b/examples/window-app/common/gen/endpoint_config.h @@ -583,7 +583,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 106 +#define GENERATED_ATTRIBUTE_COUNT 115 #define GENERATED_ATTRIBUTES \ { \ \ @@ -710,11 +710,20 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x0008, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ + { 0x0009, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ + { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x000B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ + { 0x000C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ + { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ + { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x14) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ } @@ -762,7 +771,7 @@ 0x003E, ZAP_ATTRIBUTE_INDEX(94), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(96), 10, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(96), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ } @@ -771,7 +780,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 9, 1586 }, { ZAP_CLUSTER_INDEX(9), 1, 17 }, \ + { ZAP_CLUSTER_INDEX(0), 9, 1586 }, { ZAP_CLUSTER_INDEX(9), 1, 31 }, \ } // Largest attribute size is needed for various buffers @@ -781,7 +790,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (240) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1603) +#define ATTRIBUTE_MAX_SIZE (1617) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) @@ -922,10 +931,36 @@ #define ZAP_REPORT_DIRECTION(x) ZRD(x) // User options for plugin Reporting -#define EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE (0) +#define EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE (8) #define EMBER_AF_PLUGIN_REPORTING_ENABLE_GROUP_BOUND_REPORTS -#define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (0) +#define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (8) #define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { \ + ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0102, 0x0008, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ + }, /* CurrentPositionLiftPercentage */ \ + { \ + ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0102, 0x0009, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ + }, /* CurrentPositionTiltPercentage */ \ + { \ + ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0102, 0x000A, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ + }, /* OperationalStatus */ \ + { \ + ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0102, 0x000B, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ + }, /* TargetPositionLiftPercent100ths */ \ + { \ + ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0102, 0x000C, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ + }, /* TargetPositionTiltPercent100ths */ \ + { \ + ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0102, 0x000E, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ + }, /* CurrentPositionLiftPercent100ths */ \ + { \ + ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0102, 0x000F, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ + }, /* CurrentPositionTiltPercent100ths */ \ + { \ + ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0102, 0x001A, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ + }, /* SafetyStatus */ \ } diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 658a8a95595690..c3463002135425 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -2614,7 +2614,7 @@ "enabled": 0, "commands": [ { - "name": "WindowCoveringUpOpen", + "name": "UpOrOpen", "code": 0, "mfgCode": null, "source": "client", @@ -2622,7 +2622,7 @@ "outgoing": 0 }, { - "name": "WindowCoveringDownClose", + "name": "DownOrClose", "code": 1, "mfgCode": null, "source": "client", @@ -2630,7 +2630,7 @@ "outgoing": 0 }, { - "name": "WindowCoveringStop", + "name": "StopMotion", "code": 2, "mfgCode": null, "source": "client", @@ -2666,7 +2666,7 @@ "commands": [], "attributes": [ { - "name": "window covering type", + "name": "Type", "code": 0, "mfgCode": null, "side": "server", @@ -2681,7 +2681,7 @@ "reportableChange": 0 }, { - "name": "config status", + "name": "ConfigStatus", "code": 7, "mfgCode": null, "side": "server", @@ -2696,7 +2696,7 @@ "reportableChange": 0 }, { - "name": "installed open limit - lift", + "name": "InstalledOpenLimitLift", "code": 16, "mfgCode": null, "side": "server", @@ -2711,7 +2711,7 @@ "reportableChange": 0 }, { - "name": "installed closed limit - lift", + "name": "InstalledClosedLimitLift", "code": 17, "mfgCode": null, "side": "server", @@ -2726,7 +2726,7 @@ "reportableChange": 0 }, { - "name": "installed open limit - tilt", + "name": "InstalledOpenLimitTilt", "code": 18, "mfgCode": null, "side": "server", @@ -2741,7 +2741,7 @@ "reportableChange": 0 }, { - "name": "installed closed limit - tilt", + "name": "InstalledClosedLimitTilt", "code": 19, "mfgCode": null, "side": "server", @@ -2756,7 +2756,7 @@ "reportableChange": 0 }, { - "name": "mode", + "name": "Mode", "code": 23, "mfgCode": null, "side": "server", @@ -4663,7 +4663,7 @@ "enabled": 0, "commands": [ { - "name": "WindowCoveringUpOpen", + "name": "UpOrOpen", "code": 0, "mfgCode": null, "source": "client", @@ -4671,7 +4671,7 @@ "outgoing": 0 }, { - "name": "WindowCoveringDownClose", + "name": "DownOrClose", "code": 1, "mfgCode": null, "source": "client", @@ -4679,7 +4679,7 @@ "outgoing": 0 }, { - "name": "WindowCoveringStop", + "name": "StopMotion", "code": 2, "mfgCode": null, "source": "client", @@ -4687,7 +4687,7 @@ "outgoing": 0 }, { - "name": "WindowCoveringGoToLiftValue", + "name": "GoToLiftValue", "code": 4, "mfgCode": null, "source": "client", @@ -4695,7 +4695,7 @@ "outgoing": 0 }, { - "name": "WindowCoveringGoToLiftPercentage", + "name": "GoToLiftPercentage", "code": 5, "mfgCode": null, "source": "client", @@ -4703,7 +4703,7 @@ "outgoing": 0 }, { - "name": "WindowCoveringGoToTiltValue", + "name": "GoToTiltValue", "code": 7, "mfgCode": null, "source": "client", @@ -4711,7 +4711,7 @@ "outgoing": 0 }, { - "name": "WindowCoveringGoToTiltPercentage", + "name": "GoToTiltPercentage", "code": 8, "mfgCode": null, "source": "client", @@ -4747,7 +4747,7 @@ "commands": [], "attributes": [ { - "name": "window covering type", + "name": "Type", "code": 0, "mfgCode": null, "side": "server", @@ -4762,7 +4762,7 @@ "reportableChange": 0 }, { - "name": "physical closed limit - lift", + "name": "PhysicalClosedLimitLift", "code": 1, "mfgCode": null, "side": "server", @@ -4777,7 +4777,7 @@ "reportableChange": 0 }, { - "name": "current position - lift", + "name": "CurrentPositionLift", "code": 3, "mfgCode": null, "side": "server", @@ -4792,7 +4792,7 @@ "reportableChange": 0 }, { - "name": "current position - tilt", + "name": "CurrentPositionTilt", "code": 4, "mfgCode": null, "side": "server", @@ -4807,7 +4807,7 @@ "reportableChange": 0 }, { - "name": "config status", + "name": "ConfigStatus", "code": 7, "mfgCode": null, "side": "server", @@ -4822,37 +4822,127 @@ "reportableChange": 0 }, { - "name": "current position lift percentage", + "name": "CurrentPositionLiftPercentage", "code": 8, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0xFF", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "current position tilt percentage", + "name": "CurrentPositionTiltPercentage", "code": 9, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalStatus", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TargetPositionLiftPercent100ths", + "code": 11, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TargetPositionTiltPercent100ths", + "code": 12, + "mfgCode": null, + "side": "server", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EndProductType", + "code": 13, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "installed open limit - lift", + "name": "CurrentPositionLiftPercent100ths", + "code": 14, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPositionTiltPercent100ths", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "InstalledOpenLimitLift", "code": 16, "mfgCode": null, "side": "server", @@ -4867,7 +4957,7 @@ "reportableChange": 0 }, { - "name": "installed closed limit - lift", + "name": "InstalledClosedLimitLift", "code": 17, "mfgCode": null, "side": "server", @@ -4882,7 +4972,7 @@ "reportableChange": 0 }, { - "name": "installed open limit - tilt", + "name": "InstalledOpenLimitTilt", "code": 18, "mfgCode": null, "side": "server", @@ -4897,7 +4987,7 @@ "reportableChange": 0 }, { - "name": "installed closed limit - tilt", + "name": "InstalledClosedLimitTilt", "code": 19, "mfgCode": null, "side": "server", @@ -4912,7 +5002,7 @@ "reportableChange": 0 }, { - "name": "mode", + "name": "Mode", "code": 23, "mfgCode": null, "side": "server", @@ -4926,6 +5016,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "SafetyStatus", + "code": 26, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "cluster revision", "code": 65533, diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 35216d8b2fe229..35cd63fb019f07 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -4691,7 +4691,7 @@ "outgoing": 1 }, { - "name": "StopMotion", + "name": "Stop", "code": 2, "mfgCode": null, "source": "client",