Skip to content

Commit

Permalink
Round 2 of fixing Device Model XML (#12072)
Browse files Browse the repository at this point in the history
* Round 2 of fixing Device Model XML

Enable all documented clusters

+void MatterAclPluginServerInitCallback
+void MatterAlarmsPluginServerInitCallback
+void MatterLocalizationConfigurationPluginServerInitCallback
+void MatterLocalizationTimeFormatPluginServerInitCallback
+void MatterLocalizationUnitPluginServerInitCallback
+void MatterPollControlPluginServerInitCallback
+void MatterPowerConfigurationPluginServerInitCallback
+void MatterPowerProfilePluginServerInitCallback
+void MatterProxyConfigurationPluginServerInitCallback
+void MatterProxyDiscoveryPluginServerInitCallback
+void MatterProxyValidPluginServerInitCallback
+void MatterPulseWidthModulationPluginServerInitCallback
+void MatterTimePluginServerInitCallback
+void MatterTimeSynchronizationPluginServerInitCallback
+void MatterUserLabelPluginServerInitCallback

Also fixes a few random typos in the XML files.

* scripts/tools/zap_regen_all.py
find src examples -name "*.zap" | xargs perl -pi -e 's/"code": 61444,/"code": 63,/'
find src examples -name "*.zap" | xargs perl -pi -e 's/"code": 61440,/"code": 30,/'
  • Loading branch information
jonsmirl authored Dec 4, 2021
1 parent c68f199 commit ba69e73
Show file tree
Hide file tree
Showing 50 changed files with 2,677 additions and 1,640 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6789,7 +6789,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "client",
Expand Down Expand Up @@ -6832,7 +6832,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "server",
Expand All @@ -6858,7 +6858,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "client",
Expand All @@ -6884,7 +6884,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "server",
Expand Down Expand Up @@ -16722,7 +16722,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "client",
Expand Down Expand Up @@ -16765,7 +16765,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "server",
Expand All @@ -16791,7 +16791,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "client",
Expand All @@ -16817,7 +16817,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "server",
Expand Down
16 changes: 8 additions & 8 deletions examples/thermostat/thermostat-common/thermostat.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6315,7 +6315,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "client",
Expand Down Expand Up @@ -6358,7 +6358,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "server",
Expand All @@ -6384,7 +6384,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "client",
Expand All @@ -6410,7 +6410,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "server",
Expand Down Expand Up @@ -13718,7 +13718,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "client",
Expand Down Expand Up @@ -13761,7 +13761,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "server",
Expand All @@ -13787,7 +13787,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "client",
Expand All @@ -13813,7 +13813,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "server",
Expand Down
8 changes: 4 additions & 4 deletions examples/tv-app/tv-common/tv-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6300,7 +6300,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "client",
Expand Down Expand Up @@ -6343,7 +6343,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "server",
Expand All @@ -6369,7 +6369,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "client",
Expand All @@ -6395,7 +6395,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "server",
Expand Down
16 changes: 8 additions & 8 deletions examples/tv-casting-app/tv-casting-common/tv-casting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6315,7 +6315,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "client",
Expand Down Expand Up @@ -6358,7 +6358,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "server",
Expand All @@ -6384,7 +6384,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "client",
Expand All @@ -6410,7 +6410,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "server",
Expand Down Expand Up @@ -13594,7 +13594,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "client",
Expand Down Expand Up @@ -13637,7 +13637,7 @@
},
{
"name": "Binding",
"code": 61440,
"code": 30,
"mfgCode": null,
"define": "BINDING_CLUSTER",
"side": "server",
Expand All @@ -13663,7 +13663,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "client",
Expand All @@ -13689,7 +13689,7 @@
},
{
"name": "Group Key Management",
"code": 61444,
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "server",
Expand Down
4 changes: 2 additions & 2 deletions src/app/tests/suites/TestDescriptorCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ tests:
value: [
0x0003, # Identify
0x001D, # Descriptor
0x001E, # Binding
0x001F, # Access Control
0x0028, # Basic Information
0x0029, # OTA Software Update Provider
Expand All @@ -51,9 +52,8 @@ tests:
0x0037, # Ethernet Network Diagnostics
0x003C, # Administrator Commissioning
0x003E, # Operational Credentials
0x003F, # Group Key Management
0x0405, # Relative Humidity Measurement (why on EP0?)
0xF000, # Binding
0xF004, # Group Key Management
]

- label: "Read attribute Client list"
Expand Down
15 changes: 15 additions & 0 deletions src/app/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,21 @@ void MatterOnOffSwitchConfigurationPluginServerInitCallback() {}
void MatterPowerSourcePluginServerInitCallback() {}
void MatterThermostatUserInterfaceConfigurationPluginServerInitCallback() {}
void MatterBridgedDeviceBasicInformationPluginServerInitCallback() {}
void MatterPowerConfigurationPluginServerInitCallback() {}
void MatterPowerProfilePluginServerInitCallback() {}
void MatterPulseWidthModulationPluginServerInitCallback() {}
void MatterAlarmsPluginServerInitCallback() {}
void MatterTimePluginServerInitCallback() {}
void MatterAclPluginServerInitCallback() {}
void MatterPollControlPluginServerInitCallback() {}
void MatterLocalizationConfigurationPluginServerInitCallback() {}
void MatterLocalizationUnitPluginServerInitCallback() {}
void MatterLocalizationTimeFormatPluginServerInitCallback() {}
void MatterUserLabelPluginServerInitCallback() {}
void MatterTimeSynchronizationPluginServerInitCallback() {}
void MatterProxyValidPluginServerInitCallback() {}
void MatterProxyDiscoveryPluginServerInitCallback() {}
void MatterProxyConfigurationPluginServerInitCallback() {}

// ****************************************
// This function is called by the application when the stack goes down,
Expand Down
22 changes: 11 additions & 11 deletions src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<configurator>
<domain name="CHIP"/>
<domain name="CHIP" />
<cluster>
<domain>General</domain>
<name>Binding</name>
<code>0xF000</code>
<code>0x001e</code>
<define>BINDING_CLUSTER</define>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table.</description>
<command source="client" code="0x00" name="Bind" optional="false">
<description>Add a binding</description>
<arg name="nodeId" type="NODE_ID"/>
<arg name="groupId" type="GROUP_ID"/>
<arg name="endpointId" type="ENDPOINT_NO"/>
<arg name="clusterId" type="CLUSTER_ID"/>
<arg name="nodeId" type="NODE_ID" />
<arg name="groupId" type="GROUP_ID" />
<arg name="endpointId" type="ENDPOINT_NO" />
<arg name="clusterId" type="CLUSTER_ID" />
</command>
<command source="client" code="0x01" name="Unbind" optional="false">
<description>Remove a binding</description>
<arg name="nodeId" type="NODE_ID"/>
<arg name="groupId" type="GROUP_ID"/>
<arg name="endpointId" type="ENDPOINT_NO"/>
<arg name="clusterId" type="CLUSTER_ID"/>
<arg name="nodeId" type="NODE_ID" />
<arg name="groupId" type="GROUP_ID" />
<arg name="endpointId" type="ENDPOINT_NO" />
<arg name="clusterId" type="CLUSTER_ID" />
</command>
</cluster>
</configurator>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<configurator>
<domain name="CHIP"/>
<domain name="CHIP" />

<struct name="GroupState">
<cluster code="0xF004"/>
<item name="VendorId" type="INT16U"/>
<item name="VendorGroupId" type="INT16U"/>
<item name="GroupKeySetIndex" type="INT16U"/>
<cluster code="0x003F" />
<item name="VendorId" type="INT16U" />
<item name="VendorGroupId" type="INT16U" />
<item name="GroupKeySetIndex" type="INT16U" />
</struct>

<struct name="GroupKey">
<cluster code="0xF004"/>
<item name="VendorId" type="INT16U"/>
<item name="GroupKeyIndex" type="INT16U"/>
<item name="GroupKeyRoot" type="OCTET_STRING" length="16"/>
<item name="GroupKeyEpochStartTime" type="INT64U"/>
<item name="GroupKeySecurityPolicy" type="GroupKeySecurityPolicy"/>
<cluster code="0x003F" />
<item name="VendorId" type="INT16U" />
<item name="GroupKeyIndex" type="INT16U" />
<item name="GroupKeyRoot" type="OCTET_STRING" length="16" />
<item name="GroupKeyEpochStartTime" type="INT64U" />
<item name="GroupKeySecurityPolicy" type="GroupKeySecurityPolicy" />
</struct>

<enum name="GroupKeySecurityPolicy" type="ENUM8">
<cluster code="0xF004"/>
<item name="Standard" value="0x00"/>
<item name="LowLatency" value="0x01"/>
<cluster code="0x003F" />
<item name="Standard" value="0x00" />
<item name="LowLatency" value="0x01" />
</enum>

<cluster>
<domain>General</domain>
<name>Group Key Management</name>
<code>0xF004</code>
<code>0x003F</code>
<define>GROUP_KEY_MANAGEMENT_CLUSTER</define>
<description>The Group Key Management Cluster is the mechanism by which group keys are managed.</description>
<attribute side="server" code="0x0000" define="GROUPS" type="ARRAY" entryType="GroupState" length="254" writable="false" optional="false">groups</attribute>
<attribute side="server" code="0x0001" define="GROUPKEYS" type="ARRAY" entryType="GroupKey" length="254" writable="false" optional="false">group keys</attribute>
</cluster>
</configurator>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ limitations under the License.
<item name="CMOS" value="0x01"/>
<!-- RESERVED = 0x40 - 0xFE -->
</enum>
</configurator>LST
</configurator>
Loading

0 comments on commit ba69e73

Please sign in to comment.