Skip to content

Commit

Permalink
Add xml definition for service area cluster (project-chip#33752)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and austina-csa committed Jul 10, 2024
1 parent a1df0fe commit fdebcf9
Show file tree
Hide file tree
Showing 61 changed files with 11,401 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Generally regenerate using one of:
| 257 | 0x101 | DoorLock |
| 258 | 0x102 | WindowCovering |
| 259 | 0x103 | BarrierControl |
| 336 | 0x150 | ServiceArea |
| 512 | 0x200 | PumpConfigurationAndControl |
| 513 | 0x201 | Thermostat |
| 514 | 0x202 | FanControl |
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-
load "../src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/scene.xml";
load "../src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml";
Expand Down
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/data-model/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<xi:include href="chip/replacable-monitoring-cluster.xml.xml" />
<xi:include href="chip/resource-monitoring-cluster.xml" />
<xi:include href="chip/scene.xml" />
<xi:include href="chip/service-area-cluster.xml" />
<xi:include href="chip/smoke-co-alarm-cluster.xml" />
<xi:include href="chip/software-diagnostics-cluster.xml" />
<xi:include href="chip/switch-cluster.xml" />
Expand Down
130 changes: 130 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2023-24 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="CHIP"/>

Data types
<struct name="LocationInfoStruct">
<cluster code="0x0150"/>
<item name="LocationInfo" type="HomeLocationStruct" optional="false" isNullable="true"/>
<item name="LandmarkTag" type="LandmarkTag" optional="false" isNullable="true"/>
<item name="PositionTag" type="PositionTag" optional="false" isNullable="true"/>
<item name="SurfaceTag" type="FloorSurfaceTag" optional="false" isNullable="true"/>
</struct>

<struct name="MapStruct">
<cluster code="0x0150"/>
<item name="MapID" type="int8u" optional="false"/>
<item name="Name" type="char_string" length="64" optional="false"/>
</struct>

<struct name="LocationStruct">
<cluster code="0x0150"/>
<item name="LocationID" type="int32u" optional="false" isNullable="false"/>
<item name="MapID" type="int8u" optional="false" isNullable="true"/>
<item name="LocationInfo" type="LocationInfoStruct" optional="false" isNullable="false"/>
</struct>

<enum name="OperationalStatusEnum" type="enum8">
<cluster code="0x0150"/>
<item value="0x00" name="Pending"/>
<item value="0x01" name="Operating"/>
<item value="0x02" name="Skipped"/>
<item value="0x03" name="Completed"/>
</enum>

<struct name="ProgressStruct">
<cluster code="0x0150"/>
<item name="LocationID" type="int32u" optional="false"/>
<item name="Status" type="OperationalStatusEnum" optional="false"/>
<item name="TotalOperationalTime" type="elapsed_s" optional="true" isNullable="true"/>
<item name="EstimatedTime" type="elapsed_s" optional="true" isNullable="true"/>
</struct>

<enum name="SelectLocationsStatus" type="enum8">
<cluster code="0x0150"/>
<item value="0x00" name="Success"/>
<item value="0x01" name="UnsupportedLocation"/>
<item value="0x02" name="DuplicatedLocations"/>
<item value="0x03" name="InvalidInMode"/>
<item value="0x04" name="InvalidSet"/>
</enum>

<enum name="SkipCurrentLocationStatus" type="enum8">
<cluster code="0x0150"/>
<item value="0x00" name="Success"/>
<item value="0x01" name="InvalidLocationList"/>
<item value="0x02" name="InvalidInMode"/>
</enum>

<cluster>
<domain>General</domain>
<name>Service Area</name>
<description>The Service Area cluster provides an interface for controlling the locations where a device should operate, and for querying the current location.</description>
<code>0x0150</code>
<define>SERVICE_AREA_CLUSTER</define>

<features>
<feature bit="0" code="LISTORDER" name="ListOrder" summary="The device operates at the selected locations in the list order">
<optionalConform/>
</feature>
<feature bit="1" code="SELRUN" name="SelectWhileRunning" summary="The device allows changing the selected locations while running">
<optionalConform/>
</feature>
</features>

<!-- Attributes -->
<attribute side="server" code="0x0000" define="SupportedLocations" type="array" entryType="LocationStruct" writable="false" isNullable="false" optional="false">SupportedLocations</attribute>
<attribute side="server" code="0x0001" define="SupportedMaps" type="array" entryType="MapStruct" writable="false" isNullable="true" optional="false">SupportedMaps</attribute>
<attribute side="server" code="0x0002" define="SelectedLocations" type="array" entryType="int32u" writable="false" isNullable="true" optional="false">SelectedLocations</attribute>
<attribute side="server" code="0x0003" define="CurrentLocation" type="int32u" writable="false" isNullable="true" optional="true">CurrentLocation</attribute>
<attribute side="server" code="0x0004" define="EstimatedEndTime" type="epoch_s" writable="false" isNullable="true" optional="true" >EstimatedEndTime</attribute>
<attribute side="server" code="0x0005" define="Progress" type="array" entryType="ProgressStruct" writable="false" isNullable="true" optional="true">Progress</attribute>

<!-- Commands -->
<command source="client" code="0x00" name="SelectLocations" response="SelectLocationsResponse" optional="false">
<description>
Command used to select a set of device locations, where the device is to operate
</description>
<arg name="NewLocations" type="int32u" array="true" isNullable="true"/>
</command>

<command source="server" code="0x01" name="SelectLocationsResponse" disableDefaultResponse="true" optional="false">
<description>
This command is sent by the device on receipt of the SelectLocations command.
</description>
<arg name="Status" type="SelectLocationsStatus" optional="false"/>
<arg name="StatusText" type="char_string" length="256" optional="true"/>
</command>

<command source="client" code="0x02" name="SkipCurrentLocation" response="SkipCurrentLocationResponse" optional="true">
<description>
This command is used to skip the current location where the device operates.
</description>
</command>

<command source="server" code="0x03" name="SkipCurrentLocationResponse" disableDefaultResponse="true" optional="true">
<description>
This command is sent by the device on receipt of the SelectLocations command.
</description>
<arg name="Status" type="SkipCurrentLocationStatus" optional="false"/>
<arg name="StatusText" type="char_string" length="256" optional="true"/>
</command>

</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 @@ -108,6 +108,7 @@
"rvc-run-mode-cluster.xml",
"resource-monitoring-cluster.xml",
"scene.xml",
"service-area-cluster.xml",
"smoke-co-alarm-cluster.xml",
"software-diagnostics-cluster.xml",
"switch-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 @@ -105,6 +105,7 @@
"replacable-monitoring-cluster.xml",
"resource-monitoring-cluster.xml",
"scene.xml",
"service-area-cluster.xml",
"smoke-co-alarm-cluster.xml",
"software-diagnostics-cluster.xml",
"switch-cluster.xml",
Expand Down
Loading

0 comments on commit fdebcf9

Please sign in to comment.