Skip to content

Commit 16f265d

Browse files
committed
Initial XML for Power Topology cluster
1 parent 59c40cd commit 16f265d

File tree

7 files changed

+50
-4
lines changed

7 files changed

+50
-4
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ jobs:
153153
src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml \
154154
src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml \
155155
src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml \
156+
src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml \
156157
src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \
157158
src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \
158159
src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml \

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster
6666
load "../src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml";
6767
load "../src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml";
6868
load "../src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml";
69+
load "../src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml";
6970
load "../src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml";
7071
load "../src/app/zap-templates/zcl/data-model/chip/proxy-configuration-cluster.xml";
7172
load "../src/app/zap-templates/zcl/data-model/chip/proxy-discovery-cluster.xml";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2024 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+
<configurator>
18+
<domain name="Measurement &amp; Sensing"/>
19+
<bitmap name="Feature" type="bitmap32">
20+
<cluster code="0x009C"/>
21+
<field name="NodeTopology" mask="0x01"/>
22+
<field name="LeafTopology" mask="0x02"/>
23+
<field name="SetTopology" mask="0x04"/>
24+
<field name="DynamicPowerFlow" mask="0x08"/>
25+
</bitmap>
26+
<cluster code="0x009C">
27+
<domain>Measurement &amp; Sensing</domain>
28+
<name>Power Topology</name>
29+
<code>0x009C</code>
30+
<define>POWER_TOPOLOGY_CLUSTER</define>
31+
<description>The Power Topology Cluster provides a mechanism for expressing how power is flowing between endpoints.</description>
32+
<client init="false" tick="false">true</client>
33+
<server init="false" tick="false">true</server>
34+
<globalAttribute code="0xFFFD" side="either" value="1"/>
35+
<attribute code="0x0000" side="server" define="AVAILABLE_ENDPOINTS" type="array" entryType="endpoint_no" length="20" optional="true">AvailableEndpoints</attribute>
36+
<attribute code="0x0001" side="server" define="ACTIVE_ENDPOINTS" type="array" entryType="endpoint_no" length="20" optional="true">ActiveEndpoints</attribute>
37+
</cluster>
38+
</configurator>

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"operational-state-oven-cluster.xml",
8686
"operational-state-rvc-cluster.xml",
8787
"oven-mode-cluster.xml",
88+
"power-topology-cluster.xml",
8889
"pressure-measurement-cluster.xml",
8990
"power-source-cluster.xml",
9091
"power-source-configuration-cluster.xml",
@@ -621,4 +622,4 @@
621622
"indexFieldName": "FabricIndex",
622623
"indexType": "fabric_idx"
623624
}
624-
}
625+
}

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"operational-state-oven-cluster.xml",
8383
"operational-state-rvc-cluster.xml",
8484
"oven-mode-cluster.xml",
85+
"power-topology-cluster.xml",
8586
"pressure-measurement-cluster.xml",
8687
"power-source-cluster.xml",
8788
"power-source-configuration-cluster.xml",
@@ -619,4 +620,4 @@
619620
"indexFieldName": "FabricIndex",
620621
"indexType": "fabric_idx"
621622
}
622-
}
623+
}

src/app/zap_cluster_list.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"MICROWAVE_OVEN_CONTROL_CLUSTER": [],
6767
"MODE_SELECT_CLUSTER": [],
6868
"NETWORK_COMMISSIONING_CLUSTER": [],
69+
"POWER_TOPOLOGY_CLUSTER": [],
6970
"SAMPLE_MEI_CLUSTER": [],
7071
"NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
7172
"OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"],
@@ -221,6 +222,7 @@
221222
"SAMPLE_MEI_CLUSTER": ["sample-mei-server"],
222223
"OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"],
223224
"ON_OFF_CLUSTER": ["on-off-server"],
225+
"POWER_TOPOLOGY_CLUSTER": [],
224226
"ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [],
225227
"OPERATIONAL_CREDENTIALS_CLUSTER": ["operational-credentials-server"],
226228
"OPERATIONAL_STATE_CLUSTER": ["operational-state-server"],
@@ -301,4 +303,4 @@
301303
"WINDOW_COVERING_CLUSTER": ["window-covering-server"],
302304
"ZLL_COMMISSIONING_CLUSTER": []
303305
}
304-
}
306+
}

src/controller/data_model/BUILD.gn

+3-1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ if (current_os == "android" || matter_enable_java_compilation) {
208208
"jni/PowerSourceClient-ReadImpl.cpp",
209209
"jni/PowerSourceConfigurationClient-InvokeSubscribeImpl.cpp",
210210
"jni/PowerSourceConfigurationClient-ReadImpl.cpp",
211+
"jni/PowerTopologyClient-InvokeSubscribeImpl.cpp",
212+
"jni/PowerTopologyClient-ReadImpl.cpp",
211213
"jni/PressureMeasurementClient-InvokeSubscribeImpl.cpp",
212214
"jni/PressureMeasurementClient-ReadImpl.cpp",
213215
"jni/ProxyConfigurationClient-InvokeSubscribeImpl.cpp",
@@ -280,7 +282,7 @@ if (current_os == "android" || matter_enable_java_compilation) {
280282
"jni/WiFiNetworkDiagnosticsClient-ReadImpl.cpp",
281283
"jni/WindowCoveringClient-InvokeSubscribeImpl.cpp",
282284
"jni/WindowCoveringClient-ReadImpl.cpp",
283-
]
285+
]
284286

285287
deps = [
286288
":data_model",

0 commit comments

Comments
 (0)