Skip to content

Commit

Permalink
Update the specification XML docs to the latest spec (#29967)
Browse files Browse the repository at this point in the history
* Added a readme about usage of the scraper

* Make sure the scraper does not change file paths after chroot changes

* Fix the cwd in a better way

* Full re-scrape

* Restyle

* spelling fix

* Another typo update

---------

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Dec 22, 2023
1 parent a781ea4 commit 942822f
Show file tree
Hide file tree
Showing 59 changed files with 5,701 additions and 291 deletions.
27 changes: 27 additions & 0 deletions data_model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Contents

This folder contains a machine-readable representation of matter clusters.

The XML files inside `clusters` are generated by a `scraper` script out of the
original specification `AsciiDoc` files.

## How to update

The matter specification is not currently public. As such, as script exists to
update the spec XML files, however this is not done automatically.

You will require access to the following tools locally:

- `scraper`. A binary copy generally available
[here](https://github.com/csa-data-model/projects/tree/main/DM-Editor/bin/1.2.0/scrape)
- Specification repository checkout from
https://github.com/CHIP-Specifications/connectedhomeip-spec

Example usage:

```sh
./scripts/spec_xml/generate_spec_xml.py \
--scraper ~/Downloads/scrape-adoc-linux \
--spec-root ~/work/connectedhomeip-spec \
--output-dir data_model
```
8 changes: 4 additions & 4 deletions data_model/clusters/AccountLogin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ Davis, CA 95616, USA
<classification hierarchy="base" role="application" picsCode="ALOGIN" scope="Endpoint"/>
<commands>
<command id="0x00" name="GetSetupPIN" response="GetSetupPINResponse">
<access invokePrivilege="admin" timed="true"/>
<access invokePrivilege="admin" fabricScoped="true" timed="true"/>
<mandatoryConform/>
<field id="0" name="TempAccountIdentifier" type="string">
<mandatoryConform/>
<constraint type="lengthBetween" from="16" to="100"/>
</field>
</command>
<command id="0x01" name="GetSetupPINResponse" direction="responseFromServer">
<access invokePrivilege="operate"/>
<access invokePrivilege="operate" fabricScoped="true"/>
<mandatoryConform/>
<field id="0" name="SetupPIN" type="string">
<quality nullable="true"/>
Expand All @@ -79,7 +79,7 @@ Davis, CA 95616, USA
</field>
</command>
<command id="0x02" name="Login" response="Y">
<access invokePrivilege="admin" timed="true"/>
<access invokePrivilege="admin" fabricScoped="true" timed="true"/>
<mandatoryConform/>
<field id="0" name="TempAccountIdentifier" type="string">
<mandatoryConform/>
Expand All @@ -91,7 +91,7 @@ Davis, CA 95616, USA
</field>
</command>
<command id="0x03" name="Logout" response="Y">
<access invokePrivilege="operate" timed="true"/>
<access invokePrivilege="operate" fabricScoped="true" timed="true"/>
<mandatoryConform/>
</command>
</commands>
Expand Down
15 changes: 14 additions & 1 deletion data_model/clusters/BasicInformationCluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ Connectivity Standards Alliance
508 Second Street, Suite 206
Davis, CA 95616, USA
-->
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0028" name="Basic Information" revision="2">
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0028" name="Basic Information" revision="3">
<revisionHistory>
<revision revision="1" summary="Initial Release"/>
<revision revision="2" summary="Added ProductAppearance attribute"/>
<revision revision="3" summary="Added SpecificationVersion and MaxPathsPerInvoke attributes"/>
</revisionHistory>
<classification hierarchy="base" role="utility" picsCode="BINFO" scope="Node"/>
<dataTypes>
Expand Down Expand Up @@ -287,6 +288,18 @@ Davis, CA 95616, USA
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
<optionalConform/>
</attribute>
<attribute id="0x0015" name="SpecificationVersion" type="uint32" default="0">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
<mandatoryConform/>
<constraint type="desc"/>
</attribute>
<attribute id="0x0016" name="MaxPathsPerInvoke" type="uint16" default="1">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
<mandatoryConform/>
<constraint type="min" value="1"/>
</attribute>
</attributes>
<events>
<event id="0x00" name="StartUp" priority="critical">
Expand Down
184 changes: 184 additions & 0 deletions data_model/clusters/BooleanSensorConfiguration.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
<?xml version="1.0"?>
<!--
Copyright (C) Connectivity Standards Alliance (2021). 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.
Connectivity Standards Alliance hereby grants you a fully-paid, non-exclusive,
nontransferable, worldwide, limited and revocable license (without the right to
sublicense), under Connectivity Standards Alliance's applicable copyright
rights, to view, download, save, reproduce and use the document solely for your
own internal purposes and in accordance with the terms of the license set forth
herein. This license does not authorize you to, and you expressly warrant that
you shall not: (a) permit others (outside your organization) to use this
document; (b) post or publish this document; (c) modify, adapt, translate, or
otherwise change this document in any manner or create any derivative work
based on this document; (d) remove or modify any notice or label on this
document, including this Copyright Notice, License and Disclaimer. The
Connectivity Standards Alliance does not grant you any license hereunder other
than as expressly stated herein.
Elements of this document may be subject to third party intellectual property
rights, including without limitation, patent, copyright or trademark rights,
and any such third party may or may not be a member of the Connectivity
Standards Alliance. Connectivity Standards Alliance members grant other
Connectivity Standards Alliance members certain intellectual property rights as
set forth in the Connectivity Standards Alliance IPR Policy. Connectivity
Standards Alliance members do not grant you any rights under this license. The
Connectivity Standards Alliance is not responsible for, and shall not be held
responsible in any manner for, identifying or failing to identify any or all
such third party intellectual property rights. Please visit www.csa-iot.org for
more information on how to become a member of the Connectivity Standards
Alliance.
This document and the information contained herein are provided on an “AS IS”
basis and the Connectivity Standards Alliance DISCLAIMS ALL WARRANTIES EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO (A) ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OF THIRD PARTIES (INCLUDING
WITHOUT LIMITATION ANY INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENT, COPYRIGHT
OR TRADEMARK RIGHTS); OR (B) ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, TITLE OR NONINFRINGEMENT. IN NO EVENT WILL THE
CONNECTIVITY STANDARDS ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF
BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR ANY OTHER
DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
DAMAGES OF ANY KIND, IN CONTRACT OR IN TORT, IN CONNECTION WITH THIS DOCUMENT
OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
LOSS OR DAMAGE.
All company, brand and product names in this document may be trademarks that
are the sole property of their respective owners.
This notice and disclaimer must be included on all copies of this document.
Connectivity Standards Alliance
508 Second Street, Suite 206
Davis, CA 95616, USA
-->
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0080" name="Boolean Sensor Configuration" revision="1">
<revisionHistory>
<revision revision="1" summary="Initial Release"/>
</revisionHistory>
<classification hierarchy="base" role="application" picsCode="BSENCFG" scope="Endpoint"/>
<features>
<feature bit="0" code="VIS" name="Visual" summary="Supports visual alarms">
<optionalConform/>
</feature>
<feature bit="1" code="AUD" name="Audible" summary="Supports audible alarms">
<optionalConform/>
</feature>
<feature bit="2" code="SPRS" name="AlarmSuppress" summary="Supports ability to suppress or acknowledge alarms">
<optionalConform/>
</feature>
<feature bit="3" code="SENSLVL" name="SensitivityLevel" summary="Supports ability to set level of threshold detection sensitivity">
<optionalConform/>
</feature>
</features>
<dataTypes>
<enum name="SensitivityEnum">
<item value="0" name="High" summary="High sensitivity">
<mandatoryConform>
<feature name="SENSLVL"/>
</mandatoryConform>
</item>
<item value="1" name="Standard" summary="Standard Sensitivity">
<mandatoryConform>
<feature name="SENSLVL"/>
</mandatoryConform>
</item>
<item value="2" name="Low" summary="Low sensitivity">
<mandatoryConform>
<feature name="SENSLVL"/>
</mandatoryConform>
</item>
</enum>
<bitmap name="AlarmModeBitmap">
<bitfield name="Visual" bit="0" summary="Visual alarming">
<mandatoryConform>
<feature name="VIS"/>
</mandatoryConform>
</bitfield>
<bitfield name="Audible" bit="1" summary="Audible alarming">
<mandatoryConform>
<feature name="AUD"/>
</mandatoryConform>
</bitfield>
</bitmap>
</dataTypes>
<attributes>
<attribute id="0x0000" name="SensitivityLevel" type="SensitivityEnum" default="Standard">
<access read="true" write="true" readPrivilege="view" writePrivilege="operate"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="nonVolatile" reportable="false"/>
<mandatoryConform>
<feature name="SENSLVL"/>
</mandatoryConform>
</attribute>
<attribute id="0x0001" name="AlarmsActive" type="AlarmModeBitmap">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="nonVolatile" reportable="false"/>
<mandatoryConform>
<orTerm>
<feature name="VIS"/>
<feature name="AUD"/>
</orTerm>
</mandatoryConform>
</attribute>
<attribute id="0x0002" name="AlarmsSuppressed" type="AlarmModeBitmap">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="nonVolatile" reportable="false"/>
<mandatoryConform>
<andTerm>
<orTerm>
<feature name="VIS"/>
<feature name="AUD"/>
</orTerm>
<feature name="SPRS"/>
</andTerm>
</mandatoryConform>
</attribute>
<attribute id="0x0003" name="AlarmsEnabled" type="AlarmModeBitmap">
<access read="true" write="true" readPrivilege="view" writePrivilege="operate"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="nonVolatile" reportable="false"/>
<mandatoryConform>
<orTerm>
<feature name="VIS"/>
<feature name="AUD"/>
</orTerm>
</mandatoryConform>
</attribute>
</attributes>
<commands>
<command id="0x00" name="SuppressRequest" response="Y">
<access invokePrivilege="operate"/>
<mandatoryConform>
<feature name="SPRS"/>
</mandatoryConform>
<field id="0" name="AlarmsToSuppress" type="AlarmModeBitmap">
<mandatoryConform/>
</field>
</command>
</commands>
<events>
<event id="0x00" name="AlarmsStateChanged" priority="info">
<access readPrivilege="view"/>
<mandatoryConform>
<orTerm>
<feature name="VIS"/>
<feature name="AUD"/>
</orTerm>
</mandatoryConform>
<field id="0" name="AlarmsActive" type="AlarmModeBitmap">
<mandatoryConform/>
</field>
<field id="1" name="AlarmsSuppressed" type="AlarmModeBitmap">
<mandatoryConform>
<feature name="SPRS"/>
</mandatoryConform>
</field>
</event>
<event id="0x01" name="SensorFault" priority="info">
<access readPrivilege="view"/>
<optionalConform/>
</event>
</events>
</cluster>
98 changes: 98 additions & 0 deletions data_model/clusters/ContentAppObserver.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0"?>
<!--
Copyright (C) Connectivity Standards Alliance (2021). 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.
Connectivity Standards Alliance hereby grants you a fully-paid, non-exclusive,
nontransferable, worldwide, limited and revocable license (without the right to
sublicense), under Connectivity Standards Alliance's applicable copyright
rights, to view, download, save, reproduce and use the document solely for your
own internal purposes and in accordance with the terms of the license set forth
herein. This license does not authorize you to, and you expressly warrant that
you shall not: (a) permit others (outside your organization) to use this
document; (b) post or publish this document; (c) modify, adapt, translate, or
otherwise change this document in any manner or create any derivative work
based on this document; (d) remove or modify any notice or label on this
document, including this Copyright Notice, License and Disclaimer. The
Connectivity Standards Alliance does not grant you any license hereunder other
than as expressly stated herein.
Elements of this document may be subject to third party intellectual property
rights, including without limitation, patent, copyright or trademark rights,
and any such third party may or may not be a member of the Connectivity
Standards Alliance. Connectivity Standards Alliance members grant other
Connectivity Standards Alliance members certain intellectual property rights as
set forth in the Connectivity Standards Alliance IPR Policy. Connectivity
Standards Alliance members do not grant you any rights under this license. The
Connectivity Standards Alliance is not responsible for, and shall not be held
responsible in any manner for, identifying or failing to identify any or all
such third party intellectual property rights. Please visit www.csa-iot.org for
more information on how to become a member of the Connectivity Standards
Alliance.
This document and the information contained herein are provided on an “AS IS”
basis and the Connectivity Standards Alliance DISCLAIMS ALL WARRANTIES EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO (A) ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OF THIRD PARTIES (INCLUDING
WITHOUT LIMITATION ANY INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENT, COPYRIGHT
OR TRADEMARK RIGHTS); OR (B) ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, TITLE OR NONINFRINGEMENT. IN NO EVENT WILL THE
CONNECTIVITY STANDARDS ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF
BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR ANY OTHER
DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
DAMAGES OF ANY KIND, IN CONTRACT OR IN TORT, IN CONNECTION WITH THIS DOCUMENT
OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
LOSS OR DAMAGE.
All company, brand and product names in this document may be trademarks that
are the sole property of their respective owners.
This notice and disclaimer must be included on all copies of this document.
Connectivity Standards Alliance
508 Second Street, Suite 206
Davis, CA 95616, USA
-->
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0510" name="Content App Observer" revision="1">
<revisionHistory>
<revision revision="1" summary="Initial Release"/>
</revisionHistory>
<classification hierarchy="base" role="application" picsCode="CONTENTAPPOBSERVER" scope="Endpoint"/>
<dataTypes>
<enum name="StatusEnum">
<item value="0" name="Success" summary="Command succeeded">
<mandatoryConform/>
</item>
<item value="1" name="UnexpectedData" summary="Data field in command was not understood by the Observer">
<mandatoryConform/>
</item>
</enum>
</dataTypes>
<commands>
<command id="0x00" name="ContentAppMessage" response="ContentAppMessageResponse">
<access invokePrivilege="operate"/>
<mandatoryConform/>
<field id="0" name="Data" type="string">
<mandatoryConform/>
</field>
<field id="1" name="EncodingHint" type="string">
<optionalConform/>
</field>
</command>
<command id="0x01" name="ContentAppMessageResponse" direction="responseFromServer">
<access invokePrivilege="operate"/>
<mandatoryConform/>
<field id="0" name="Status" type="StatusEnum">
<mandatoryConform/>
</field>
<field id="1" name="Data" type="string">
<optionalConform/>
</field>
<field id="2" name="EncodingHint" type="string">
<optionalConform/>
</field>
</command>
</commands>
</cluster>
Loading

0 comments on commit 942822f

Please sign in to comment.