Skip to content

Commit

Permalink
Do XML struct as in the adoc file
Browse files Browse the repository at this point in the history
  • Loading branch information
Michail-Antropov committed Jun 28, 2024
1 parent 80fddeb commit 1e7629b
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 117 deletions.
194 changes: 97 additions & 97 deletions data_model/clusters/EnergyCalendar.xml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
<?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
:xrefstyle: short
<!--
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
:xrefstyle: short
-->
<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">
<revisionHistory>
Expand All @@ -82,20 +82,6 @@ Davis, CA 95616, USA
</feature>
</features>
<dataTypes>
<enum name="PeakPeriodSeverityEnum">
<item value="0" name="Unused" summary="Unused">
<mandatoryConform/>
</item>
<item value="1" name="Low" summary="Low">
<mandatoryConform/>
</item>
<item value="2" name="Medium" summary="Medium">
<mandatoryConform/>
</item>
<item value="3" name="High" summary="High">
<mandatoryConform/>
</item>
</enum>
<bitmap name="AuxiliaryLoadBitmap">
<bitfield name="AuxiliarySwitch1" bit="0" summary="Auxiliary Switch 1">
<mandatoryConform/>
Expand Down Expand Up @@ -145,35 +131,20 @@ Davis, CA 95616, USA
<mandatoryConform/>
</bitfield>
</bitmap>
<struct name="CalendarPeriodStruct">
<field id="0" name="StartDate" type="epoch-s">
<quality nullable="true"/>
<enum name="PeakPeriodSeverityEnum">
<item value="0" name="Unused" summary="Unused">
<mandatoryConform/>
<constraint type="min" value="StartDate Attribute"/>
</field>
<field id="1" name="Days" type="list">
<entry type="DayStruct"/>
</item>
<item value="1" name="Low" summary="Low">
<mandatoryConform/>
<constraint type="countBetween" from="1" to="7"/>
</field>
</struct>
<struct name="DayStruct">
<field id="0" name="Date" type="date">
<optionalConform choice="a"/>
</field>
<field id="1" name="DaysOfWeek" type="TransitionDayOfWeekBitmap">
<optionalConform choice="a"/>
<constraint type="desc"/>
</field>
<field id="2" name="Transitions" type="list">
<entry type="TransitionStruct"/>
</item>
<item value="2" name="Medium" summary="Medium">
<mandatoryConform/>
<constraint type="countBetween" from="1" to="48"/>
</field>
<field id="3" name="CalendarID" type="uint32">
<optionalConform/>
</field>
</struct>
</item>
<item value="3" name="High" summary="High">
<mandatoryConform/>
</item>
</enum>
<struct name="PeakPeriodStruct">
<field id="0" name="Severity" type="PeakPeriodSeverityEnum">
<mandatoryConform/>
Expand Down Expand Up @@ -211,6 +182,35 @@ Davis, CA 95616, USA
</optionalConform>
</field>
</struct>
<struct name="DayStruct">
<field id="0" name="Date" type="date">
<optionalConform choice="a"/>
</field>
<field id="1" name="DaysOfWeek" type="TransitionDayOfWeekBitmap">
<optionalConform choice="a"/>
<constraint type="desc"/>
</field>
<field id="2" name="Transitions" type="list">
<entry type="TransitionStruct"/>
<mandatoryConform/>
<constraint type="countBetween" from="1" to="48"/>
</field>
<field id="3" name="CalendarID" type="uint32">
<optionalConform/>
</field>
</struct>
<struct name="CalendarPeriodStruct">
<field id="0" name="StartDate" type="epoch-s">
<quality nullable="true"/>
<mandatoryConform/>
<constraint type="min" value="StartDate Attribute"/>
</field>
<field id="1" name="Days" type="list">
<entry type="DayStruct"/>
<mandatoryConform/>
<constraint type="countBetween" from="1" to="7"/>
</field>
</struct>
</dataTypes>
<attributes>
<attribute id="0x0000" name="CalendarID" type="uint32" default="null">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ limitations under the License.
-->
<configurator>
<domain name="Energy Management"/>
<enum name="PeakPeriodSeverityEnum" type="enum8">
<cluster code="0x009A"/>
<item name="Unused" value="0x00"/>
<item name="Low" value="0x01"/>
<item name="Medium" value="0x02"/>
<item name="High" value="0x03"/>
</enum>

<bitmap name="AuxiliaryLoadBitmap" type="bitmap8">
<cluster code="0x009A"/>
<field name="AuxiliarySwitch1" mask="0x01"/>
Expand All @@ -44,19 +36,13 @@ limitations under the License.
<field name="Saturday" mask="0x40"/>
</bitmap>

<struct name="CalendarPeriodStruct">
<cluster code="0x009A"/>
<item fieldId="0" name="StartDate" type="epoch_s" isNullable="true"/>
<item fieldId="1" name="Days" type="DayStruct" array="true" length="7" minLength="1"/>
</struct>

<struct name="DayStruct">
<enum name="PeakPeriodSeverityEnum" type="enum8">
<cluster code="0x009A"/>
<item fieldId="0" name="Date" type="date" optional="true"/>
<item fieldId="1" name="DaysOfWeek" type="TransitionDayOfWeekBitmap" optional="true" min="0x00" max="0x7F"/>
<item fieldId="2" name="Transitions" type="TransitionStruct" array="true" length="48" minLength="1"/>
<item fieldId="3" name="CalendarID" type="int32u" optional="true"/>
</struct>
<item name="Unused" value="0x00"/>
<item name="Low" value="0x01"/>
<item name="Medium" value="0x02"/>
<item name="High" value="0x03"/>
</enum>

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

<struct name="DayStruct">
<cluster code="0x009A"/>
<item fieldId="0" name="Date" type="date" optional="true"/>
<item fieldId="1" name="DaysOfWeek" type="TransitionDayOfWeekBitmap" optional="true" min="0x00" max="0x7F"/>
<item fieldId="2" name="Transitions" type="TransitionStruct" array="true" length="48" minLength="1"/>
<item fieldId="3" name="CalendarID" type="int32u" optional="true"/>
</struct>

<struct name="CalendarPeriodStruct">
<cluster code="0x009A"/>
<item fieldId="0" name="StartDate" type="epoch_s" isNullable="true"/>
<item fieldId="1" name="Days" type="DayStruct" array="true" length="7" minLength="1"/>
</struct>

<cluster>
<name>Energy Calendar</name>
<domain>Energy Management</domain>
Expand Down

0 comments on commit 1e7629b

Please sign in to comment.