Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera webrtc provider cluster #35779

Merged
merged 11 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
Expand Down
1 change: 1 addition & 0 deletions docs/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Generally regenerate using one of:
| 1294 | 0x50E | AccountLogin |
| 1295 | 0x50F | ContentControl |
| 1296 | 0x510 | ContentAppObserver |
| 1363 | 0x553 | WebRTCTransportProvider |
| 1366 | 0x556 | Chime |
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml";
Expand Down
145 changes: 145 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2024 Project CHIP Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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.
-->
<!--
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/WebRTC_Provider.adoc
Parameters: in-progress
Git: 0.9-fall2024-234-gf4d359001
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="General"/>
gmarcosb marked this conversation as resolved.
Show resolved Hide resolved

<enum name="StreamTypeEnum" type="enum8">
<cluster code="0x0553"/>
<cluster code="0x0554"/>
<item name="Internal" value="0x00"/>
<item name="Recording" value="0x01"/>
<item name="Analysis" value="0x02"/>
<item name="LiveView" value="0x03"/>
</enum>

<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"/>
<item name="IceFailed" value="0x00"/>
<item name="IceTimeout" value="0x01"/>
<item name="UserHangup" value="0x02"/>
<item name="UserBusy" value="0x03"/>
<item name="Replaced" value="0x04"/>
<item name="NoUserMedia" value="0x05"/>
<item name="InviteTimeout" value="0x06"/>
<item name="AnsweredElsewhere" value="0x07"/>
<item name="OutOfResources" value="0x08"/>
<item name="MediaTimeout" value="0x09"/>
<item name="LowPower" value="0x0A"/>
<item name="UnknownReason" value="0x0B"/>
</enum>

<struct name="ICEServerStruct" apiMaturity="provisional">
<cluster code="0x0553"/>
<cluster code="0x0554"/>
<item fieldId="1" name="urls" array="true" type="char_string"/>
<item fieldId="2" name="username" type="char_string" optional="true"/>
<item fieldId="3" name="credential" type="char_string" optional="true"/>
<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="int16u"/>
<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="int16u" isNullable="true"/>
<item fieldId="6" name="AudioStreamID" type="int16u" isNullable="true"/>
<item fieldId="7" name="MetadataOptions" type="WebRTCMetadataOptions" default="0x00" min="0x00" max="0x01"/>
</struct>

<cluster apiMaturity="provisional">
<domain name="Cameras"/>
<name>WebRTC Transport Provider</name>
<code>0x0553</code>
<define>WEBRTC_TRANSPORT_PROVIDER_CLUSTER</define>
<description>The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC.</description>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<globalAttribute code="0xFFFD" side="either" value="1"/>
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct">CurrentSessions</attribute>
<command code="0x01" source="client" name="SolicitOffer" optional="false" response="SolicitOfferResponse">
<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>
<arg id="1" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<arg id="2" name="VideoStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="3" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="4" name="ICEServers" array="true" type="ICEServerStruct" optional="true"/>
<arg id="5" name="ICETransportPolicy" type="char_string" optional="true"/>
<arg id="6" name="MetadataOptions" type="WebRTCMetadataOptions" optional="true" min="0x00" max="0x01"/>
</command>

<command code="0x02" source="server" name="SolicitOfferResponse" optional="false" disableDefaultResponse="true">
<description>This command SHALL be generated in response to a SolicitOffer command.</description>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
<arg id="2" name="DeferredOffer" type="boolean"/>
<arg id="3" name="VideoStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="4" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
</command>

<command code="0x03" source="client" name="ProvideOffer" optional="false" response="ProvideOfferResponse">
<description>This command allows an SDP Offer to be set and start a new session.</description>
<arg id="1" name="WebRTCSessionID" type="int16u" isNullable="true"/>
<arg id="2" name="SDP" type="char_string"/>
<arg id="3" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<arg id="4" name="VideoStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="5" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="6" name="ICEServers" array="true" type="ICEServerStruct" optional="true"/>
<arg id="7" name="ICETransportPolicy" type="char_string" optional="true"/>
<arg id="8" name="MetadataOptions" type="WebRTCMetadataOptions" optional="true" min="0x00" max="0x01"/>
</command>

<command code="0x04" source="server" name="ProvideOfferResponse" optional="false" disableDefaultResponse="true">
<description>This command contains information about the stream created as a response to the requestor&apos;s offer.</description>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
<arg id="2" name="VideoStreamID" type="int16u"/>
<arg id="3" name="AudioStreamID" type="int16u"/>
</command>

<command code="0x05" source="client" name="ProvideAnswer" optional="false">
<description>This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer.</description>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
<arg id="2" name="SDP" type="char_string"/>
</command>

<command code="0x06" source="client" name="ProvideICECandidate" optional="false">
<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>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
<arg id="2" name="ICECandidate" type="char_string"/>
</command>

<command code="0x07" source="client" name="EndSession" optional="false">
<description>This command instructs the stream provider to end the WebRTC session.</description>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
<arg id="2" name="Reason" type="WebRTCEndReasonEnum" default="0x0B" min="0x00" max="0x0B"/>
</command>

</cluster>
</configurator>
22 changes: 4 additions & 18 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"washer-controls-cluster.xml",
"water-heater-management-cluster.xml",
"water-heater-mode-cluster.xml",
"webrtc-provider-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
"wifi-network-management-cluster.xml",
"window-covering.xml",
Expand Down Expand Up @@ -286,8 +287,7 @@
"ActiveModeThreshold",
"RegisteredClients",
"ICDCounter",
"ClientsSupportedPerFabric",
"MaximumCheckInBackOff"
"ClientsSupportedPerFabric"
],
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
"Operational Credentials": [
Expand Down Expand Up @@ -416,13 +416,7 @@
"DSTOffsetListMaxSize"
],
"Temperature Control": ["SupportedTemperatureLevels"],
"Dishwasher Mode": [
"SupportedModes",
"CurrentMode",
"StartUpMode",
"OnMode",
"FeatureMap"
],
"Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Control": [
"CookTime",
Expand All @@ -436,18 +430,10 @@
"WattRating",
"FeatureMap"
],
"Laundry Washer Mode": [
"SupportedModes",
"CurrentMode",
"StartUpMode",
"OnMode",
"FeatureMap"
],
"Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Refrigerator And Temperature Controlled Cabinet Mode": [
"SupportedModes",
"CurrentMode",
"StartUpMode",
"OnMode",
"FeatureMap"
],
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
Expand Down
22 changes: 4 additions & 18 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"washer-controls-cluster.xml",
"water-heater-management-cluster.xml",
"water-heater-mode-cluster.xml",
"webrtc-provider-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
"wifi-network-management-cluster.xml",
"window-covering.xml",
Expand Down Expand Up @@ -280,8 +281,7 @@
"ActiveModeThreshold",
"RegisteredClients",
"ICDCounter",
"ClientsSupportedPerFabric",
"MaximumCheckInBackOff"
"ClientsSupportedPerFabric"
],
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
"Operational Credentials": [
Expand Down Expand Up @@ -410,13 +410,7 @@
"DSTOffsetListMaxSize"
],
"Temperature Control": ["SupportedTemperatureLevels"],
"Dishwasher Mode": [
"SupportedModes",
"CurrentMode",
"StartUpMode",
"OnMode",
"FeatureMap"
],
"Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Control": [
"CookTime",
Expand All @@ -430,18 +424,10 @@
"WattRating",
"FeatureMap"
],
"Laundry Washer Mode": [
"SupportedModes",
"CurrentMode",
"StartUpMode",
"OnMode",
"FeatureMap"
],
"Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Refrigerator And Temperature Controlled Cabinet Mode": [
"SupportedModes",
"CurrentMode",
"StartUpMode",
"OnMode",
"FeatureMap"
],
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"LAUNDRY_DRYER_CONTROLS_CLUSTER": [],
"WATER_HEATER_MANAGEMENT_CLUSTER": [],
"WATER_HEATER_MODE_CLUSTER": [],
"WEB_RTC_PROVIDER_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
"WINDOW_COVERING_CLUSTER": []
},
Expand Down Expand Up @@ -310,6 +311,7 @@
"WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"],
"LAUNDRY_WASHER_CONTROLS_CLUSTER": ["laundry-washer-controls-server"],
"LAUNDRY_DRYER_CONTROLS_CLUSTER": ["laundry-dryer-controls-server"],
"WEB_RTC_PROVIDER_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"],
"WIFI_NETWORK_MANAGEMENT_CLUSTER": ["wifi-network-management-server"],
"WINDOW_COVERING_CLUSTER": ["window-covering-server"],
Expand Down
Loading
Loading