Skip to content

Commit 87af5e1

Browse files
committed
Generated using ./alchemy zap --attribute="in-progress" ... WebRTC_Provider.adoc
1 parent 20200ee commit 87af5e1

File tree

6 files changed

+587
-130
lines changed

6 files changed

+587
-130
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ jobs:
198198
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
199199
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
200200
src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \
201+
src/app/zap-templates/zcl/data-model/chip/web-rtc-provider-cluster.xml \
201202
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
202203
src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \
203204
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
108108
load "../src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml";
109109
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml";
110110
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml";
111+
load "../src/app/zap-templates/zcl/data-model/chip/web-rtc-provider-cluster.xml";
111112
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml";
112113
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml";
113114
load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2024 Project CHIP Authors
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<!--
18+
XML generated by Alchemy; DO NOT EDIT.
19+
Source: src/app_clusters/WebRTC_Provider.adoc
20+
Parameters: in-progress
21+
Git: 0.9-fall2024-231-gf50161121
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
24+
<domain name="General"/>
25+
26+
<enum name="StreamTypeEnum" type="enum8">
27+
<cluster code="0x0553"/>
28+
<cluster code="0x0554"/>
29+
<item name="Internal" value="0x00"/>
30+
<item name="Recording" value="0x01"/>
31+
<item name="Analysis" value="0x02"/>
32+
<item name="LiveView" value="0x03"/>
33+
</enum>
34+
35+
<bitmap name="WebRTCMetadataOptions" type="bitmap8">
36+
<cluster code="0x0553"/>
37+
<cluster code="0x0554"/>
38+
<field name="DataTLV" mask="0x01"/>
39+
</bitmap>
40+
41+
<enum name="WebRTCEndReasonEnum" type="enum8">
42+
<cluster code="0x0553"/>
43+
<cluster code="0x0554"/>
44+
<item name="IceFailed" value="0x00"/>
45+
<item name="IceTimeout" value="0x01"/>
46+
<item name="UserHangup" value="0x02"/>
47+
<item name="UserBusy" value="0x03"/>
48+
<item name="Replaced" value="0x04"/>
49+
<item name="NoUserMedia" value="0x05"/>
50+
<item name="InviteTimeout" value="0x06"/>
51+
<item name="AnsweredElsewhere" value="0x07"/>
52+
<item name="OutOfResources" value="0x08"/>
53+
<item name="MediaTimeout" value="0x09"/>
54+
<item name="LowPower" value="0x0A"/>
55+
<item name="UnknownReason" value="0x0B"/>
56+
</enum>
57+
58+
<struct name="ICEServerStruct" apiMaturity="provisional">
59+
<cluster code="0x0553"/>
60+
<cluster code="0x0554"/>
61+
<item fieldId="1" name="urls" array="true" type="char_string"/>
62+
<item fieldId="2" name="username" type="char_string" optional="true"/>
63+
<item fieldId="3" name="credential" type="char_string" optional="true"/>
64+
<item fieldId="4" name="CAID" type="int16u" optional="true"/>
65+
</struct>
66+
67+
<struct name="WebRTCSessionStruct" apiMaturity="provisional">
68+
<cluster code="0x0553"/>
69+
<cluster code="0x0554"/>
70+
<item fieldId="1" name="ID" type="int16u"/>
71+
<item fieldId="2" name="PeerNodeID" type="node_id"/>
72+
<item fieldId="3" name="PeerFabricIndex" type="fabric_idx"/>
73+
<item fieldId="4" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
74+
<item fieldId="5" name="VideoStreamID" type="int16u" isNullable="true"/>
75+
<item fieldId="6" name="AudioStreamID" type="int16u" isNullable="true"/>
76+
<item fieldId="7" name="MetadataOptions" type="WebRTCMetadataOptions" default="0x00" min="0x00" max="0x01"/>
77+
</struct>
78+
79+
<cluster>
80+
<domain name="General"/>
81+
<name>WebRTC Transport Provider</name>
82+
<code>0x0553</code>
83+
<define>WEB_RTC_TRANSPORT_PROVIDER_CLUSTER</define>
84+
<description>The following process SHALL be followed when the server receives this command:</description>
85+
<client init="false" tick="false">true</client>
86+
<server init="false" tick="false">true</server>
87+
<globalAttribute code="0xFFFD" side="either" value="1"/>
88+
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct">CurrentSessions</attribute>
89+
<command code="0x01" source="client" name="SolicitOffer" optional="false" response="SolicitOfferResponse">
90+
<description>Requests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow.</description>
91+
<arg id="1" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
92+
<arg id="2" name="VideoStreamID" type="int16u" optional="true" isNullable="true"/>
93+
<arg id="3" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
94+
<arg id="4" name="ICEServers" array="true" type="ICEServerStruct" optional="true"/>
95+
<arg id="5" name="ICETransportPolicy" type="char_string" optional="true"/>
96+
<arg id="6" name="MetadataOptions" type="WebRTCMetadataOptions" optional="true" min="0x00" max="0x01"/>
97+
</command>
98+
99+
<command code="0x02" source="server" name="SolicitOfferResponse" optional="false" disableDefaultResponse="true">
100+
<description>This command SHALL be generated in response to a SolicitOffer command.</description>
101+
<arg id="1" name="WebRTCSessionID" type="int16u"/>
102+
<arg id="2" name="DeferredOffer" type="boolean"/>
103+
<arg id="3" name="VideoStreamID" type="int16u" optional="true" isNullable="true"/>
104+
<arg id="4" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
105+
</command>
106+
107+
<command code="0x03" source="client" name="ProvideOffer" optional="false" response="ProvideOfferResponse">
108+
<description>This command allows an SDP Offer to be set and start a new session.</description>
109+
<arg id="1" name="WebRTCSessionID" type="int16u" isNullable="true"/>
110+
<arg id="2" name="SDP" type="char_string"/>
111+
<arg id="3" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
112+
<arg id="4" name="VideoStreamID" type="int16u" optional="true" isNullable="true"/>
113+
<arg id="5" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
114+
<arg id="6" name="ICEServers" array="true" type="ICEServerStruct" optional="true"/>
115+
<arg id="7" name="ICETransportPolicy" type="char_string" optional="true"/>
116+
<arg id="8" name="MetadataOptions" type="WebRTCMetadataOptions" optional="true" min="0x00" max="0x01"/>
117+
</command>
118+
119+
<command code="0x04" source="server" name="ProvideOfferResponse" optional="false" disableDefaultResponse="true">
120+
<description>This command contains information about the stream created as a response to the requestor&apos;s offer.</description>
121+
<arg id="1" name="WebRTCSessionID" type="int16u"/>
122+
<arg id="2" name="VideoStreamID" type="int16u"/>
123+
<arg id="3" name="AudioStreamID" type="int16u"/>
124+
</command>
125+
126+
<command code="0x05" source="client" name="ProvideAnswer" optional="false">
127+
<description>This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer.</description>
128+
<arg id="1" name="WebRTCSessionID" type="int16u"/>
129+
<arg id="2" name="SDP" type="char_string"/>
130+
</command>
131+
132+
<command code="0x06" source="client" name="ProvideICECandidate" optional="false">
133+
<description>This command allows for https://www.rfc-editor.org/rfc/rfc8839#section-4.2.1.2 nominated after the initial Offer / Answer exchange to be added to a session during the gathering phase.</description>
134+
<arg id="1" name="WebRTCSessionID" type="int16u"/>
135+
<arg id="2" name="ICECandidate" type="char_string"/>
136+
</command>
137+
138+
<command code="0x07" source="client" name="EndSession" optional="false">
139+
<description>This command instructs the stream provider to end the WebRTC session.</description>
140+
<arg id="1" name="WebRTCSessionID" type="int16u"/>
141+
<arg id="2" name="Reason" type="WebRTCEndReasonEnum" default="0x0B" min="0x00" max="0x0B"/>
142+
</command>
143+
144+
</cluster>
145+
</configurator>

src/app/zap-templates/zcl/zcl-with-test-extensions.json

+90-22
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
"washer-controls-cluster.xml",
132132
"water-heater-management-cluster.xml",
133133
"water-heater-mode-cluster.xml",
134+
"web-rtc-provider-cluster.xml",
134135
"wifi-network-diagnostics-cluster.xml",
135136
"wifi-network-management-cluster.xml",
136137
"window-covering.xml",
@@ -143,9 +144,15 @@
143144
"manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml",
144145
"options": {
145146
"text": {
146-
"defaultResponsePolicy": ["Always", "Conditional", "Never"]
147+
"defaultResponsePolicy": [
148+
"Always",
149+
"Conditional",
150+
"Never"
151+
]
147152
},
148-
"bool": ["commandDiscovery"]
153+
"bool": [
154+
"commandDiscovery"
155+
]
149156
},
150157
"defaults": {
151158
"text": {
@@ -191,8 +198,13 @@
191198
"SpecificationVersion",
192199
"MaxPathsPerInvoke"
193200
],
194-
"Bridged Device Basic Information": ["ProductAppearance"],
195-
"Descriptor": ["ClusterRevision", "FeatureMap"],
201+
"Bridged Device Basic Information": [
202+
"ProductAppearance"
203+
],
204+
"Descriptor": [
205+
"ClusterRevision",
206+
"FeatureMap"
207+
],
196208
"Device Energy Management": [
197209
"ESAType",
198210
"ESACanGenerate",
@@ -244,7 +256,11 @@
244256
"SessionEnergyDischarged",
245257
"FeatureMap"
246258
],
247-
"Energy EVSE Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
259+
"Energy EVSE Mode": [
260+
"SupportedModes",
261+
"CurrentMode",
262+
"FeatureMap"
263+
],
248264
"Ethernet Network Diagnostics": [
249265
"PHYRate",
250266
"FullDuplex",
@@ -289,7 +305,11 @@
289305
"ClientsSupportedPerFabric",
290306
"MaximumCheckInBackOff"
291307
],
292-
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
308+
"Occupancy Sensing": [
309+
"HoldTimeLimits",
310+
"HoldTime",
311+
"FeatureMap"
312+
],
293313
"Operational Credentials": [
294314
"SupportedFabrics",
295315
"CommissionedFabrics",
@@ -396,14 +416,21 @@
396416
"CurrentMaxRate",
397417
"OverrunCount"
398418
],
399-
"Channel": ["Lineup", "CurrentChannel"],
419+
"Channel": [
420+
"Lineup",
421+
"CurrentChannel"
422+
],
400423
"Media Playback": [
401424
"SampledPosition",
402425
"ActiveAudioTrack",
403426
"ActiveTextTrack"
404427
],
405-
"Application Launcher": ["CurrentApp"],
406-
"Application Basic": ["Application"],
428+
"Application Launcher": [
429+
"CurrentApp"
430+
],
431+
"Application Basic": [
432+
"Application"
433+
],
407434
"Time Synchronization": [
408435
"TrustedTimeSource",
409436
"DefaultNTP",
@@ -415,15 +442,21 @@
415442
"TimeZoneListMaxSize",
416443
"DSTOffsetListMaxSize"
417444
],
418-
"Temperature Control": ["SupportedTemperatureLevels"],
445+
"Temperature Control": [
446+
"SupportedTemperatureLevels"
447+
],
419448
"Dishwasher Mode": [
420449
"SupportedModes",
421450
"CurrentMode",
422451
"StartUpMode",
423452
"OnMode",
424453
"FeatureMap"
425454
],
426-
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
455+
"Microwave Oven Mode": [
456+
"SupportedModes",
457+
"CurrentMode",
458+
"FeatureMap"
459+
],
427460
"Microwave Oven Control": [
428461
"CookTime",
429462
"MaxCookTime",
@@ -450,8 +483,16 @@
450483
"OnMode",
451484
"FeatureMap"
452485
],
453-
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
454-
"RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
486+
"RVC Clean Mode": [
487+
"SupportedModes",
488+
"CurrentMode",
489+
"FeatureMap"
490+
],
491+
"RVC Run Mode": [
492+
"SupportedModes",
493+
"CurrentMode",
494+
"FeatureMap"
495+
],
455496
"Operational State": [
456497
"OperationalState",
457498
"OperationalError",
@@ -628,7 +669,10 @@
628669
"LevelValue",
629670
"FeatureMap"
630671
],
631-
"Air Quality": ["AirQuality", "FeatureMap"],
672+
"Air Quality": [
673+
"AirQuality",
674+
"FeatureMap"
675+
],
632676
"Electrical Energy Measurement": [
633677
"Accuracy",
634678
"CumulativeEnergyImported",
@@ -660,9 +704,15 @@
660704
"NeutralCurrent",
661705
"FeatureMap"
662706
],
663-
"Power Topology": ["FeatureMap"],
664-
"Valve Configuration and Control": ["RemainingDuration"],
665-
"Boolean State Configuration": ["CurrentSensitivityLevel"],
707+
"Power Topology": [
708+
"FeatureMap"
709+
],
710+
"Valve Configuration and Control": [
711+
"RemainingDuration"
712+
],
713+
"Boolean State Configuration": [
714+
"CurrentSensitivityLevel"
715+
],
666716
"Water Heater Management": [
667717
"HeaterTypes",
668718
"HeatDemand",
@@ -673,18 +723,36 @@
673723
"FeatureMap",
674724
"ClusterRevision"
675725
],
676-
"Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
677-
"Wi-Fi Network Management": ["SSID", "PassphraseSurrogate"],
726+
"Water Heater Mode": [
727+
"SupportedModes",
728+
"CurrentMode",
729+
"FeatureMap"
730+
],
731+
"Wi-Fi Network Management": [
732+
"SSID",
733+
"PassphraseSurrogate"
734+
],
678735
"Thread Network Directory": [
679736
"PreferredExtendedPanID",
680737
"ThreadNetworks",
681738
"ThreadNetworkTableSize"
682739
],
683-
"Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"]
740+
"Service Area": [
741+
"CurrentArea",
742+
"EstimatedEndTime",
743+
"FeatureMap"
744+
]
684745
},
685746
"mandatoryDeviceTypes": "0x0016",
686747
"defaultReportingPolicy": "mandatory",
687-
"ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
748+
"ZCLDataTypes": [
749+
"ARRAY",
750+
"BITMAP",
751+
"ENUM",
752+
"NUMBER",
753+
"STRING",
754+
"STRUCT"
755+
],
688756
"fabricHandling": {
689757
"automaticallyCreateFields": true,
690758
"indexFieldId": 254,
@@ -694,4 +762,4 @@
694762
"uiOptions": {
695763
"showProfileId": false
696764
}
697-
}
765+
}

0 commit comments

Comments
 (0)