Skip to content

Commit

Permalink
Be consistent about how we handle cluster names in config-data.yaml.
Browse files Browse the repository at this point in the history
Use the cluster name as it appears in the XML.

Fixes project-chip#29186
  • Loading branch information
bzbarsky-apple committed Sep 12, 2023
1 parent 4442906 commit 15e8841
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
24 changes: 11 additions & 13 deletions src/app/common/templates/config-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,18 @@ CommandHandlerInterfaceOnlyClusters:
# List of clusters that are implemented entirely with
# CommandHandlerInterface and hence do not need generated command dispatch.
# This uses asUpperCamelCase versions of the cluster name.
- NetworkCommissioning
- Network Commissioning
- Scenes
- RvcRunMode
- RvcCleanMode
- DishwasherMode
- LaundryWasherMode
- RefrigeratorAndTemperatureControlledCabinetMode
- OperationalState
- ActivatedCarbonFilterMonitoring
- HepaFilterMonitoring
- RvcOperationalState
# cluster format should match ClustersWithInitFunctions et al
# See https://github.com/project-chip/connectedhomeip/issues/29186
- SampleMei
- RVC Run Mode
- RVC Clean Mode
- Dishwasher Mode
- Laundry Washer Mode
- Refrigerator And Temperature Controlled Cabinet Mode
- Operational State
- Activated Carbon Filter Monitoring
- HEPA Filter Monitoring
- RVC Operational State
- Sample MEI

# We need a more configurable way of deciding which clusters have which init functions....
# See https://github.com/project-chip/connectedhomeip/issues/4369
Expand Down
2 changes: 1 addition & 1 deletion src/app/zap-templates/templates/app/callback.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void emberAf{{asUpperCamelCase label}}ClusterClientTickCallback(chip::EndpointId
{{#zcl_clusters}}
{{#zcl_commands}}
{{#if (isClient source)}}
{{#unless (isInConfigList (asUpperCamelCase parent.name) "CommandHandlerInterfaceOnlyClusters")}}
{{#unless (isInConfigList parent.name "CommandHandlerInterfaceOnlyClusters")}}
/**
* @brief {{parent.name}} Cluster {{name}} Command callback (from {{source}})
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace app {
namespace Clusters {

{{#all_user_clusters_with_incoming_commands}}
{{#unless (isInConfigList (asUpperCamelCase clusterName) "CommandHandlerInterfaceOnlyClusters")}}
{{#unless (isInConfigList clusterName "CommandHandlerInterfaceOnlyClusters")}}
{{#if (isServer clusterSide)}}
namespace {{asUpperCamelCase clusterName}} {

Expand Down Expand Up @@ -71,7 +71,7 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV:
switch (aCommandPath.mClusterId)
{
{{#all_user_clusters_with_incoming_commands}}
{{#unless (isInConfigList (asUpperCamelCase clusterName) "CommandHandlerInterfaceOnlyClusters")}}
{{#unless (isInConfigList clusterName "CommandHandlerInterfaceOnlyClusters")}}
{{#if (isServer clusterSide)}}
case Clusters::{{asUpperCamelCase clusterName}}::Id:
Clusters::{{asUpperCamelCase clusterName}}::DispatchServerCommand(apCommandObj, aCommandPath, aReader);
Expand Down

0 comments on commit 15e8841

Please sign in to comment.