Skip to content

Commit 1e7629b

Browse files
Do XML struct as in the adoc file
1 parent 80fddeb commit 1e7629b

File tree

2 files changed

+117
-117
lines changed

2 files changed

+117
-117
lines changed

data_model/clusters/EnergyCalendar.xml

+97-97
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
<?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: short
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: short
5959
-->
6060
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x009A" name="Energy Calendar Cluster" revision="3">
6161
<revisionHistory>
@@ -82,20 +82,6 @@ Davis, CA 95616, USA
8282
</feature>
8383
</features>
8484
<dataTypes>
85-
<enum name="PeakPeriodSeverityEnum">
86-
<item value="0" name="Unused" summary="Unused">
87-
<mandatoryConform/>
88-
</item>
89-
<item value="1" name="Low" summary="Low">
90-
<mandatoryConform/>
91-
</item>
92-
<item value="2" name="Medium" summary="Medium">
93-
<mandatoryConform/>
94-
</item>
95-
<item value="3" name="High" summary="High">
96-
<mandatoryConform/>
97-
</item>
98-
</enum>
9985
<bitmap name="AuxiliaryLoadBitmap">
10086
<bitfield name="AuxiliarySwitch1" bit="0" summary="Auxiliary Switch 1">
10187
<mandatoryConform/>
@@ -145,35 +131,20 @@ Davis, CA 95616, USA
145131
<mandatoryConform/>
146132
</bitfield>
147133
</bitmap>
148-
<struct name="CalendarPeriodStruct">
149-
<field id="0" name="StartDate" type="epoch-s">
150-
<quality nullable="true"/>
134+
<enum name="PeakPeriodSeverityEnum">
135+
<item value="0" name="Unused" summary="Unused">
151136
<mandatoryConform/>
152-
<constraint type="min" value="StartDate Attribute"/>
153-
</field>
154-
<field id="1" name="Days" type="list">
155-
<entry type="DayStruct"/>
137+
</item>
138+
<item value="1" name="Low" summary="Low">
156139
<mandatoryConform/>
157-
<constraint type="countBetween" from="1" to="7"/>
158-
</field>
159-
</struct>
160-
<struct name="DayStruct">
161-
<field id="0" name="Date" type="date">
162-
<optionalConform choice="a"/>
163-
</field>
164-
<field id="1" name="DaysOfWeek" type="TransitionDayOfWeekBitmap">
165-
<optionalConform choice="a"/>
166-
<constraint type="desc"/>
167-
</field>
168-
<field id="2" name="Transitions" type="list">
169-
<entry type="TransitionStruct"/>
140+
</item>
141+
<item value="2" name="Medium" summary="Medium">
170142
<mandatoryConform/>
171-
<constraint type="countBetween" from="1" to="48"/>
172-
</field>
173-
<field id="3" name="CalendarID" type="uint32">
174-
<optionalConform/>
175-
</field>
176-
</struct>
143+
</item>
144+
<item value="3" name="High" summary="High">
145+
<mandatoryConform/>
146+
</item>
147+
</enum>
177148
<struct name="PeakPeriodStruct">
178149
<field id="0" name="Severity" type="PeakPeriodSeverityEnum">
179150
<mandatoryConform/>
@@ -211,6 +182,35 @@ Davis, CA 95616, USA
211182
</optionalConform>
212183
</field>
213184
</struct>
185+
<struct name="DayStruct">
186+
<field id="0" name="Date" type="date">
187+
<optionalConform choice="a"/>
188+
</field>
189+
<field id="1" name="DaysOfWeek" type="TransitionDayOfWeekBitmap">
190+
<optionalConform choice="a"/>
191+
<constraint type="desc"/>
192+
</field>
193+
<field id="2" name="Transitions" type="list">
194+
<entry type="TransitionStruct"/>
195+
<mandatoryConform/>
196+
<constraint type="countBetween" from="1" to="48"/>
197+
</field>
198+
<field id="3" name="CalendarID" type="uint32">
199+
<optionalConform/>
200+
</field>
201+
</struct>
202+
<struct name="CalendarPeriodStruct">
203+
<field id="0" name="StartDate" type="epoch-s">
204+
<quality nullable="true"/>
205+
<mandatoryConform/>
206+
<constraint type="min" value="StartDate Attribute"/>
207+
</field>
208+
<field id="1" name="Days" type="list">
209+
<entry type="DayStruct"/>
210+
<mandatoryConform/>
211+
<constraint type="countBetween" from="1" to="7"/>
212+
</field>
213+
</struct>
214214
</dataTypes>
215215
<attributes>
216216
<attribute id="0x0000" name="CalendarID" type="uint32" default="null">

src/app/zap-templates/zcl/data-model/chip/energy-calendar-cluster.xml

+20-20
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ limitations under the License.
1313
-->
1414
<configurator>
1515
<domain name="Energy Management"/>
16-
<enum name="PeakPeriodSeverityEnum" type="enum8">
17-
<cluster code="0x009A"/>
18-
<item name="Unused" value="0x00"/>
19-
<item name="Low" value="0x01"/>
20-
<item name="Medium" value="0x02"/>
21-
<item name="High" value="0x03"/>
22-
</enum>
23-
2416
<bitmap name="AuxiliaryLoadBitmap" type="bitmap8">
2517
<cluster code="0x009A"/>
2618
<field name="AuxiliarySwitch1" mask="0x01"/>
@@ -44,19 +36,13 @@ limitations under the License.
4436
<field name="Saturday" mask="0x40"/>
4537
</bitmap>
4638

47-
<struct name="CalendarPeriodStruct">
48-
<cluster code="0x009A"/>
49-
<item fieldId="0" name="StartDate" type="epoch_s" isNullable="true"/>
50-
<item fieldId="1" name="Days" type="DayStruct" array="true" length="7" minLength="1"/>
51-
</struct>
52-
53-
<struct name="DayStruct">
39+
<enum name="PeakPeriodSeverityEnum" type="enum8">
5440
<cluster code="0x009A"/>
55-
<item fieldId="0" name="Date" type="date" optional="true"/>
56-
<item fieldId="1" name="DaysOfWeek" type="TransitionDayOfWeekBitmap" optional="true" min="0x00" max="0x7F"/>
57-
<item fieldId="2" name="Transitions" type="TransitionStruct" array="true" length="48" minLength="1"/>
58-
<item fieldId="3" name="CalendarID" type="int32u" optional="true"/>
59-
</struct>
41+
<item name="Unused" value="0x00"/>
42+
<item name="Low" value="0x01"/>
43+
<item name="Medium" value="0x02"/>
44+
<item name="High" value="0x03"/>
45+
</enum>
6046

6147
<struct name="PeakPeriodStruct">
6248
<cluster code="0x009A"/>
@@ -74,6 +60,20 @@ limitations under the License.
7460
<item fieldId="3" name="AuxiliaryLoad" type="AuxiliaryLoadBitmap" optional="true" min="0x00" max="0xFF"/>
7561
</struct>
7662

63+
<struct name="DayStruct">
64+
<cluster code="0x009A"/>
65+
<item fieldId="0" name="Date" type="date" optional="true"/>
66+
<item fieldId="1" name="DaysOfWeek" type="TransitionDayOfWeekBitmap" optional="true" min="0x00" max="0x7F"/>
67+
<item fieldId="2" name="Transitions" type="TransitionStruct" array="true" length="48" minLength="1"/>
68+
<item fieldId="3" name="CalendarID" type="int32u" optional="true"/>
69+
</struct>
70+
71+
<struct name="CalendarPeriodStruct">
72+
<cluster code="0x009A"/>
73+
<item fieldId="0" name="StartDate" type="epoch_s" isNullable="true"/>
74+
<item fieldId="1" name="Days" type="DayStruct" array="true" length="7" minLength="1"/>
75+
</struct>
76+
7777
<cluster>
7878
<name>Energy Calendar</name>
7979
<domain>Energy Management</domain>

0 commit comments

Comments
 (0)