Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XML of Meter Indentification cluster and generated files #33955

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml \
src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \
Expand Down
147 changes: 74 additions & 73 deletions data_model/master/clusters/MeterIdentification.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<!--
Copyright (C) Connectivity Standards Alliance (2021). All rights reserved.
Copyright (C) Connectivity Standards Alliance (2024). All rights reserved.

The information within this document is the property of the Connectivity
Standards Alliance and its use and disclosure are restricted, except as
expressly set forth herein.
Expand Down Expand Up @@ -56,75 +57,75 @@ Connectivity Standards Alliance
Davis, CA 95616, USA

:xrefstyle: short
-->
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0B06" name="Meter Identification Cluster" revision="1">
<revisionHistory>
<revision revision="1" summary="Initial version"/>
</revisionHistory>
<clusterIds>
<clusterId id="0x0B06" name="Meter Identification"/>
</clusterIds>
<classification hierarchy="base" role="application" picsCode="MTRID" scope="Endpoint"/>
<features>
<feature bit="0" code="PWRTHLD" name="PowerThreshold" summary="Supports information about power threshold">
<optionalConform/>
</feature>
</features>
<dataTypes>
<enum name="MeterTypeEnum">
<item value="0x00" name="Utility" summary="Utility Meter">
<mandatoryConform/>
</item>
<item value="0x01" name="Private" summary="Private Meter">
<mandatoryConform/>
</item>
<item value="0x02" name="Generic" summary="Generic Meter">
<mandatoryConform/>
</item>
</enum>
<enum name="PowerThresholdSourceEnum">
<item value="0x00" name="Contract" summary="The value comes from a signed contract">
<mandatoryConform/>
</item>
<item value="0x01" name="Regulator" summary="The value comes from a legal regulator">
<mandatoryConform/>
</item>
<item value="0x02" name="Equipment" summary="The value comes from a certified limits of the meter">
<mandatoryConform/>
</item>
</enum>
</dataTypes>
<attributes>
<attribute id="0x0000" name="MeterType" type="MeterTypeEnum" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform/>
</attribute>
<attribute id="0x0001" name="UtilityName" type="string" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform/>
<constraint type="maxLength" value="16"/>
</attribute>
<attribute id="0x0002" name="PointOfDelivery" type="string" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform/>
<constraint type="maxLength" value="16"/>
</attribute>
<attribute id="0x0003" name="PowerThreshold" type="power-mW" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform>
<feature name="PWRTHLD"/>
</mandatoryConform>
</attribute>
<attribute id="0x0004" name="PowerThresholdSource" type="PowerThresholdSourceEnum" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform>
<feature name="PWRTHLD"/>
</mandatoryConform>
</attribute>
</attributes>
-->
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0B06" name="Meter Identification Cluster" revision="1">
<revisionHistory>
<revision revision="1" summary="Initial version"/>
</revisionHistory>
<clusterIds>
<clusterId id="0x0B06" name="Meter Identification"/>
</clusterIds>
<classification hierarchy="base" role="application" picsCode="MTRID" scope="Endpoint"/>
<features>
<feature bit="0" code="PWRTHLD" name="PowerThreshold" summary="Supports information about power threshold">
<optionalConform/>
</feature>
</features>
<dataTypes>
<enum name="MeterTypeEnum">
<item value="0x00" name="Utility" summary="Utility Meter">
<mandatoryConform/>
</item>
<item value="0x01" name="Private" summary="Private Meter">
<mandatoryConform/>
</item>
<item value="0x02" name="Generic" summary="Generic Meter">
<mandatoryConform/>
</item>
</enum>
<enum name="PowerThresholdSourceEnum">
<item value="0x00" name="Contract" summary="The value comes from a signed contract">
<mandatoryConform/>
</item>
<item value="0x01" name="Regulator" summary="The value comes from a legal regulator">
<mandatoryConform/>
</item>
<item value="0x02" name="Equipment" summary="The value comes from a certified limits of the meter">
<mandatoryConform/>
</item>
</enum>
</dataTypes>
<attributes>
<attribute id="0x0000" name="MeterType" type="MeterTypeEnum" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform/>
</attribute>
<attribute id="0x0001" name="UtilityName" type="string" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform/>
<constraint type="maxLength" value="16"/>
</attribute>
<attribute id="0x0002" name="PointOfDelivery" type="string" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform/>
<constraint type="maxLength" value="16"/>
</attribute>
<attribute id="0x0003" name="PowerThreshold" type="power-mW" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform>
<feature name="PWRTHLD"/>
</mandatoryConform>
</attribute>
<attribute id="0x0004" name="PowerThresholdSource" type="PowerThresholdSourceEnum" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform>
<feature name="PWRTHLD"/>
</mandatoryConform>
</attribute>
</attributes>
</cluster>
1 change: 1 addition & 0 deletions docs/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Generally regenerate using one of:
| 1296 | 0x510 | ContentAppObserver |
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
| 2822 | 0xB06 | MeterIdentification |
| 4294048773 | 0xFFF1FC05 | UnitTesting |
| 4294048774 | 0xFFF1FC06 | FaultInjection |
| 4294048800 | 0xFFF1FC20 | SampleMei |
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml";
load "../src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2024 Project CHIP Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configurator>
<domain name="Energy Management"/>
<enum name="MeterTypeEnum" type="enum8">
<cluster code="0x0B06"/>
<item name="Utility" value="0x00"/>
<item name="Private" value="0x01"/>
<item name="Generic" value="0x02"/>
</enum>

<enum name="PowerThresholdSourceEnum" type="enum8">
<cluster code="0x0B06"/>
<item name="Contract" value="0x00"/>
<item name="Regulator" value="0x01"/>
<item name="Equipment" value="0x02"/>
</enum>

<cluster>
<domain>Energy Management</domain>
<name>Meter Identification</name>
<code>0x0B06</code>
<define>METER_IDENTIFICATION_CLUSTER</define>
<description>Attributes for determining advanced information about utility metering device</description>
<client init="false" tick="false">true</client>
<features>
<feature bit="0" code="PWRTHLD" name="PowerThreshold" summary="Supports information about power threshold">
<optionalConform/>
</feature>
</features>
<server init="false" tick="false">true</server>
<globalAttribute code="0xFFFD" side="either" value="1"/>
<attribute code="0x0000" side="server" define="METER_TYPE" type="MeterTypeEnum" isNullable="true" min="0x00" max="0x02">MeterType</attribute>
<attribute code="0x0001" side="server" define="UTILITY_NAME" type="char_string" isNullable="true" length="16">UtilityName</attribute>
<attribute code="0x0002" side="server" define="POINT_OF_DELIVERY" type="char_string" isNullable="true" length="16">PointOfDelivery</attribute>
<attribute code="0x0003" side="server" define="POWER_THRESHOLD" type="power_mw" isNullable="true" optional="true">PowerThreshold</attribute>
<attribute code="0x0004" side="server" define="POWER_THRESHOLD_SOURCE" type="PowerThresholdSourceEnum" isNullable="true" min="0x00" max="0x02" optional="true">PowerThresholdSource</attribute>
</cluster>
</configurator>
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"dishwasher-alarm-cluster.xml",
"dishwasher-mode-cluster.xml",
"drlc-cluster.xml",
"meter-identification-cluster.xml",
"microwave-oven-mode-cluster.xml",
"microwave-oven-control-cluster.xml",
"door-lock-cluster.xml",
Expand Down
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"diagnostic-logs-cluster.xml",
"dishwasher-alarm-cluster.xml",
"dishwasher-mode-cluster.xml",
"meter-identification-cluster.xml",
"microwave-oven-mode-cluster.xml",
"door-lock-cluster.xml",
"drlc-cluster.xml",
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"DIAGNOSTIC_LOGS_CLUSTER": [],
"DISHWASHER_ALARM_CLUSTER": [],
"DISHWASHER_MODE_CLUSTER": [],
"METER_IDENTIFICATION_CLUSTER": [],
"MICROWAVE_OVEN_MODE_CLUSTER": [],
"DOOR_LOCK_CLUSTER": [],
"ECOSYSTEM_INFORMATION_CLUSTER": [],
Expand Down Expand Up @@ -219,6 +220,7 @@
"MEDIA_PLAYBACK_CLUSTER": ["media-playback-server"],
"MICROWAVE_OVEN_CONTROL_CLUSTER": ["microwave-oven-control-server"],
"MESSAGES_CLUSTER": ["messages-server"],
"METER_IDENTIFICATION_CLUSTER": [],
"MODE_SELECT_CLUSTER": ["mode-select-server"],
"NETWORK_COMMISSIONING_CLUSTER": ["network-commissioning"],
"NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [
Expand Down
33 changes: 33 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -9493,6 +9493,39 @@ provisional cluster CommissionerControl = 1873 {
command access(invoke: manage) CommissionNode(CommissionNodeRequest): ReverseOpenCommissioningWindow = 1;
}

/** Attributes for determining advanced information about utility metering device */
cluster MeterIdentification = 2822 {
revision 1;

enum MeterTypeEnum : enum8 {
kUtility = 0;
kPrivate = 1;
kGeneric = 2;
}

enum PowerThresholdSourceEnum : enum8 {
kContract = 0;
kRegulator = 1;
kEquipment = 2;
}

bitmap Feature : bitmap32 {
kPowerThreshold = 0x1;
}

readonly attribute nullable MeterTypeEnum meterType = 0;
readonly attribute nullable char_string<16> utilityName = 1;
readonly attribute nullable char_string<16> pointOfDelivery = 2;
readonly attribute optional nullable power_mw powerThreshold = 3;
readonly attribute optional nullable PowerThresholdSourceEnum powerThresholdSource = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

/** The Test Cluster is meant to validate the generated code */
internal cluster UnitTesting = 4294048773 {
revision 1; // NOTE: Default/not specifically set
Expand Down
Loading
Loading