Skip to content

Commit

Permalink
Move weakly typed enum list back into Matter repository. (#24270)
Browse files Browse the repository at this point in the history
Instead of hardcoding this list in the helper (in the ZAP repository),
it should be data in the Matter repository.  Then we can remove things
from the list without having to synchronize with ZAP changes.

This change on its own does not make ZAP use this YAML instead of the
hardcoded list; that will need to be a separate ZAP change after this
merges.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Sep 28, 2023
1 parent 500d3f3 commit 1640620
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/common/templates/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"templates/app/helper.js",
"templates/chip/helper.js"
],
"resources": {
"weak-enum-list": "weak-enum-list.yaml"
},
"override": "../../zap-templates/common/override.js",
"partials": [
{
Expand Down
39 changes: 39 additions & 0 deletions src/app/common/templates/weak-enum-list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Allow-list of enums that we generate as enums, not enum classes. The goal is
# to drive this down to 0.
- AttributeWritePermission
- BarrierControlBarrierPosition
- BarrierControlMovingState
- ColorControlOptions
- ColorLoopAction
- ColorLoopDirection
- ColorMode
- ContentLaunchStatus
- ContentLaunchStreamingType
- EnhancedColorMode
- HardwareFaultType
- HueDirection
- HueMoveMode
- HueStepMode
- IdentifyEffectIdentifier
- IdentifyEffectVariant
- IdentifyIdentifyType
- InterfaceType
- KeypadLockout
- LevelControlOptions
- MoveMode
- NetworkFaultType
- OnOffDelayedAllOffEffectVariant
- OnOffDyingLightEffectVariant
- OnOffEffectIdentifier
- PHYRateType
- RadioFaultType
- RoutingRole
- SaturationMoveMode
- SaturationStepMode
- SecurityType
- SetpointAdjustMode
- StartUpOnOffValue
- StatusCode
- StepMode
- TemperatureDisplayMode
- WiFiVersionType

0 comments on commit 1640620

Please sign in to comment.