Skip to content

Commit 774c245

Browse files
authored
WebRTC cluster XML changes for Spec ballot fixes (#37825)
* XML changes to WebRTC cluster based on Spec fixes in Spec PR#11309 * Run zap-regen. * Add missing description tag in the WebRTC cluster xml files and re-run zap-regen script.
1 parent ad19dee commit 774c245

File tree

21 files changed

+259
-201
lines changed

21 files changed

+259
-201
lines changed

src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml

+15-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
XML generated by Alchemy; DO NOT EDIT.
1919
Source: src/app_clusters/WebRTC_Provider.adoc
2020
Parameters: in-progress
21-
Git: 0.7-summer-2025-5-g06c4d5596
21+
Git: 0.7-summer-2025-285-g2a2bd1961
2222
-->
2323
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
2424
<domain name="Cameras"/>
@@ -54,16 +54,15 @@ Git: 0.7-summer-2025-5-g06c4d5596
5454
<item fieldId="4" name="CAID" type="int16u" optional="true"/>
5555
</struct>
5656

57-
<struct name="WebRTCSessionStruct" apiMaturity="provisional">
57+
<struct name="WebRTCSessionStruct" apiMaturity="provisional" isFabricScoped="true">
5858
<cluster code="0x0553"/>
5959
<cluster code="0x0554"/>
6060
<item fieldId="1" name="ID" type="int16u"/>
6161
<item fieldId="2" name="PeerNodeID" type="node_id"/>
62-
<item fieldId="3" name="PeerFabricIndex" type="fabric_idx"/>
63-
<item fieldId="4" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
64-
<item fieldId="5" name="VideoStreamID" type="int16u" isNullable="true"/>
65-
<item fieldId="6" name="AudioStreamID" type="int16u" isNullable="true"/>
66-
<item fieldId="7" name="MetadataOptions" type="WebRTCMetadataOptionsBitmap" default="0x00" min="0x00" max="0x01"/>
62+
<item fieldId="3" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
63+
<item fieldId="4" name="VideoStreamID" type="int16u" isNullable="true"/>
64+
<item fieldId="5" name="AudioStreamID" type="int16u" isNullable="true"/>
65+
<item fieldId="6" name="MetadataOptions" type="WebRTCMetadataOptionsBitmap" default="0x00" min="0x00" max="0x01"/>
6766
</struct>
6867

6968
<cluster apiMaturity="provisional">
@@ -75,8 +74,11 @@ Git: 0.7-summer-2025-5-g06c4d5596
7574
<client init="false" tick="false">true</client>
7675
<server init="false" tick="false">true</server>
7776
<globalAttribute code="0xFFFD" side="either" value="1"/>
78-
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct">CurrentSessions</attribute>
79-
<command code="0x01" source="client" name="SolicitOffer" optional="false" response="SolicitOfferResponse">
77+
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct">
78+
<description>CurrentSessions</description>
79+
<access op="read" privilege="manage"/>
80+
</attribute>
81+
<command code="0x01" source="client" name="SolicitOffer" isFabricScoped="true" optional="false" response="SolicitOfferResponse">
8082
<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>
8183
<quality largeMessage="true"/>
8284
<arg id="1" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
@@ -96,7 +98,7 @@ Git: 0.7-summer-2025-5-g06c4d5596
9698
<arg id="4" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
9799
</command>
98100

99-
<command code="0x03" source="client" name="ProvideOffer" optional="false" response="ProvideOfferResponse">
101+
<command code="0x03" source="client" name="ProvideOffer" isFabricScoped="true" optional="false" response="ProvideOfferResponse">
100102
<description>This command allows an SDP Offer to be set and start a new session.</description>
101103
<quality largeMessage="true"/>
102104
<arg id="1" name="WebRTCSessionID" type="int16u" isNullable="true"/>
@@ -117,21 +119,21 @@ Git: 0.7-summer-2025-5-g06c4d5596
117119
<arg id="3" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
118120
</command>
119121

120-
<command code="0x05" source="client" name="ProvideAnswer" optional="false">
122+
<command code="0x05" source="client" name="ProvideAnswer" isFabricScoped="true" optional="false">
121123
<description>This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer.</description>
122124
<quality largeMessage="true"/>
123125
<arg id="1" name="WebRTCSessionID" type="int16u"/>
124126
<arg id="2" name="SDP" type="char_string"/>
125127
</command>
126128

127-
<command code="0x06" source="client" name="ProvideICECandidates" optional="false">
129+
<command code="0x06" source="client" name="ProvideICECandidates" isFabricScoped="true" optional="false">
128130
<description>This command allows for string based https://rfc-editor.org/rfc/rfc8839#section-5.1 generated after the initial Offer / Answer exchange, via a JSEP https://datatracker.ietf.org/doc/html/rfc9429#section-4.1.20 event, a DOM https://www.w3.org/TR/webrtc/#dom-rtcpeerconnectioniceevent event, or other WebRTC compliant implementations, to be added to a session during the gathering phase.</description>
129131
<quality largeMessage="true"/>
130132
<arg id="1" name="WebRTCSessionID" type="int16u"/>
131133
<arg id="2" name="ICECandidates" array="true" type="char_string" minLength="1"/>
132134
</command>
133135

134-
<command code="0x07" source="client" name="EndSession" optional="false">
136+
<command code="0x07" source="client" name="EndSession" isFabricScoped="true" optional="false">
135137
<description>This command instructs the stream provider to end the WebRTC session.</description>
136138
<quality largeMessage="true"/>
137139
<arg id="1" name="WebRTCSessionID" type="int16u"/>

src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml

+6-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
XML generated by Alchemy; DO NOT EDIT.
1919
Source: src/app_clusters/WebRTC_Requestor.adoc
2020
Parameters: in-progress
21-
Git: 0.7-summer-2025-5-g06c4d5596
21+
Git: 0.7-summer-2025-285-g2a2bd1961
2222
-->
2323
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
2424
<domain name="Cameras"/>
@@ -31,7 +31,10 @@ Git: 0.7-summer-2025-5-g06c4d5596
3131
<client init="false" tick="false">true</client>
3232
<server init="false" tick="false">true</server>
3333
<globalAttribute code="0xFFFD" side="either" value="1"/>
34-
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct" default="0">CurrentSessions</attribute>
34+
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct" default="0">
35+
<description>CurrentSessions</description>
36+
<access op="read" privilege="administer"/>
37+
</attribute>
3538
<command code="0x01" source="client" name="Offer" optional="false">
3639
<description>This command provides the stream requestor with WebRTC session details.</description>
3740
<quality largeMessage="true"/>
@@ -59,7 +62,7 @@ Git: 0.7-summer-2025-5-g06c4d5596
5962
<description>This command notifies the stream requestor that the provider has ended the WebRTC session.</description>
6063
<quality largeMessage="true"/>
6164
<arg id="1" name="WebRTCSessionID" type="int16u"/>
62-
<arg id="2" name="Reason" type="WebRTCEndReasonEnum" min="0x00" max="0x0B"/>
65+
<arg id="2" name="Reason" type="WebRTCEndReasonEnum" default="0x0B" min="0x00" max="0x0B"/>
6366
</command>
6467

6568
</cluster>

src/controller/data_model/controller-clusters.matter

+19-19
Original file line numberDiff line numberDiff line change
@@ -10114,17 +10114,17 @@ provisional cluster WebRTCTransportProvider = 1363 {
1011410114
optional int16u caid = 4;
1011510115
}
1011610116

10117-
struct WebRTCSessionStruct {
10117+
fabric_scoped struct WebRTCSessionStruct {
1011810118
int16u id = 1;
1011910119
node_id peerNodeID = 2;
10120-
fabric_idx peerFabricIndex = 3;
10121-
StreamUsageEnum streamUsage = 4;
10122-
nullable int16u videoStreamID = 5;
10123-
nullable int16u audioStreamID = 6;
10124-
WebRTCMetadataOptionsBitmap metadataOptions = 7;
10120+
StreamUsageEnum streamUsage = 3;
10121+
nullable int16u videoStreamID = 4;
10122+
nullable int16u audioStreamID = 5;
10123+
WebRTCMetadataOptionsBitmap metadataOptions = 6;
10124+
fabric_idx fabricIndex = 254;
1012510125
}
1012610126

10127-
readonly attribute WebRTCSessionStruct currentSessions[] = 0;
10127+
readonly attribute access(read: manage) WebRTCSessionStruct currentSessions[] = 0;
1012810128
readonly attribute command_id generatedCommandList[] = 65528;
1012910129
readonly attribute command_id acceptedCommandList[] = 65529;
1013010130
readonly attribute event_id eventList[] = 65530;
@@ -10181,15 +10181,15 @@ provisional cluster WebRTCTransportProvider = 1363 {
1018110181
}
1018210182

1018310183
/** 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. */
10184-
command SolicitOffer(SolicitOfferRequest): SolicitOfferResponse = 1;
10184+
fabric command SolicitOffer(SolicitOfferRequest): SolicitOfferResponse = 1;
1018510185
/** This command allows an SDP Offer to be set and start a new session. */
10186-
command ProvideOffer(ProvideOfferRequest): ProvideOfferResponse = 3;
10186+
fabric command ProvideOffer(ProvideOfferRequest): ProvideOfferResponse = 3;
1018710187
/** This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer. */
10188-
command ProvideAnswer(ProvideAnswerRequest): DefaultSuccess = 5;
10188+
fabric command ProvideAnswer(ProvideAnswerRequest): DefaultSuccess = 5;
1018910189
/** This command allows for string based https://rfc-editor.org/rfc/rfc8839#section-5.1 generated after the initial Offer / Answer exchange, via a JSEP https://datatracker.ietf.org/doc/html/rfc9429#section-4.1.20 event, a DOM https://www.w3.org/TR/webrtc/#dom-rtcpeerconnectioniceevent event, or other WebRTC compliant implementations, to be added to a session during the gathering phase. */
10190-
command ProvideICECandidates(ProvideICECandidatesRequest): DefaultSuccess = 6;
10190+
fabric command ProvideICECandidates(ProvideICECandidatesRequest): DefaultSuccess = 6;
1019110191
/** This command instructs the stream provider to end the WebRTC session. */
10192-
command EndSession(EndSessionRequest): DefaultSuccess = 7;
10192+
fabric command EndSession(EndSessionRequest): DefaultSuccess = 7;
1019310193
}
1019410194

1019510195
/** The WebRTC transport requestor cluster provides a way for stream consumers (e.g. Matter Stream Viewer) to establish a WebRTC connection with a stream provider. */
@@ -10229,17 +10229,17 @@ provisional cluster WebRTCTransportRequestor = 1364 {
1022910229
optional int16u caid = 4;
1023010230
}
1023110231

10232-
struct WebRTCSessionStruct {
10232+
fabric_scoped struct WebRTCSessionStruct {
1023310233
int16u id = 1;
1023410234
node_id peerNodeID = 2;
10235-
fabric_idx peerFabricIndex = 3;
10236-
StreamUsageEnum streamUsage = 4;
10237-
nullable int16u videoStreamID = 5;
10238-
nullable int16u audioStreamID = 6;
10239-
WebRTCMetadataOptionsBitmap metadataOptions = 7;
10235+
StreamUsageEnum streamUsage = 3;
10236+
nullable int16u videoStreamID = 4;
10237+
nullable int16u audioStreamID = 5;
10238+
WebRTCMetadataOptionsBitmap metadataOptions = 6;
10239+
fabric_idx fabricIndex = 254;
1024010240
}
1024110241

10242-
readonly attribute WebRTCSessionStruct currentSessions[] = 0;
10242+
readonly attribute access(read: administer) WebRTCSessionStruct currentSessions[] = 0;
1024310243
readonly attribute command_id generatedCommandList[] = 65528;
1024410244
readonly attribute command_id acceptedCommandList[] = 65529;
1024510245
readonly attribute event_id eventList[] = 65530;

src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -63174,6 +63174,11 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
6317463174

6317563175
public void readCurrentSessionsAttribute(
6317663176
CurrentSessionsAttributeCallback callback) {
63177+
readCurrentSessionsAttributeWithFabricFilter(callback, true);
63178+
}
63179+
63180+
public void readCurrentSessionsAttributeWithFabricFilter(
63181+
CurrentSessionsAttributeCallback callback, boolean isFabricFiltered) {
6317763182
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SESSIONS_ATTRIBUTE_ID);
6317863183

6317963184
readAttribute(new ReportCallbackImpl(callback, path) {
@@ -63182,7 +63187,7 @@ public void onSuccess(byte[] tlv) {
6318263187
List<ChipStructs.WebRTCTransportProviderClusterWebRTCSessionStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
6318363188
callback.onSuccess(value);
6318463189
}
63185-
}, CURRENT_SESSIONS_ATTRIBUTE_ID, true);
63190+
}, CURRENT_SESSIONS_ATTRIBUTE_ID, isFabricFiltered);
6318663191
}
6318763192

6318863193
public void subscribeCurrentSessionsAttribute(
@@ -63502,6 +63507,11 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
6350263507

6350363508
public void readCurrentSessionsAttribute(
6350463509
CurrentSessionsAttributeCallback callback) {
63510+
readCurrentSessionsAttributeWithFabricFilter(callback, true);
63511+
}
63512+
63513+
public void readCurrentSessionsAttributeWithFabricFilter(
63514+
CurrentSessionsAttributeCallback callback, boolean isFabricFiltered) {
6350563515
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SESSIONS_ATTRIBUTE_ID);
6350663516

6350763517
readAttribute(new ReportCallbackImpl(callback, path) {
@@ -63510,7 +63520,7 @@ public void onSuccess(byte[] tlv) {
6351063520
List<ChipStructs.WebRTCTransportRequestorClusterWebRTCSessionStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
6351163521
callback.onSuccess(value);
6351263522
}
63513-
}, CURRENT_SESSIONS_ATTRIBUTE_ID, true);
63523+
}, CURRENT_SESSIONS_ATTRIBUTE_ID, isFabricFiltered);
6351463524
}
6351563525

6351663526
public void subscribeCurrentSessionsAttribute(

0 commit comments

Comments
 (0)