Skip to content

Commit 60fbe1f

Browse files
committed
zap generated files for Meter Identification cluster
1 parent 22a979c commit 60fbe1f

File tree

53 files changed

+5941
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+5941
-0
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ jobs:
9797
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
9898
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
9999
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \
100+
src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml \
100101
src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml \
101102
src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \
102103
src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \

docs/ids_and_codes/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Generally regenerate using one of:
141141
| 1873 | 0x751 | CommissionerControl |
142142
| 2049 | 0x801 | TlsCertificateManagement |
143143
| 2050 | 0x802 | TlsClientManagement |
144+
| 2822 | 0xB06 | MeterIdentification |
144145
| 4294048773 | 0xFFF1FC05 | UnitTesting |
145146
| 4294048774 | 0xFFF1FC06 | FaultInjection |
146147
| 4294048800 | 0xFFF1FC20 | SampleMei |

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml";
3535
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml";
3636
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml";
3737
load "../src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml";
38+
load "../src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml";
3839
load "../src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml";
3940
load "../src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml";
4041
load "../src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml";

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
151151
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
152152
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
153+
#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
153154
#define MATTER_DM_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (1)
154155
#define MATTER_DM_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (1)
155156
#define MATTER_DM_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -283,6 +284,7 @@
283284
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
284285
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
285286
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
287+
#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
286288
#define MATTER_DM_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
287289
#define MATTER_DM_FAULT_INJECTION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
288290
#define MATTER_DM_SAMPLE_MEI_CLUSTER_CLIENT_ENDPOINT_COUNT (0)

scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
151151
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
152152
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
153+
#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
153154
#define MATTER_DM_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
154155
#define MATTER_DM_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
155156
#define MATTER_DM_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -283,6 +284,7 @@
283284
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
284285
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
285286
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
287+
#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
286288
#define MATTER_DM_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
287289
#define MATTER_DM_FAULT_INJECTION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
288290
#define MATTER_DM_SAMPLE_MEI_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2025 Project CHIP Authors
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<!--
18+
XML generated by Alchemy; DO NOT EDIT.
19+
Source: src/app_clusters/MeterIdentification.adoc
20+
Parameters:
21+
Git:
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
24+
<domain name="General"/>
25+
<enum name="MeterTypeEnum" type="enum8">
26+
<cluster code="0x0B06"/>
27+
<item name="Utility" value="0x00"/>
28+
<item name="Private" value="0x01"/>
29+
<item name="Generic" value="0x02"/>
30+
</enum>
31+
32+
<enum name="PowerThresholdSourceEnum" type="enum8">
33+
<cluster code="0x0B06"/>
34+
<item name="Contract" value="0x00"/>
35+
<item name="Regulator" value="0x01"/>
36+
<item name="Equipment" value="0x02"/>
37+
</enum>
38+
39+
<struct name="PowerThresholdStruct" apiMaturity="provisional">
40+
<cluster code="0x0B06"/>
41+
<item fieldId="0" name="PowerThreshold" type="int64s" optional="true"/>
42+
<item fieldId="1" name="ApparentPowerThreshold" type="int64s" optional="true"/>
43+
<item fieldId="2" name="PowerThresholdSource" type="PowerThresholdSourceEnum" isNullable="true" min="0x00" max="0x02"/>
44+
</struct>
45+
46+
<cluster apiMaturity="provisional">
47+
<domain>General</domain>
48+
<name>Meter Identification</name>
49+
<code>0x0B06</code>
50+
<define>METER_IDENTIFICATION_CLUSTER</define>
51+
<description>This field SHALL indicate the Power Threshold Information.</description>
52+
<client init="false" tick="false">true</client>
53+
<server init="false" tick="false">true</server>
54+
<globalAttribute code="0xFFFD" side="either" value="1"/>
55+
<attribute code="0x0000" side="server" define="METER_TYPE" type="MeterTypeEnum" isNullable="true" min="0x00" max="0x02">MeterType</attribute>
56+
<attribute code="0x0001" side="server" define="POINT_OF_DELIVERY" type="char_string" isNullable="true" length="64">PointOfDelivery</attribute>
57+
<attribute code="0x0002" side="server" define="METER_SERIAL_NUMBER" type="char_string" isNullable="true" length="64">MeterSerialNumber</attribute>
58+
<attribute code="0x0003" side="server" define="PROTOCOL_VERSION" type="char_string" isNullable="true" length="64" optional="true">
59+
<description>ProtocolVersion</description>
60+
<optionalConform/>
61+
</attribute>
62+
<attribute code="0x0004" side="server" define="POWER_THRESHOLD" type="PowerThresholdStruct" isNullable="true" optional="true">
63+
<description>PowerThreshold</description>
64+
<mandatoryConform>
65+
<feature name="PWRTHLD"/>
66+
</mandatoryConform>
67+
</attribute>
68+
<features>
69+
<feature bit="0" code="PWRTHLD" name="PowerThreshold" summary="Supports information about power threshold">
70+
<optionalConform/>
71+
</feature>
72+
</features>
73+
</cluster>
74+
</configurator>

src/app/zap-templates/zcl/zcl-with-test-extensions.json

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"dishwasher-alarm-cluster.xml",
4848
"dishwasher-mode-cluster.xml",
4949
"drlc-cluster.xml",
50+
"meter-identification-cluster.xml",
5051
"microwave-oven-mode-cluster.xml",
5152
"microwave-oven-control-cluster.xml",
5253
"door-lock-cluster.xml",
@@ -679,6 +680,7 @@
679680
"FeatureMap",
680681
"ClusterRevision"
681682
],
683+
"Meter Identification": ["PowerThreshold"],
682684
"Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
683685
"Wi-Fi Network Management": ["SSID", "PassphraseSurrogate"],
684686
"Thread Network Directory": [

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

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"diagnostic-logs-cluster.xml",
4242
"dishwasher-alarm-cluster.xml",
4343
"dishwasher-mode-cluster.xml",
44+
"meter-identification-cluster.xml",
4445
"microwave-oven-mode-cluster.xml",
4546
"door-lock-cluster.xml",
4647
"drlc-cluster.xml",
@@ -673,6 +674,7 @@
673674
"FeatureMap",
674675
"ClusterRevision"
675676
],
677+
"Meter Identification": ["PowerThreshold"],
676678
"Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
677679
"Wi-Fi Network Management": ["SSID", "PassphraseSurrogate"],
678680
"Thread Network Directory": [

src/app/zap_cluster_list.json

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"DIAGNOSTIC_LOGS_CLUSTER": [],
3838
"DISHWASHER_ALARM_CLUSTER": [],
3939
"DISHWASHER_MODE_CLUSTER": [],
40+
"METER_IDENTIFICATION_CLUSTER": [],
4041
"MICROWAVE_OVEN_MODE_CLUSTER": [],
4142
"DOOR_LOCK_CLUSTER": [],
4243
"ECOSYSTEM_INFORMATION_CLUSTER": [],
@@ -194,6 +195,7 @@
194195
"DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"],
195196
"DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"],
196197
"DISHWASHER_MODE_CLUSTER": ["mode-base-server"],
198+
"METER_IDENTIFICATION_CLUSTER": ["meter-identification-server"],
197199
"MICROWAVE_OVEN_MODE_CLUSTER": ["mode-base-server"],
198200
"DOOR_LOCK_CLUSTER": ["door-lock-server"],
199201
"ECOSYSTEM_INFORMATION_CLUSTER": ["ecosystem-information-server"],

src/controller/data_model/controller-clusters.matter

+39
Original file line numberDiff line numberDiff line change
@@ -10751,6 +10751,45 @@ provisional cluster TlsClientManagement = 2050 {
1075110751
fabric command access(invoke: administer) RemoveEndpoint(RemoveEndpointRequest): DefaultSuccess = 4;
1075210752
}
1075310753

10754+
/** This field SHALL indicate the Power Threshold Information. */
10755+
provisional cluster MeterIdentification = 2822 {
10756+
revision 1;
10757+
10758+
enum MeterTypeEnum : enum8 {
10759+
kUtility = 0;
10760+
kPrivate = 1;
10761+
kGeneric = 2;
10762+
}
10763+
10764+
enum PowerThresholdSourceEnum : enum8 {
10765+
kContract = 0;
10766+
kRegulator = 1;
10767+
kEquipment = 2;
10768+
}
10769+
10770+
bitmap Feature : bitmap32 {
10771+
kPowerThreshold = 0x1;
10772+
}
10773+
10774+
struct PowerThresholdStruct {
10775+
optional int64s powerThreshold = 0;
10776+
optional int64s apparentPowerThreshold = 1;
10777+
nullable PowerThresholdSourceEnum powerThresholdSource = 2;
10778+
}
10779+
10780+
readonly attribute nullable MeterTypeEnum meterType = 0;
10781+
readonly attribute nullable char_string<64> pointOfDelivery = 1;
10782+
readonly attribute nullable char_string<64> meterSerialNumber = 2;
10783+
readonly attribute optional nullable char_string<64> protocolVersion = 3;
10784+
readonly attribute optional nullable PowerThresholdStruct powerThreshold = 4;
10785+
readonly attribute command_id generatedCommandList[] = 65528;
10786+
readonly attribute command_id acceptedCommandList[] = 65529;
10787+
readonly attribute event_id eventList[] = 65530;
10788+
readonly attribute attrib_id attributeList[] = 65531;
10789+
readonly attribute bitmap32 featureMap = 65532;
10790+
readonly attribute int16u clusterRevision = 65533;
10791+
}
10792+
1075410793
/** The Test Cluster is meant to validate the generated code */
1075510794
internal cluster UnitTesting = 4294048773 {
1075610795
revision 1; // NOTE: Default/not specifically set

0 commit comments

Comments
 (0)