Skip to content

Commit f8626ec

Browse files
committed
Implement cluster inheritance, map fields and handle poor cluster definition consistency
1 parent 0da2fd0 commit f8626ec

29 files changed

+4254
-48
lines changed

Generator/ClusterGenerator.cs

Lines changed: 78 additions & 33 deletions
Large diffs are not rendered by default.

Generator/Clusters/ColorControl.xml

Lines changed: 1028 additions & 0 deletions
Large diffs are not rendered by default.

Generator/Clusters/Groups.xml

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (C) Connectivity Standards Alliance (2021). All rights reserved.
4+
The information within this document is the property of the Connectivity
5+
Standards Alliance and its use and disclosure are restricted, except as
6+
expressly set forth herein.
7+
8+
Connectivity Standards Alliance hereby grants you a fully-paid, non-exclusive,
9+
nontransferable, worldwide, limited and revocable license (without the right to
10+
sublicense), under Connectivity Standards Alliance's applicable copyright
11+
rights, to view, download, save, reproduce and use the document solely for your
12+
own internal purposes and in accordance with the terms of the license set forth
13+
herein. This license does not authorize you to, and you expressly warrant that
14+
you shall not: (a) permit others (outside your organization) to use this
15+
document; (b) post or publish this document; (c) modify, adapt, translate, or
16+
otherwise change this document in any manner or create any derivative work
17+
based on this document; (d) remove or modify any notice or label on this
18+
document, including this Copyright Notice, License and Disclaimer. The
19+
Connectivity Standards Alliance does not grant you any license hereunder other
20+
than as expressly stated herein.
21+
22+
Elements of this document may be subject to third party intellectual property
23+
rights, including without limitation, patent, copyright or trademark rights,
24+
and any such third party may or may not be a member of the Connectivity
25+
Standards Alliance. Connectivity Standards Alliance members grant other
26+
Connectivity Standards Alliance members certain intellectual property rights as
27+
set forth in the Connectivity Standards Alliance IPR Policy. Connectivity
28+
Standards Alliance members do not grant you any rights under this license. The
29+
Connectivity Standards Alliance is not responsible for, and shall not be held
30+
responsible in any manner for, identifying or failing to identify any or all
31+
such third party intellectual property rights. Please visit www.csa-iot.org for
32+
more information on how to become a member of the Connectivity Standards
33+
Alliance.
34+
35+
This document and the information contained herein are provided on an “AS IS”
36+
basis and the Connectivity Standards Alliance DISCLAIMS ALL WARRANTIES EXPRESS
37+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO (A) ANY WARRANTY THAT THE USE OF THE
38+
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OF THIRD PARTIES (INCLUDING
39+
WITHOUT LIMITATION ANY INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENT, COPYRIGHT
40+
OR TRADEMARK RIGHTS); OR (B) ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
41+
FOR A PARTICULAR PURPOSE, TITLE OR NONINFRINGEMENT. IN NO EVENT WILL THE
42+
CONNECTIVITY STANDARDS ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF
43+
BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR ANY OTHER
44+
DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
45+
DAMAGES OF ANY KIND, IN CONTRACT OR IN TORT, IN CONNECTION WITH THIS DOCUMENT
46+
OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
47+
LOSS OR DAMAGE.
48+
49+
All company, brand and product names in this document may be trademarks that
50+
are the sole property of their respective owners.
51+
52+
This notice and disclaimer must be included on all copies of this document.
53+
54+
Connectivity Standards Alliance
55+
508 Second Street, Suite 206
56+
Davis, CA 95616, USA
57+
58+
:xrefstyle: basic
59+
-->
60+
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0004" name="Groups Cluster" revision="4">
61+
<revisionHistory>
62+
<revision revision="1" summary="Global mandatory ClusterRevision attribute added; CCB 1745 2100"/>
63+
<revision revision="2" summary="CCB 2289"/>
64+
<revision revision="3" summary="CCB 2310 2704"/>
65+
<revision revision="4" summary="New data model format and notation"/>
66+
</revisionHistory>
67+
<clusterIds>
68+
<clusterId id="0x0004" name="Groups"/>
69+
</clusterIds>
70+
<classification hierarchy="base" role="utility" picsCode="G" scope="Endpoint"/>
71+
<features>
72+
<feature bit="0" code="GN" name="GroupNames" summary="The ability to store a name for a group.">
73+
<optionalConform/>
74+
</feature>
75+
</features>
76+
<dataTypes>
77+
<bitmap name="NameSupportBitmap">
78+
<bitfield name="GroupNames" bit="7" summary="The ability to store a name for a group.">
79+
<mandatoryConform/>
80+
</bitfield>
81+
</bitmap>
82+
</dataTypes>
83+
<attributes>
84+
<attribute id="0x0000" name="NameSupport" type="NameSupportBitmap" default="0">
85+
<access read="true" readPrivilege="view"/>
86+
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false" sourceAttribution="false" quieterReporting="false"/>
87+
<mandatoryConform/>
88+
<constraint type="desc"/>
89+
</attribute>
90+
</attributes>
91+
<commands>
92+
<command id="0x00" name="AddGroup" direction="commandToServer" response="AddGroupResponse">
93+
<access invokePrivilege="manage" fabricScoped="true"/>
94+
<mandatoryConform/>
95+
<field id="0" name="GroupID" type="group-id">
96+
<mandatoryConform/>
97+
<constraint type="min" value="1"/>
98+
</field>
99+
<field id="1" name="GroupName" type="string">
100+
<mandatoryConform/>
101+
<constraint type="maxLength" value="16"/>
102+
</field>
103+
</command>
104+
<command id="0x00" name="AddGroupResponse" direction="responseFromServer">
105+
<mandatoryConform/>
106+
<field id="0" name="Status" type="enum8">
107+
<mandatoryConform/>
108+
<constraint type="desc"/>
109+
</field>
110+
<field id="1" name="GroupID" type="group-id">
111+
<mandatoryConform/>
112+
<constraint type="min" value="1"/>
113+
</field>
114+
</command>
115+
<command id="0x01" name="ViewGroup" direction="commandToServer" response="ViewGroupResponse">
116+
<access invokePrivilege="operate" fabricScoped="true"/>
117+
<mandatoryConform/>
118+
<field id="0" name="GroupID" type="group-id">
119+
<mandatoryConform/>
120+
<constraint type="min" value="1"/>
121+
</field>
122+
</command>
123+
<command id="0x01" name="ViewGroupResponse" direction="responseFromServer">
124+
<mandatoryConform/>
125+
<field id="0" name="Status" type="enum8">
126+
<mandatoryConform/>
127+
<constraint type="desc"/>
128+
</field>
129+
<field id="1" name="GroupID" type="group-id">
130+
<mandatoryConform/>
131+
<constraint type="min" value="1"/>
132+
</field>
133+
<field id="2" name="GroupName" type="string">
134+
<mandatoryConform/>
135+
<constraint type="maxLength" value="16"/>
136+
</field>
137+
</command>
138+
<command id="0x02" name="GetGroupMembership" direction="commandToServer" response="GetGroupMembershipResponse">
139+
<access invokePrivilege="operate" fabricScoped="true"/>
140+
<mandatoryConform/>
141+
<field id="0" name="GroupList" type="list">
142+
<entry type="group-id">
143+
<constraint type="min" value="1"/>
144+
</entry>
145+
<mandatoryConform/>
146+
</field>
147+
</command>
148+
<command id="0x02" name="GetGroupMembershipResponse" direction="responseFromServer">
149+
<mandatoryConform/>
150+
<field id="0" name="Capacity" type="uint8">
151+
<quality nullable="true"/>
152+
<mandatoryConform/>
153+
</field>
154+
<field id="1" name="GroupList" type="list">
155+
<entry type="group-id">
156+
<constraint type="min" value="1"/>
157+
</entry>
158+
<mandatoryConform/>
159+
</field>
160+
</command>
161+
<command id="0x03" name="RemoveGroup" direction="commandToServer" response="RemoveGroupResponse">
162+
<access invokePrivilege="manage" fabricScoped="true"/>
163+
<mandatoryConform/>
164+
<field id="0" name="GroupID" type="group-id">
165+
<mandatoryConform/>
166+
<constraint type="min" value="1"/>
167+
</field>
168+
</command>
169+
<command id="0x03" name="RemoveGroupResponse" direction="responseFromServer">
170+
<mandatoryConform/>
171+
<field id="0" name="Status" type="enum8">
172+
<mandatoryConform/>
173+
<constraint type="desc"/>
174+
</field>
175+
<field id="1" name="GroupID" type="group-id">
176+
<mandatoryConform/>
177+
<constraint type="min" value="1"/>
178+
</field>
179+
</command>
180+
<command id="0x04" name="RemoveAllGroups" direction="commandToServer" response="Y">
181+
<access invokePrivilege="manage" fabricScoped="true"/>
182+
<mandatoryConform/>
183+
</command>
184+
<command id="0x05" name="AddGroupIfIdentifying" direction="commandToServer" response="Y">
185+
<access invokePrivilege="manage" fabricScoped="true"/>
186+
<mandatoryConform/>
187+
<field id="0" name="GroupID" type="group-id">
188+
<mandatoryConform/>
189+
<constraint type="min" value="1"/>
190+
</field>
191+
<field id="1" name="GroupName" type="string">
192+
<mandatoryConform/>
193+
<constraint type="maxLength" value="16"/>
194+
</field>
195+
</command>
196+
</commands>
197+
</cluster>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (C) Connectivity Standards Alliance (2021). All rights reserved.
4+
The information within this document is the property of the Connectivity
5+
Standards Alliance and its use and disclosure are restricted, except as
6+
expressly set forth herein.
7+
8+
Connectivity Standards Alliance hereby grants you a fully-paid, non-exclusive,
9+
nontransferable, worldwide, limited and revocable license (without the right to
10+
sublicense), under Connectivity Standards Alliance's applicable copyright
11+
rights, to view, download, save, reproduce and use the document solely for your
12+
own internal purposes and in accordance with the terms of the license set forth
13+
herein. This license does not authorize you to, and you expressly warrant that
14+
you shall not: (a) permit others (outside your organization) to use this
15+
document; (b) post or publish this document; (c) modify, adapt, translate, or
16+
otherwise change this document in any manner or create any derivative work
17+
based on this document; (d) remove or modify any notice or label on this
18+
document, including this Copyright Notice, License and Disclaimer. The
19+
Connectivity Standards Alliance does not grant you any license hereunder other
20+
than as expressly stated herein.
21+
22+
Elements of this document may be subject to third party intellectual property
23+
rights, including without limitation, patent, copyright or trademark rights,
24+
and any such third party may or may not be a member of the Connectivity
25+
Standards Alliance. Connectivity Standards Alliance members grant other
26+
Connectivity Standards Alliance members certain intellectual property rights as
27+
set forth in the Connectivity Standards Alliance IPR Policy. Connectivity
28+
Standards Alliance members do not grant you any rights under this license. The
29+
Connectivity Standards Alliance is not responsible for, and shall not be held
30+
responsible in any manner for, identifying or failing to identify any or all
31+
such third party intellectual property rights. Please visit www.csa-iot.org for
32+
more information on how to become a member of the Connectivity Standards
33+
Alliance.
34+
35+
This document and the information contained herein are provided on an “AS IS”
36+
basis and the Connectivity Standards Alliance DISCLAIMS ALL WARRANTIES EXPRESS
37+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO (A) ANY WARRANTY THAT THE USE OF THE
38+
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OF THIRD PARTIES (INCLUDING
39+
WITHOUT LIMITATION ANY INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENT, COPYRIGHT
40+
OR TRADEMARK RIGHTS); OR (B) ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
41+
FOR A PARTICULAR PURPOSE, TITLE OR NONINFRINGEMENT. IN NO EVENT WILL THE
42+
CONNECTIVITY STANDARDS ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF
43+
BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR ANY OTHER
44+
DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
45+
DAMAGES OF ANY KIND, IN CONTRACT OR IN TORT, IN CONNECTION WITH THIS DOCUMENT
46+
OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
47+
LOSS OR DAMAGE.
48+
49+
All company, brand and product names in this document may be trademarks that
50+
are the sole property of their respective owners.
51+
52+
This notice and disclaimer must be included on all copies of this document.
53+
54+
Connectivity Standards Alliance
55+
508 Second Street, Suite 206
56+
Davis, CA 95616, USA
57+
58+
:xrefstyle: basic
59+
-->
60+
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0040" name="Fixed Label Cluster" revision="1">
61+
<revisionHistory>
62+
<revision revision="1" summary="Initial Release"/>
63+
</revisionHistory>
64+
<clusterIds>
65+
<clusterId id="0x0040" name="Fixed Label"/>
66+
</clusterIds>
67+
<classification hierarchy="derived" baseCluster="Label" role="utility" picsCode="FLABEL" scope="Endpoint"/>
68+
<dataTypes/>
69+
<attributes>
70+
<attribute id="0x0000" name="LabelList" type="list" default="empty">
71+
<entry type="LabelStruct"/>
72+
<access read="true" readPrivilege="view"/>
73+
<quality changeOmitted="false" nullable="false" scene="false" persistence="nonVolatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
74+
<mandatoryConform/>
75+
</attribute>
76+
</attributes>
77+
</cluster>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (C) Connectivity Standards Alliance (2021). All rights reserved.
4+
The information within this document is the property of the Connectivity
5+
Standards Alliance and its use and disclosure are restricted, except as
6+
expressly set forth herein.
7+
8+
Connectivity Standards Alliance hereby grants you a fully-paid, non-exclusive,
9+
nontransferable, worldwide, limited and revocable license (without the right to
10+
sublicense), under Connectivity Standards Alliance's applicable copyright
11+
rights, to view, download, save, reproduce and use the document solely for your
12+
own internal purposes and in accordance with the terms of the license set forth
13+
herein. This license does not authorize you to, and you expressly warrant that
14+
you shall not: (a) permit others (outside your organization) to use this
15+
document; (b) post or publish this document; (c) modify, adapt, translate, or
16+
otherwise change this document in any manner or create any derivative work
17+
based on this document; (d) remove or modify any notice or label on this
18+
document, including this Copyright Notice, License and Disclaimer. The
19+
Connectivity Standards Alliance does not grant you any license hereunder other
20+
than as expressly stated herein.
21+
22+
Elements of this document may be subject to third party intellectual property
23+
rights, including without limitation, patent, copyright or trademark rights,
24+
and any such third party may or may not be a member of the Connectivity
25+
Standards Alliance. Connectivity Standards Alliance members grant other
26+
Connectivity Standards Alliance members certain intellectual property rights as
27+
set forth in the Connectivity Standards Alliance IPR Policy. Connectivity
28+
Standards Alliance members do not grant you any rights under this license. The
29+
Connectivity Standards Alliance is not responsible for, and shall not be held
30+
responsible in any manner for, identifying or failing to identify any or all
31+
such third party intellectual property rights. Please visit www.csa-iot.org for
32+
more information on how to become a member of the Connectivity Standards
33+
Alliance.
34+
35+
This document and the information contained herein are provided on an “AS IS”
36+
basis and the Connectivity Standards Alliance DISCLAIMS ALL WARRANTIES EXPRESS
37+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO (A) ANY WARRANTY THAT THE USE OF THE
38+
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OF THIRD PARTIES (INCLUDING
39+
WITHOUT LIMITATION ANY INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENT, COPYRIGHT
40+
OR TRADEMARK RIGHTS); OR (B) ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
41+
FOR A PARTICULAR PURPOSE, TITLE OR NONINFRINGEMENT. IN NO EVENT WILL THE
42+
CONNECTIVITY STANDARDS ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF
43+
BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR ANY OTHER
44+
DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
45+
DAMAGES OF ANY KIND, IN CONTRACT OR IN TORT, IN CONNECTION WITH THIS DOCUMENT
46+
OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
47+
LOSS OR DAMAGE.
48+
49+
All company, brand and product names in this document may be trademarks that
50+
are the sole property of their respective owners.
51+
52+
This notice and disclaimer must be included on all copies of this document.
53+
54+
Connectivity Standards Alliance
55+
508 Second Street, Suite 206
56+
Davis, CA 95616, USA
57+
58+
:xrefstyle: basic
59+
-->
60+
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="" name="Label Cluster" revision="1">
61+
<revisionHistory>
62+
<revision revision="1" summary="Initial Release"/>
63+
</revisionHistory>
64+
<clusterIds>
65+
<clusterId name="Label"/>
66+
</clusterIds>
67+
<classification hierarchy="base" role="utility" picsCode="LABEL" scope="Endpoint"/>
68+
<dataTypes>
69+
<struct name="LabelStruct">
70+
<field id="0" name="Label" type="string" default="empty">
71+
<mandatoryConform/>
72+
<constraint type="maxLength" value="16"/>
73+
</field>
74+
<field id="1" name="Value" type="string" default="empty">
75+
<mandatoryConform/>
76+
<constraint type="maxLength" value="16"/>
77+
</field>
78+
</struct>
79+
</dataTypes>
80+
<attributes>
81+
<attribute id="0x0000" name="LabelList" type="list" default="empty">
82+
<entry type="LabelStruct"/>
83+
<quality changeOmitted="false" nullable="false" scene="false" persistence="volatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
84+
<mandatoryConform/>
85+
<constraint type="allowed" value="derived"/>
86+
</attribute>
87+
</attributes>
88+
</cluster>

0 commit comments

Comments
 (0)