Skip to content

Commit ce71ed5

Browse files
hicklinjohnfierke
andauthored
Add xml definition for service area cluster (#33752)
* Add definitions for common HomeLocationStruct and types - see connectedhomeip-spec PR 8933 * Add definition for Service Area Cluster - see connectedhomeip-spec PR 8937 * Add semantic tag definitions needed for Service Area Cluster - see connectedhomeip-spec PR 8937 * Update Service Area Cluster definition of LocationInfoStruct - see connectedhomeip-spec PR 8937 * Rename SurfaceTag to FloorSurfaceTag - spec PR 8937 commit 431739b3e3996d0ef74a36b2a6b93ac0d3db9c45 * Fix Carport typo, remove IsGroundFloor field (spec change) * Update home location definitions per spec PR 8933 commit f04958166412d5b7eff4d3443273f47f12f22baf 2024-05-23 * update generated files * Update Service Area Cluster definitions per spec PR 8937 up to commit 6bf3762eb1ee733c642e79074744d1185b82a89c 2024-05-24 * update generated files * Regenerated zap files after merge. * Moved the AreaTypeTag namespace definition to namespaces.xml. * Moved the HomeLoc global struct into global-sturcts.xml. * Updated the AreaTypeTag namespace to match the latest spec definition. * Updated the AreaTypeTag namespace to match the latest spec definition. * Updated the matterlint rules with the changes in the xml files. * Reverted changes to the rvc zap file. * Addded global xml files to relevant lists of xmls. * Added the Position, Landmark and Floor Surface Namespaces. * Removed namespace tag definitions from the service area cluters XML. * Regenerated zap files. * Explicitly set the conformance. * Fixed typos in the service-area clusters XML from review. * Used a more feature rich method for defining the cluster's features. * Reordered data-type definitions to match the order in the spec. * Regenerated zap files. * Added github issue to a comment. * Renamed namespaces.xml to semantic-tag-namespace-enums.xml. * Missed some rename locations. --------- Co-authored-by: jfierke@irobot.com <jfierke@irobot.com>
1 parent 2186357 commit ce71ed5

File tree

61 files changed

+11401
-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.

61 files changed

+11401
-0
lines changed

docs/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Generally regenerate using one of:
9090
| 257 | 0x101 | DoorLock |
9191
| 258 | 0x102 | WindowCovering |
9292
| 259 | 0x103 | BarrierControl |
93+
| 336 | 0x150 | ServiceArea |
9394
| 512 | 0x200 | PumpConfigurationAndControl |
9495
| 513 | 0x201 | Thermostat |
9596
| 514 | 0x202 | FanControl |

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-
8181
load "../src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml";
8282
load "../src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml";
8383
load "../src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml";
84+
load "../src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml";
8485
load "../src/app/zap-templates/zcl/data-model/chip/scene.xml";
8586
load "../src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml";
8687
load "../src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml";

src/app/zap-templates/zcl/data-model/all.xml

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<xi:include href="chip/replacable-monitoring-cluster.xml.xml" />
8888
<xi:include href="chip/resource-monitoring-cluster.xml" />
8989
<xi:include href="chip/scene.xml" />
90+
<xi:include href="chip/service-area-cluster.xml" />
9091
<xi:include href="chip/smoke-co-alarm-cluster.xml" />
9192
<xi:include href="chip/software-diagnostics-cluster.xml" />
9293
<xi:include href="chip/switch-cluster.xml" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2023-24 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="CHIP"/>
19+
20+
Data types
21+
<struct name="LocationInfoStruct">
22+
<cluster code="0x0150"/>
23+
<item name="LocationInfo" type="HomeLocationStruct" optional="false" isNullable="true"/>
24+
<item name="LandmarkTag" type="LandmarkTag" optional="false" isNullable="true"/>
25+
<item name="PositionTag" type="PositionTag" optional="false" isNullable="true"/>
26+
<item name="SurfaceTag" type="FloorSurfaceTag" optional="false" isNullable="true"/>
27+
</struct>
28+
29+
<struct name="MapStruct">
30+
<cluster code="0x0150"/>
31+
<item name="MapID" type="int8u" optional="false"/>
32+
<item name="Name" type="char_string" length="64" optional="false"/>
33+
</struct>
34+
35+
<struct name="LocationStruct">
36+
<cluster code="0x0150"/>
37+
<item name="LocationID" type="int32u" optional="false" isNullable="false"/>
38+
<item name="MapID" type="int8u" optional="false" isNullable="true"/>
39+
<item name="LocationInfo" type="LocationInfoStruct" optional="false" isNullable="false"/>
40+
</struct>
41+
42+
<enum name="OperationalStatusEnum" type="enum8">
43+
<cluster code="0x0150"/>
44+
<item value="0x00" name="Pending"/>
45+
<item value="0x01" name="Operating"/>
46+
<item value="0x02" name="Skipped"/>
47+
<item value="0x03" name="Completed"/>
48+
</enum>
49+
50+
<struct name="ProgressStruct">
51+
<cluster code="0x0150"/>
52+
<item name="LocationID" type="int32u" optional="false"/>
53+
<item name="Status" type="OperationalStatusEnum" optional="false"/>
54+
<item name="TotalOperationalTime" type="elapsed_s" optional="true" isNullable="true"/>
55+
<item name="EstimatedTime" type="elapsed_s" optional="true" isNullable="true"/>
56+
</struct>
57+
58+
<enum name="SelectLocationsStatus" type="enum8">
59+
<cluster code="0x0150"/>
60+
<item value="0x00" name="Success"/>
61+
<item value="0x01" name="UnsupportedLocation"/>
62+
<item value="0x02" name="DuplicatedLocations"/>
63+
<item value="0x03" name="InvalidInMode"/>
64+
<item value="0x04" name="InvalidSet"/>
65+
</enum>
66+
67+
<enum name="SkipCurrentLocationStatus" type="enum8">
68+
<cluster code="0x0150"/>
69+
<item value="0x00" name="Success"/>
70+
<item value="0x01" name="InvalidLocationList"/>
71+
<item value="0x02" name="InvalidInMode"/>
72+
</enum>
73+
74+
<cluster>
75+
<domain>General</domain>
76+
<name>Service Area</name>
77+
<description>The Service Area cluster provides an interface for controlling the locations where a device should operate, and for querying the current location.</description>
78+
<code>0x0150</code>
79+
<define>SERVICE_AREA_CLUSTER</define>
80+
81+
<features>
82+
<feature bit="0" code="LISTORDER" name="ListOrder" summary="The device operates at the selected locations in the list order">
83+
<optionalConform/>
84+
</feature>
85+
<feature bit="1" code="SELRUN" name="SelectWhileRunning" summary="The device allows changing the selected locations while running">
86+
<optionalConform/>
87+
</feature>
88+
</features>
89+
90+
<!-- Attributes -->
91+
<attribute side="server" code="0x0000" define="SupportedLocations" type="array" entryType="LocationStruct" writable="false" isNullable="false" optional="false">SupportedLocations</attribute>
92+
<attribute side="server" code="0x0001" define="SupportedMaps" type="array" entryType="MapStruct" writable="false" isNullable="true" optional="false">SupportedMaps</attribute>
93+
<attribute side="server" code="0x0002" define="SelectedLocations" type="array" entryType="int32u" writable="false" isNullable="true" optional="false">SelectedLocations</attribute>
94+
<attribute side="server" code="0x0003" define="CurrentLocation" type="int32u" writable="false" isNullable="true" optional="true">CurrentLocation</attribute>
95+
<attribute side="server" code="0x0004" define="EstimatedEndTime" type="epoch_s" writable="false" isNullable="true" optional="true" >EstimatedEndTime</attribute>
96+
<attribute side="server" code="0x0005" define="Progress" type="array" entryType="ProgressStruct" writable="false" isNullable="true" optional="true">Progress</attribute>
97+
98+
<!-- Commands -->
99+
<command source="client" code="0x00" name="SelectLocations" response="SelectLocationsResponse" optional="false">
100+
<description>
101+
Command used to select a set of device locations, where the device is to operate
102+
</description>
103+
<arg name="NewLocations" type="int32u" array="true" isNullable="true"/>
104+
</command>
105+
106+
<command source="server" code="0x01" name="SelectLocationsResponse" disableDefaultResponse="true" optional="false">
107+
<description>
108+
This command is sent by the device on receipt of the SelectLocations command.
109+
</description>
110+
<arg name="Status" type="SelectLocationsStatus" optional="false"/>
111+
<arg name="StatusText" type="char_string" length="256" optional="true"/>
112+
</command>
113+
114+
<command source="client" code="0x02" name="SkipCurrentLocation" response="SkipCurrentLocationResponse" optional="true">
115+
<description>
116+
This command is used to skip the current location where the device operates.
117+
</description>
118+
</command>
119+
120+
<command source="server" code="0x03" name="SkipCurrentLocationResponse" disableDefaultResponse="true" optional="true">
121+
<description>
122+
This command is sent by the device on receipt of the SelectLocations command.
123+
</description>
124+
<arg name="Status" type="SkipCurrentLocationStatus" optional="false"/>
125+
<arg name="StatusText" type="char_string" length="256" optional="true"/>
126+
</command>
127+
128+
</cluster>
129+
130+
</configurator>

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

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"rvc-run-mode-cluster.xml",
109109
"resource-monitoring-cluster.xml",
110110
"scene.xml",
111+
"service-area-cluster.xml",
111112
"smoke-co-alarm-cluster.xml",
112113
"software-diagnostics-cluster.xml",
113114
"switch-cluster.xml",

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

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
"replacable-monitoring-cluster.xml",
106106
"resource-monitoring-cluster.xml",
107107
"scene.xml",
108+
"service-area-cluster.xml",
108109
"smoke-co-alarm-cluster.xml",
109110
"software-diagnostics-cluster.xml",
110111
"switch-cluster.xml",

0 commit comments

Comments
 (0)