Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd5635c

Browse files
committedOct 2, 2024·
Generated using ./alchemy zap --attribute="in-progress" WebRTC_Provider.adoc
1 parent 20200ee commit bd5635c

File tree

6 files changed

+589
-146
lines changed

6 files changed

+589
-146
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/webrtc-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/webrtc-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-234-gf4d359001
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>WEBRTC_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

+91-30
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+
"webrtc-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",
@@ -286,10 +302,13 @@
286302
"ActiveModeThreshold",
287303
"RegisteredClients",
288304
"ICDCounter",
289-
"ClientsSupportedPerFabric",
290-
"MaximumCheckInBackOff"
305+
"ClientsSupportedPerFabric"
306+
],
307+
"Occupancy Sensing": [
308+
"HoldTimeLimits",
309+
"HoldTime",
310+
"FeatureMap"
291311
],
292-
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
293312
"Operational Credentials": [
294313
"SupportedFabrics",
295314
"CommissionedFabrics",
@@ -396,14 +415,21 @@
396415
"CurrentMaxRate",
397416
"OverrunCount"
398417
],
399-
"Channel": ["Lineup", "CurrentChannel"],
418+
"Channel": [
419+
"Lineup",
420+
"CurrentChannel"
421+
],
400422
"Media Playback": [
401423
"SampledPosition",
402424
"ActiveAudioTrack",
403425
"ActiveTextTrack"
404426
],
405-
"Application Launcher": ["CurrentApp"],
406-
"Application Basic": ["Application"],
427+
"Application Launcher": [
428+
"CurrentApp"
429+
],
430+
"Application Basic": [
431+
"Application"
432+
],
407433
"Time Synchronization": [
408434
"TrustedTimeSource",
409435
"DefaultNTP",
@@ -415,15 +441,19 @@
415441
"TimeZoneListMaxSize",
416442
"DSTOffsetListMaxSize"
417443
],
418-
"Temperature Control": ["SupportedTemperatureLevels"],
444+
"Temperature Control": [
445+
"SupportedTemperatureLevels"
446+
],
419447
"Dishwasher Mode": [
420448
"SupportedModes",
421449
"CurrentMode",
422-
"StartUpMode",
423-
"OnMode",
424450
"FeatureMap"
425451
],
426-
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
452+
"Microwave Oven Mode": [
453+
"SupportedModes",
454+
"CurrentMode",
455+
"FeatureMap"
456+
],
427457
"Microwave Oven Control": [
428458
"CookTime",
429459
"MaxCookTime",
@@ -439,19 +469,23 @@
439469
"Laundry Washer Mode": [
440470
"SupportedModes",
441471
"CurrentMode",
442-
"StartUpMode",
443-
"OnMode",
444472
"FeatureMap"
445473
],
446474
"Refrigerator And Temperature Controlled Cabinet Mode": [
447475
"SupportedModes",
448476
"CurrentMode",
449-
"StartUpMode",
450-
"OnMode",
451477
"FeatureMap"
452478
],
453-
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
454-
"RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
479+
"RVC Clean Mode": [
480+
"SupportedModes",
481+
"CurrentMode",
482+
"FeatureMap"
483+
],
484+
"RVC Run Mode": [
485+
"SupportedModes",
486+
"CurrentMode",
487+
"FeatureMap"
488+
],
455489
"Operational State": [
456490
"OperationalState",
457491
"OperationalError",
@@ -628,7 +662,10 @@
628662
"LevelValue",
629663
"FeatureMap"
630664
],
631-
"Air Quality": ["AirQuality", "FeatureMap"],
665+
"Air Quality": [
666+
"AirQuality",
667+
"FeatureMap"
668+
],
632669
"Electrical Energy Measurement": [
633670
"Accuracy",
634671
"CumulativeEnergyImported",
@@ -660,9 +697,15 @@
660697
"NeutralCurrent",
661698
"FeatureMap"
662699
],
663-
"Power Topology": ["FeatureMap"],
664-
"Valve Configuration and Control": ["RemainingDuration"],
665-
"Boolean State Configuration": ["CurrentSensitivityLevel"],
700+
"Power Topology": [
701+
"FeatureMap"
702+
],
703+
"Valve Configuration and Control": [
704+
"RemainingDuration"
705+
],
706+
"Boolean State Configuration": [
707+
"CurrentSensitivityLevel"
708+
],
666709
"Water Heater Management": [
667710
"HeaterTypes",
668711
"HeatDemand",
@@ -673,18 +716,36 @@
673716
"FeatureMap",
674717
"ClusterRevision"
675718
],
676-
"Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
677-
"Wi-Fi Network Management": ["SSID", "PassphraseSurrogate"],
719+
"Water Heater Mode": [
720+
"SupportedModes",
721+
"CurrentMode",
722+
"FeatureMap"
723+
],
724+
"Wi-Fi Network Management": [
725+
"SSID",
726+
"PassphraseSurrogate"
727+
],
678728
"Thread Network Directory": [
679729
"PreferredExtendedPanID",
680730
"ThreadNetworks",
681731
"ThreadNetworkTableSize"
682732
],
683-
"Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"]
733+
"Service Area": [
734+
"CurrentArea",
735+
"EstimatedEndTime",
736+
"FeatureMap"
737+
]
684738
},
685739
"mandatoryDeviceTypes": "0x0016",
686740
"defaultReportingPolicy": "mandatory",
687-
"ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
741+
"ZCLDataTypes": [
742+
"ARRAY",
743+
"BITMAP",
744+
"ENUM",
745+
"NUMBER",
746+
"STRING",
747+
"STRUCT"
748+
],
688749
"fabricHandling": {
689750
"automaticallyCreateFields": true,
690751
"indexFieldId": 254,
@@ -694,4 +755,4 @@
694755
"uiOptions": {
695756
"showProfileId": false
696757
}
697-
}
758+
}

0 commit comments

Comments
 (0)
Please sign in to comment.