Skip to content

Commit 9ae53c5

Browse files
Camera webrtc provider cluster (#35779)
* Generated using ./alchemy zap --attribute="in-progress" WebRTC_Provider.adoc * Update description * Generated using ./scripts/tools/zap_regen_all.py * Restyled by whitespace * Restyled by prettier-json * Re-enerated with updated alchemy supporting cameras domain * Re-enerated using ./scripts/tools/zap_regen_all.py * Re-generated using ./scripts/tools/zap_regen_all.py after some update causing `WITH_AUTORELEASE_POOL` --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 6bb8645 commit 9ae53c5

File tree

57 files changed

+9883
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+9883
-77
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 \

docs/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Generally regenerate using one of:
129129
| 1294 | 0x50E | AccountLogin |
130130
| 1295 | 0x50F | ContentControl |
131131
| 1296 | 0x510 | ContentAppObserver |
132+
| 1363 | 0x553 | WebRTCTransportProvider |
132133
| 1366 | 0x556 | Chime |
133134
| 1872 | 0x750 | EcosystemInformation |
134135
| 1873 | 0x751 | CommissionerControl |

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 apiMaturity="provisional">
80+
<domain name="Cameras"/>
81+
<name>WebRTC Transport Provider</name>
82+
<code>0x0553</code>
83+
<define>WEBRTC_TRANSPORT_PROVIDER_CLUSTER</define>
84+
<description>The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC.</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

+4-18
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",
@@ -286,8 +287,7 @@
286287
"ActiveModeThreshold",
287288
"RegisteredClients",
288289
"ICDCounter",
289-
"ClientsSupportedPerFabric",
290-
"MaximumCheckInBackOff"
290+
"ClientsSupportedPerFabric"
291291
],
292292
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
293293
"Operational Credentials": [
@@ -416,13 +416,7 @@
416416
"DSTOffsetListMaxSize"
417417
],
418418
"Temperature Control": ["SupportedTemperatureLevels"],
419-
"Dishwasher Mode": [
420-
"SupportedModes",
421-
"CurrentMode",
422-
"StartUpMode",
423-
"OnMode",
424-
"FeatureMap"
425-
],
419+
"Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
426420
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
427421
"Microwave Oven Control": [
428422
"CookTime",
@@ -436,18 +430,10 @@
436430
"WattRating",
437431
"FeatureMap"
438432
],
439-
"Laundry Washer Mode": [
440-
"SupportedModes",
441-
"CurrentMode",
442-
"StartUpMode",
443-
"OnMode",
444-
"FeatureMap"
445-
],
433+
"Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
446434
"Refrigerator And Temperature Controlled Cabinet Mode": [
447435
"SupportedModes",
448436
"CurrentMode",
449-
"StartUpMode",
450-
"OnMode",
451437
"FeatureMap"
452438
],
453439
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],

src/app/zap-templates/zcl/zcl.json

+4-18
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
"washer-controls-cluster.xml",
126126
"water-heater-management-cluster.xml",
127127
"water-heater-mode-cluster.xml",
128+
"webrtc-provider-cluster.xml",
128129
"wifi-network-diagnostics-cluster.xml",
129130
"wifi-network-management-cluster.xml",
130131
"window-covering.xml",
@@ -280,8 +281,7 @@
280281
"ActiveModeThreshold",
281282
"RegisteredClients",
282283
"ICDCounter",
283-
"ClientsSupportedPerFabric",
284-
"MaximumCheckInBackOff"
284+
"ClientsSupportedPerFabric"
285285
],
286286
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
287287
"Operational Credentials": [
@@ -410,13 +410,7 @@
410410
"DSTOffsetListMaxSize"
411411
],
412412
"Temperature Control": ["SupportedTemperatureLevels"],
413-
"Dishwasher Mode": [
414-
"SupportedModes",
415-
"CurrentMode",
416-
"StartUpMode",
417-
"OnMode",
418-
"FeatureMap"
419-
],
413+
"Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
420414
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
421415
"Microwave Oven Control": [
422416
"CookTime",
@@ -430,18 +424,10 @@
430424
"WattRating",
431425
"FeatureMap"
432426
],
433-
"Laundry Washer Mode": [
434-
"SupportedModes",
435-
"CurrentMode",
436-
"StartUpMode",
437-
"OnMode",
438-
"FeatureMap"
439-
],
427+
"Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
440428
"Refrigerator And Temperature Controlled Cabinet Mode": [
441429
"SupportedModes",
442430
"CurrentMode",
443-
"StartUpMode",
444-
"OnMode",
445431
"FeatureMap"
446432
],
447433
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],

src/app/zap_cluster_list.json

+2
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
"LAUNDRY_DRYER_CONTROLS_CLUSTER": [],
132132
"WATER_HEATER_MANAGEMENT_CLUSTER": [],
133133
"WATER_HEATER_MODE_CLUSTER": [],
134+
"WEB_RTC_PROVIDER_CLUSTER": [],
134135
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
135136
"WINDOW_COVERING_CLUSTER": []
136137
},
@@ -310,6 +311,7 @@
310311
"WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"],
311312
"LAUNDRY_WASHER_CONTROLS_CLUSTER": ["laundry-washer-controls-server"],
312313
"LAUNDRY_DRYER_CONTROLS_CLUSTER": ["laundry-dryer-controls-server"],
314+
"WEB_RTC_PROVIDER_CLUSTER": [],
313315
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"],
314316
"WIFI_NETWORK_MANAGEMENT_CLUSTER": ["wifi-network-management-server"],
315317
"WINDOW_COVERING_CLUSTER": ["window-covering-server"],

0 commit comments

Comments
 (0)