Skip to content

Commit

Permalink
Fixes to reflect updated spec
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarcosb committed Sep 20, 2024
1 parent 48e0d3f commit 01c4f87
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 34 deletions.
22 changes: 17 additions & 5 deletions src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,35 @@ 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.
-->

<!--
TODO: Make these structures global rather than defining them for each cluster.
This depends on the ability to define global structs via XML tags.
see: https://github.com/project-chip/connectedhomeip/issues/29818
-->

<configurator>
<domain name="CHIP"/>

<!--
These are test global items (no cluster attached) for testing only.
Their usage is defined for UnitTestCluster only.
-->
<bitmap name="TestGlobalBitmap" type="bitmap32">
<field mask="0x01" name="FirstBit" />
<field mask="0x02" name="SecondBit" />
<field mask="0x00000002" name="FirstBit"/>
<field mask="0x00000004" name="SecondBit"/>
</bitmap>

<bitmap name="WebRTCMetadataOptions" type="bitmap8">
<field name="DataTLV" mask="0x01"/>
</bitmap>

<bitmap name="WildcardPathFlagsBitmap" type="bitmap8">
<field name="WildcardSkipRootNode" mask="0x01"/>
<field name="WildcardSkipGlobalAttributes" mask="0x02"/>
<field name="WildcardSkipAttributeList" mask="0x04"/>
<field name="Reserved" mask="0x08"/>
<field name="WildcardSkipCommandLists" mask="0x10"/>
<field name="WildcardSkipCustomElements" mask="0x20"/>
<field name="WildcardSkipFixedAttributes" mask="0x40"/>
<field name="WildcardSkipChangesOmittedAttributes" mask="0x80"/>
<field name="WildcardSkipDiagnosticsClusters" mask="0x100"/>
</bitmap>
</configurator>
73 changes: 64 additions & 9 deletions src/app/zap-templates/zcl/data-model/chip/global-structs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,84 @@ 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="AtomicAttributeStatusStruct">
<item fieldId="0" name="AttributeID" type="attrib_id" />
<item fieldId="0" name="AttributeID" type="attrib_id"/>
<item fieldId="1" name="StatusCode" type="status"/>
</struct>

<struct name="AttributionData" apiMaturity="provisional" isFabricScoped="true">
<item fieldId="0" name="ContextInformation" type="enum8"/>
<item fieldId="1" name="SourceContext" type="int32u" optional="true" isFabricSensitive="true"/>
<item fieldId="2" name="NodeID" type="node_id" optional="true" isFabricSensitive="true"/>
<item fieldId="3" name="GroupD" type="group_id" optional="true" isFabricSensitive="true"/>
<item fieldId="4" name="SystemTimeStamp" type="systime_ms" optional="true"/>
<item fieldId="5" name="EpochTimeStamp" type="posix_ms" optional="true"/>
<item fieldId="254" name="FabricIndex" type="fabric_idx" isNullable="true"/>
</struct>

<struct name="Date" apiMaturity="provisional">
<item fieldId="0" name="Year" type="int8u" isNullable="true"/>
<item fieldId="1" name="Month" type="int8u" isNullable="true" min="1" max="12"/>
<item fieldId="2" name="Day" type="int8u" isNullable="true" min="1" max="31"/>
<item fieldId="3" name="DayOfWeek" type="int8u" isNullable="true" min="1" max="7"/>
</struct>

<struct name="LocationDescriptorStruct">
<item fieldId="0" name="LocationName" type="char_string" length="128" isNullable="false" optional="false"/>
<item fieldId="1" name="FloorNumber" type="int16s" isNullable="true" optional="false"/>
<item fieldId="2" name="AreaType" type="AreaTypeTag" isNullable="true" optional="false"/>
<item fieldId="0" name="LocationName" type="char_string" length="128"/>
<item fieldId="1" name="FloorNumber" type="int16s" isNullable="true"/>
<item fieldId="2" name="AreaType" type="tag" isNullable="true"/>
</struct>

<!--
These are test global items (no cluster attached) for testing only.
Their usage is defined for UnitTestCluster only.
-->

<struct name="MeasurementAccuracyRangeStruct" apiMaturity="provisional">
<item fieldId="0" name="RangeMin" type="int64s" min="-4611686018427387904" max="4611686018427387904"/>
<item fieldId="1" name="RangeMax" type="int64s" min="-4611686018427387904" max="4611686018427387904"/>
<item fieldId="2" name="PercentMax" type="percent100ths" optional="true"/>
<item fieldId="3" name="PercentMin" type="percent100ths" optional="true"/>
<item fieldId="4" name="PercentTypical" type="percent100ths" optional="true"/>
<item fieldId="5" name="FixedMax" type="int64u" optional="true" max="4611686018427387903"/>
<item fieldId="6" name="FixedMin" type="int64u" optional="true" max="4611686018427387903"/>
<item fieldId="7" name="FixedTypical" type="int64u" optional="true" max="4611686018427387903"/>
</struct>

<struct name="MeasurementAccuracyStruct" apiMaturity="provisional">
<item fieldId="0" name="MeasurementType" type="MeasurementTypeEnum" min="0x0000" max="0x000E"/>
<item fieldId="1" name="Measured" type="boolean" default="0"/>
<item fieldId="2" name="MinMeasuredValue" type="int64s" min="-4611686018427387904" max="4611686018427387904"/>
<item fieldId="3" name="MaxMeasuredValue" type="int64s" min="-4611686018427387904" max="4611686018427387904"/>
<item fieldId="4" name="AccuracyRanges" array="true" type="MeasurementAccuracyRangeStruct" minLength="1"/>
</struct>

<struct name="SemanticTagStruct" apiMaturity="provisional">
<item fieldId="0" name="MfgCode" type="vendor_id" isNullable="true"/>
<item fieldId="1" name="NamespaceID" type="namespace"/>
<item fieldId="2" name="Tag" type="tag"/>
<item fieldId="3" name="Label" type="char_string" isNullable="true" optional="true" length="64"/>
</struct>

<struct name="SuppliedAttributionData" apiMaturity="provisional" isFabricScoped="true">
<item fieldId="0" name="ContextInformation" type="enum8"/>
<item fieldId="1" name="SourceContext" type="int32u" optional="true"/>
</struct>

<struct name="TestGlobalStruct">
<item fieldId="0" name="Name" type="char_string" length="128" isNullable="false" optional="false"/>
<item fieldId="1" name="MyBitmap" type="TestGlobalBitmap" isNullable="true" optional="false"/>
<item fieldId="0" name="Name" type="char_string" length="128"/>
<item fieldId="1" name="MyBitmap" type="TestGlobalBitmap" isNullable="true"/>
<item fieldId="2" name="MyEnum" type="TestGlobalEnum" isNullable="true" optional="true"/>
</struct>

<struct name="WebRTCSessionStruct" apiMaturity="provisional">
<item fieldId="1" name="ID" type="WebRTCSessionID"/>
<item fieldId="2" name="PeerNodeId" type="node_id"/>
<item fieldId="3" name="PeerFabricIndex" type="fabric_idx"/>
<item fieldId="4" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<item fieldId="5" name="VideoStreamID" type="VideoStreamID" isNullable="true"/>
<item fieldId="6" name="AudioStreamID" type="AudioStreamID" isNullable="true"/>
<item fieldId="7" name="MetadataOptions" type="WebRTCMetadataOptions" default="0x00" min="0x00" max="0x01"/>
</struct>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,10 @@ limitations under the License.
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/WebRTC_Provider.adoc
Parameters: in-progress
Git: 0.7-fall2024-ncr-1155-g78ec59e8a-dirty
Git: 0.7-fall2024-ncr-1156-g1517df816-dirty
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="General"/>
<bitmap name="WebRTCMetadataOptions" type="bitmap8">
<cluster code="0x0553"/>
<cluster code="0x0554"/>
<field name="DataTLV" mask="0x01"/>
</bitmap>

<enum name="WebRTCEndReasonEnum" type="enum8">
<cluster code="0x0553"/>
<cluster code="0x0554"/>
Expand All @@ -54,18 +48,6 @@ Git: 0.7-fall2024-ncr-1155-g78ec59e8a-dirty
<item fieldId="4" name="CAID" type="int16u" optional="true"/>
</struct>

<struct name="WebRTCSessionStruct" apiMaturity="provisional">
<cluster code="0x0553"/>
<cluster code="0x0554"/>
<item fieldId="1" name="ID" type="WebRTCSessionID"/>
<item fieldId="2" name="PeerNodeId" type="node_id"/>
<item fieldId="3" name="PeerFabricIndex" type="fabric_idx"/>
<item fieldId="4" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<item fieldId="5" name="VideoStreamID" type="VideoStreamID" isNullable="true"/>
<item fieldId="6" name="AudioStreamID" type="AudioStreamID" isNullable="true"/>
<item fieldId="7" name="MetadataOptions" type="WebRTCMetadataOptions" default="0x00" min="0x00" max="0x01"/>
</struct>

<cluster>
<domain name="General"/>
<name>WebRTC Transport Provider</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/WebRTC_Requestor.adoc
Parameters: in-progress
Git: 0.7-fall2024-ncr-1155-g78ec59e8a-dirty
Git: 0.7-fall2024-ncr-1156-g1517df816-dirty
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="General"/>
Expand Down

0 comments on commit 01c4f87

Please sign in to comment.