Skip to content

Commit d541e2c

Browse files
bzbarsky-appleDavid Lechner
authored and
David Lechner
committed
Combine various different ZAP configuration lists into a single YAML. (project-chip#24958)
* Combine various different ZAP configuration lists into a single YAML. Fixes project-chip#24954 * Fix k32w timeout.
1 parent fc0a827 commit d541e2c

File tree

12 files changed

+90
-50
lines changed

12 files changed

+90
-50
lines changed

integrations/docker/images/chip-cert-bins/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb
77
# ZAP Development install, so that it runs on both x64 and arm64
88
# Generally this should match with the ZAP version that is used for codegen within the
99
# specified SHA
10-
ARG ZAP_VERSION=v2023.02.03-nightly
10+
ARG ZAP_VERSION=v2023.02.09-nightly
1111

1212
# Ensure TARGETPLATFORM is set
1313
RUN case ${TARGETPLATFORM} in \

scripts/tools/zap/zap_execution.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Use scripts/tools/zap/version_update.py to manage ZAP versioning as many
2424
# files may need updating for versions
2525
#
26-
MIN_ZAP_VERSION = '2023.2.3'
26+
MIN_ZAP_VERSION = '2023.2.9'
2727

2828

2929
class ZapTool:

scripts/zap.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"mac-arm64",
99
"windows-amd64"
1010
],
11-
"tags": ["version:2@v2023.02.03-nightly.1"]
11+
"tags": ["version:2@v2023.02.09-nightly.1"]
1212
}
1313
]
1414
}
+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
LegacyStructs:
2+
# List of structs for which we output a legacy definition in af-structs.h
3+
# Ideally this list should become empty.
4+
- CredentialStruct
5+
6+
WeakEnums:
7+
# Allow-list of enums that we generate as enums, not enum classes.
8+
# The goal is to drive this down to 0.
9+
- BarrierControlBarrierPosition
10+
- BarrierControlMovingState
11+
- ColorControlOptions
12+
- ColorLoopAction
13+
- ColorLoopDirection
14+
- ColorMode
15+
- ContentLaunchStatus
16+
- ContentLaunchStreamingType
17+
- EnhancedColorMode
18+
- HardwareFaultEnum
19+
- HueDirection
20+
- HueMoveMode
21+
- HueStepMode
22+
- IdentifyEffectIdentifier
23+
- IdentifyEffectVariant
24+
- IdentifyIdentifyType
25+
- InterfaceTypeEnum
26+
- KeypadLockout
27+
- LevelControlOptions
28+
- MoveMode
29+
- NetworkFaultEnum
30+
- OnOffDelayedAllOffEffectVariant
31+
- OnOffDyingLightEffectVariant
32+
- OnOffEffectIdentifier
33+
- PHYRateEnum
34+
- RadioFaultEnum
35+
- RoutingRole
36+
- SaturationMoveMode
37+
- SaturationStepMode
38+
- SecurityType
39+
- StatusCode
40+
- StepMode
41+
- TemperatureDisplayMode
42+
- WiFiVersionType
43+
44+
# We need a more configurable way of deciding which clusters have which init functions....
45+
# See https://github.com/project-chip/connectedhomeip/issues/4369
46+
ClustersWithInitFunctions:
47+
- Basic
48+
- Color Control
49+
- Groups
50+
- Identify
51+
- Level Control
52+
- Localization Configuration
53+
- Occupancy Sensing
54+
- On/Off
55+
- Pump Configuration and Control
56+
- Scenes
57+
- Time Format Localization
58+
- Thermostat
59+
- Mode Select
60+
61+
ClustersWithAttributeChangedFunctions:
62+
- Bridged Device Basic
63+
- Door Lock
64+
- Identify
65+
- Pump Configuration and Control
66+
- Window Covering
67+
- Fan Control
68+
69+
ClustersWithPreAttributeChangeFunctions:
70+
- Door Lock
71+
- Pump Configuration and Control
72+
- Thermostat User Interface Configuration
73+
- Time Format Localization
74+
- Localization Configuration
75+
- Mode Select
76+
- Fan Control
77+
- Thermostat

src/app/common/templates/legacy-struct-list.yaml

-3
This file was deleted.

src/app/common/templates/templates.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"templates/chip/helper.js"
1010
],
1111
"resources": {
12-
"weak-enum-list": "weak-enum-list.yaml",
13-
"legacy-struct-list": "legacy-struct-list.yaml"
12+
"config-data": "config-data.yaml"
1413
},
1514
"override": "../../zap-templates/common/override.js",
1615
"partials": [

src/app/common/templates/weak-enum-list.yaml

-36
This file was deleted.

src/app/zap-templates/app-templates.json

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"templates/app/helper.js",
1010
"templates/chip/helper.js"
1111
],
12+
"resources": {
13+
"config-data": "../common/templates/config-data.yaml"
14+
},
1215
"override": "common/override.js",
1316
"partials": [
1417
{

src/app/zap-templates/templates/app/af-structs.zapt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
{{#zcl_structs}}
1717

18-
{{#if (isLegacyStruct (asUnderlyingType label))}}
18+
{{#if (isInConfigList (asUnderlyingType label) "LegacyStructs")}}
1919
{{#if itemCnt}}
2020
// Struct for {{label}}
2121
typedef struct _{{asType label}} {

src/app/zap-templates/templates/app/cluster-enums-check.zapt

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ static auto __attribute__((unused)) EnsureKnownEnumValue({{asUpperCamelCase ../n
1313
{
1414
using EnumType = {{asUpperCamelCase ../name}}::{{asType label}};
1515
switch (val) {
16-
{{#if (isWeaklyTypedEnum label)}}
16+
{{#if (isInConfigList label "WeakEnums")}}
1717
// Need to convert consumers to using the new enum classes, so we
1818
// don't just have casts all over.
1919
#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM
2020
{{/if}}
2121
{{#zcl_enum_items}}
2222
case EnumType::k{{asUpperCamelCase label}}:
2323
{{/zcl_enum_items}}
24-
{{#if (isWeaklyTypedEnum label)}}
24+
{{#if (isInConfigList label "WeakEnums")}}
2525
#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM
2626
{{#zcl_enum_items}}
2727
case EMBER_ZCL_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}}:

src/app/zap-templates/templates/app/cluster-enums.zapt

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Clusters {
1414
namespace {{asUpperCamelCase name}} {
1515
{{#zcl_enums}}
1616

17-
{{#if (isWeaklyTypedEnum label)}}
17+
{{#if (isInConfigList label "WeakEnums")}}
1818
// Need to convert consumers to using the new enum classes, so we
1919
// don't just have casts all over.
2020
#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM
@@ -30,7 +30,7 @@ k{{asUpperCamelCase label}} = {{asHex value 2}},
3030
// enum value. This specific should never be transmitted.
3131
kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}},
3232
};
33-
{{#if (isWeaklyTypedEnum label)}}
33+
{{#if (isInConfigList label "WeakEnums")}}
3434
#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM
3535
using {{asType label}} = EmberAf{{asType label}};
3636
static {{asType label}} __attribute__((unused)) k{{asType label}}kUnknownEnumValue = static_cast<{{asType label}}>({{first_unused_enum_value mode="first_unused"}});

src/app/zap-templates/templates/app/enums.zapt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{#zcl_enums}}
1111
{{#unless (isStrEqual label "Status")}}
1212
{{#unless (isStrEqual label "ReportingDirection")}}
13-
{{#if (isWeaklyTypedEnum label)}}
13+
{{#if (isInConfigList label "WeakEnums")}}
1414

1515
// Enum for {{label}}
1616
enum EmberAf{{asType label}} : {{asUnderlyingZclType name}} {

0 commit comments

Comments
 (0)