Skip to content

Commit

Permalink
Add XML definition for Ecosystem Information Cluster (project-chip#34291
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tehampson authored Jul 26, 2024
1 parent f53e2f9 commit 9421127
Show file tree
Hide file tree
Showing 60 changed files with 7,391 additions and 489 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ jobs:
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 \
src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \
Expand Down
1 change: 1 addition & 0 deletions docs/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Generally regenerate using one of:
| 1294 | 0x50E | AccountLogin |
| 1295 | 0x50F | ContentControl |
| 1296 | 0x510 | ContentAppObserver |
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
| 2820 | 0xB04 | ElectricalMeasurement |
| 4294048773 | 0xFFF1FC05 | UnitTesting |
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.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";
load "../src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/ethernet-network-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 @@ -34,6 +34,7 @@
<xi:include href="chip/microwave-oven-mode-cluster.xml" />
<xi:include href="chip/microwave-oven-control-cluster.xml" />
<xi:include href="chip/door-lock-cluster.xml" />
<xi:include href="chip/ecosystem-information-cluster.xml" />
<xi:include href="chip/energy-evse-cluster.xml" />
<xi:include href="chip/energy-evse-mode-cluster.xml" />
<xi:include href="chip/energy-preference-cluster.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ limitations under the License.

<struct name="DeviceTypeStruct">
<cluster code="0x001d"/>
<cluster code="0x0750"/>
<item name="DeviceType" type="devtype_id"/>
<item name="Revision" type="int16u"/>
</struct>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?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="CHIP"/>
<struct name="EcosystemDeviceStruct" isFabricScoped="true" apiMaturity="provisional">
<cluster code="0x0750"/>
<item fieldId="0" name="DeviceName" type="char_string" optional="true" isFabricSensitive="true" length="64"/>
<item fieldId="1" name="DeviceNameLastEdit" type="epoch_us" optional="true" isFabricSensitive="true" default="0"/>
<item fieldId="2" name="BridgedEndpoint" type="endpoint_no" isFabricSensitive="true"/>
<item fieldId="3" name="OriginalEndpoint" type="endpoint_no" isFabricSensitive="true"/>
<item fieldId="4" name="DeviceTypes" array="true" type="DeviceTypeStruct" isFabricSensitive="true" minLength="1"/>
<item fieldId="5" name="UniqueLocationIDs" array="true" type="char_string" length="64" isFabricSensitive="true"/>
<item fieldId="6" name="UniqueLocationIDsLastEdit" type="epoch_us" isFabricSensitive="true" default="0"/>
</struct>

<struct name="EcosystemLocationStruct" isFabricScoped="true" apiMaturity="provisional">
<cluster code="0x0750"/>
<item fieldId="0" name="UniqueLocationID" type="char_string" isFabricSensitive="true" length="64"/>
<item fieldId="1" name="LocationDescriptor" type="HomeLocationStruct" isFabricSensitive="true"/>
<item fieldId="2" name="LocationDescriptorLastEdit" type="epoch_us" isFabricSensitive="true" default="0"/>
</struct>

<cluster apiMaturity="provisional">
<domain>General</domain>
<name>Ecosystem Information</name>
<code>0x0750</code>
<define>ECOSYSTEM_INFORMATION_CLUSTER</define>
<description>Provides extended device information for all the logical devices represented by a Bridged Node.</description>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<!-- cluster revision -->
<globalAttribute code="0xFFFD" side="either" value="1"/>
<attribute code="0x0000" side="server" define="REMOVED_ON" type="epoch_us" isNullable="true" optional="true">
<description>RemovedOn</description>
<access op="read" privilege="manage"/>
</attribute>
<attribute code="0x0001" side="server" define="DEVICE_DIRECTORY" type="array" entryType="EcosystemDeviceStruct" length="256" minLength="1">
<description>DeviceDirectory</description>
<access op="read" privilege="manage"/>
</attribute>
<attribute code="0x0002" side="server" define="LOCATION_DIRECTORY" type="array" entryType="EcosystemLocationStruct" length="64" minLength="1">
<description>LocationDirectory</description>
<access op="read" privilege="manage"/>
</attribute>
</cluster>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ TODO: Make these structures global rather than defining them for each cluster.
<domain name="CHIP"/>
<struct name="HomeLocationStruct">
<cluster code="0x0150"/> <!-- Service Area Cluster -->
<cluster code="0x0750"/> <!-- Ecosystem Information Cluster -->
<!-- TODO: add Basic Information Cluster code="0x0028" -->

<item fieldId="0" name="LocationName" type="char_string" length="128" isNullable="false" optional="false"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ TODO: Make these namespace enums global rather than defining them for each clust

<enum name="AreaTypeTag" type="enum8">
<cluster code="0x0150"/> <!-- Service Area Cluster -->
<cluster code="0x0750"/> <!-- Ecosystem Information Cluster -->
<!-- TODO: add Basic Information Cluster code="0x0028" -->

<item value="0x00" name="Aisle"/>
Expand Down
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 @@ -48,6 +48,7 @@
"microwave-oven-mode-cluster.xml",
"microwave-oven-control-cluster.xml",
"door-lock-cluster.xml",
"ecosystem-information-cluster.xml",
"energy-preference-cluster.xml",
"electrical-energy-measurement-cluster.xml",
"electrical-measurement-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 @@ -46,6 +46,7 @@
"microwave-oven-mode-cluster.xml",
"door-lock-cluster.xml",
"drlc-cluster.xml",
"ecosystem-information-cluster.xml",
"electrical-energy-measurement-cluster.xml",
"electrical-measurement-cluster.xml",
"electrical-power-measurement-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 @@ -37,6 +37,7 @@
"DISHWASHER_MODE_CLUSTER": [],
"MICROWAVE_OVEN_MODE_CLUSTER": [],
"DOOR_LOCK_CLUSTER": [],
"ECOSYSTEM_INFORMATION_CLUSTER": [],
"ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER": [],
"ELECTRICAL_MEASUREMENT_CLUSTER": [],
"ELECTRICAL_POWER_MEASUREMENT_CLUSTER": [],
Expand Down Expand Up @@ -185,6 +186,7 @@
"DISHWASHER_MODE_CLUSTER": ["mode-base-server"],
"MICROWAVE_OVEN_MODE_CLUSTER": ["mode-base-server"],
"DOOR_LOCK_CLUSTER": ["door-lock-server"],
"ECOSYSTEM_INFORMATION_CLUSTER": [],
"ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER": [
"electrical-energy-measurement-server"
],
Expand Down
142 changes: 142 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -9245,6 +9245,148 @@ provisional cluster ContentAppObserver = 1296 {
command ContentAppMessage(ContentAppMessageRequest): ContentAppMessageResponse = 0;
}

/** Provides extended device information for all the logical devices represented by a Bridged Node. */
provisional cluster EcosystemInformation = 1872 {
revision 1;

enum AreaTypeTag : enum8 {
kAisle = 0;
kAttic = 1;
kBackDoor = 2;
kBackYard = 3;
kBalcony = 4;
kBallroom = 5;
kBathroom = 6;
kBedroom = 7;
kBorder = 8;
kBoxroom = 9;
kBreakfastRoom = 10;
kCarport = 11;
kCellar = 12;
kCloakroom = 13;
kCloset = 14;
kConservatory = 15;
kCorridor = 16;
kCraftRoom = 17;
kCupboard = 18;
kDeck = 19;
kDen = 20;
kDining = 21;
kDrawingRoom = 22;
kDressingRoom = 23;
kDriveway = 24;
kElevator = 25;
kEnsuite = 26;
kEntrance = 27;
kEntryway = 28;
kFamilyRoom = 29;
kFoyer = 30;
kFrontDoor = 31;
kFrontYard = 32;
kGameRoom = 33;
kGarage = 34;
kGarageDoor = 35;
kGarden = 36;
kGardenDoor = 37;
kGuestBathroom = 38;
kGuestBedroom = 39;
kGuestRestroom = 40;
kGuestRoom = 41;
kGym = 42;
kHallway = 43;
kHearthRoom = 44;
kKidsRoom = 45;
kKidsBedroom = 46;
kKitchen = 47;
kLarder = 48;
kLaundryRoom = 49;
kLawn = 50;
kLibrary = 51;
kLivingRoom = 52;
kLounge = 53;
kMediaTVRoom = 54;
kMudRoom = 55;
kMusicRoom = 56;
kNursery = 57;
kOffice = 58;
kOutdoorKitchen = 59;
kOutside = 60;
kPantry = 61;
kParkingLot = 62;
kParlor = 63;
kPatio = 64;
kPlayRoom = 65;
kPoolRoom = 66;
kPorch = 67;
kPrimaryBathroom = 68;
kPrimaryBedroom = 69;
kRamp = 70;
kReceptionRoom = 71;
kRecreationRoom = 72;
kRestroom = 73;
kRoof = 74;
kSauna = 75;
kScullery = 76;
kSewingRoom = 77;
kShed = 78;
kSideDoor = 79;
kSideYard = 80;
kSittingRoom = 81;
kSnug = 82;
kSpa = 83;
kStaircase = 84;
kSteamRoom = 85;
kStorageRoom = 86;
kStudio = 87;
kStudy = 88;
kSunRoom = 89;
kSwimmingPool = 90;
kTerrace = 91;
kUtilityRoom = 92;
kWard = 93;
kWorkshop = 94;
}

struct HomeLocationStruct {
char_string<128> locationName = 0;
nullable int16s floorNumber = 1;
nullable AreaTypeTag areaType = 2;
}

fabric_scoped struct EcosystemLocationStruct {
fabric_sensitive char_string<64> uniqueLocationID = 0;
fabric_sensitive HomeLocationStruct locationDescriptor = 1;
fabric_sensitive epoch_us locationDescriptorLastEdit = 2;
fabric_idx fabricIndex = 254;
}

struct DeviceTypeStruct {
devtype_id deviceType = 0;
int16u revision = 1;
}

fabric_scoped struct EcosystemDeviceStruct {
optional fabric_sensitive char_string<64> deviceName = 0;
optional fabric_sensitive epoch_us deviceNameLastEdit = 1;
fabric_sensitive endpoint_no bridgedEndpoint = 2;
fabric_sensitive endpoint_no originalEndpoint = 3;
fabric_sensitive DeviceTypeStruct deviceTypes[] = 4;
fabric_sensitive char_string uniqueLocationIDs[] = 5;
fabric_sensitive epoch_us uniqueLocationIDsLastEdit = 6;
fabric_idx fabricIndex = 254;
}

readonly attribute access(read: manage) optional nullable epoch_us removedOn = 0;
readonly attribute access(read: manage) EcosystemDeviceStruct deviceDirectory[] = 1;
readonly attribute access(read: manage) EcosystemLocationStruct locationDirectory[] = 2;
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;
}

/** Supports the ability for clients to request the commissioning of themselves or other nodes onto a fabric which the cluster server can commission onto. */
provisional cluster CommissionerControl = 1873 {
revision 1;
Expand Down
Loading

0 comments on commit 9421127

Please sign in to comment.