Skip to content

Commit 48e0d3f

Browse files
committed
Start of camera clusters
Generated using Alchemy: https://github.com/project-chip/alchemy
1 parent a8b4a5e commit 48e0d3f

14 files changed

+1646
-141
lines changed

.github/workflows/tests.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,13 @@ jobs:
9191
--no-print \
9292
--log-level info \
9393
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
94+
src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml \
95+
src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml \
96+
src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \
9497
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
9598
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
9699
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \
100+
src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml \
97101
src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \
98102
src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \
99103
src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml \
@@ -197,6 +201,8 @@ jobs:
197201
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
198202
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
199203
src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \
204+
src/app/zap-templates/zcl/data-model/chip/web-rtc-provider-cluster.xml \
205+
src/app/zap-templates/zcl/data-model/chip/web-rtc-requestor-cluster.xml \
200206
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
201207
src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \
202208
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \

docs/zap_clusters.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@ Generally regenerate using one of:
8989
| 157 | 0x9D | EnergyEvseMode |
9090
| 158 | 0x9E | WaterHeaterMode |
9191
| 159 | 0x9F | DeviceEnergyManagementMode |
92-
| 160 | 0xA0 | CameraAvStreamManagement |
93-
| 161 | 0xA1 | CameraAvSettingsUserLevelManagement |
94-
| 162 | 0xA2 | WebRtcTransportProvider |
95-
| 163 | 0xA3 | WebRtcTransportRequester |
96-
| 164 | 0xA4 | PushAvStreamTransport |
97-
| 164 | 0xA5 | Chime |
9892
| 257 | 0x101 | DoorLock |
9993
| 258 | 0x102 | WindowCovering |
10094
| 259 | 0x103 | BarrierControl |
@@ -138,6 +132,12 @@ Generally regenerate using one of:
138132
| 1294 | 0x50E | AccountLogin |
139133
| 1295 | 0x50F | ContentControl |
140134
| 1296 | 0x510 | ContentAppObserver |
135+
| 1361 | 0x551 | CameraAvStreamManagement |
136+
| 1362 | 0x552 | CameraAvSettingsUserLevelManagement |
137+
| 1363 | 0x553 | WebRtcTransportProvider |
138+
| 1364 | 0x554 | WebRtcTransportRequestor |
139+
| 1365 | 0x555 | PushAvStreamTransport |
140+
| 1366 | 0x556 | Chime |
141141
| 1872 | 0x750 | EcosystemInformation |
142142
| 1873 | 0x751 | CommissionerControl |
143143
| 2820 | 0xB04 | ElectricalMeasurement |

scripts/rules.matterlint

+6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ load "../src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml";
1414
load "../src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml";
1515
load "../src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml";
1616
load "../src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml";
17+
load "../src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml";
18+
load "../src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml";
1719
load "../src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml";
20+
load "../src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml";
1821
load "../src/app/zap-templates/zcl/data-model/chip/chip-ota.xml";
1922
load "../src/app/zap-templates/zcl/data-model/chip/chip-types.xml";
2023
load "../src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml";
@@ -63,6 +66,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml";
6366
load "../src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml";
6467
load "../src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml";
6568
load "../src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml";
69+
load "../src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml";
6670
load "../src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml";
6771
load "../src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml";
6872
load "../src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml";
@@ -107,6 +111,8 @@ load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
107111
load "../src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml";
108112
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml";
109113
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml";
114+
load "../src/app/zap-templates/zcl/data-model/chip/web-rtc-provider-cluster.xml";
115+
load "../src/app/zap-templates/zcl/data-model/chip/web-rtc-requestor-cluster.xml";
110116
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml";
111117
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml";
112118
load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml";

src/app/zap-templates/zcl/data-model/all.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125
<xi:include href="draft/onoff-switch-configuration-cluster.xml" />
126126
<xi:include href="draft/camera-av-stream-management-cluster.xml" />
127127
<xi:include href="draft/camera-av-settings-user-level-management-cluster.xml" />
128-
<xi:include href="draft/web-rtc-transport-provider-cluster.xml" />
129-
<xi:include href="draft/web-rtc-transport-requester-cluster.xml" />
128+
<xi:include href="draft/web-rtc-provider-cluster.xml" />
129+
<xi:include href="draft/web-rtc-requestor-cluster.xml" />
130130
<xi:include href="draft/push-av-stream-transport-cluster.xml" />
131131
<xi:include href="draft/chime.xml" />
132132
<xi:include href="chip/sample-mei-cluster.xml" />

src/app/zap-templates/zcl/data-model/chip/global-enums.xml

+49-3
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
1817
<!--
1918
TODO: Make these structures global rather than defining them for each cluster.
2019
This depends on the ability to define global structs via XML tags.
2120
see: https://github.com/project-chip/connectedhomeip/issues/29818
2221
-->
23-
2422
<configurator>
2523
<domain name="CHIP"/>
26-
2724
<enum name="AtomicRequestTypeEnum" type="enum8">
2825
<item name="BeginWrite" value="0x00"/>
2926
<item name="CommitWrite" value="0x01"/>
@@ -34,10 +31,59 @@ TODO: Make these structures global rather than defining them for each cluster.
3431
These are test global items (no cluster attached) for testing only.
3532
Their usage is defined for UnitTestCluster only.
3633
-->
34+
<enum name="MeasurementTypeEnum" type="enum16">
35+
<item name="Unspecified" value="0x0000"/>
36+
<item name="Voltage" value="0x0001"/>
37+
<item name="ActiveCurrent" value="0x0002"/>
38+
<item name="ReactiveCurrent" value="0x0003"/>
39+
<item name="ApparentCurrent" value="0x0004"/>
40+
<item name="ActivePower" value="0x0005"/>
41+
<item name="ReactivePower" value="0x0006"/>
42+
<item name="ApparentPower" value="0x0007"/>
43+
<item name="RMSVoltage" value="0x0008"/>
44+
<item name="RMSCurrent" value="0x0009"/>
45+
<item name="RMSPower" value="0x000A"/>
46+
<item name="Frequency" value="0x000B"/>
47+
<item name="PowerFactor" value="0x000C"/>
48+
<item name="NeutralCurrent" value="0x000D"/>
49+
<item name="ElectricalEnergy" value="0x000E"/>
50+
</enum>
51+
52+
<enum name="ServerAttributionContextInformation" type="enum8">
53+
<item name="ServerAutomationRule" value="0x0B"/>
54+
<item name="ServerSchedule" value="0x0C"/>
55+
<item name="ServerTimer" value="0x0D"/>
56+
<item name="Security" value="0x0D"/>
57+
<item name="DemandResponseEventOrSimilarServiceProviderSignalling" value="0x0E"/>
58+
<item name="PhysicalInteractionOnDevice" value="0x0F"/>
59+
<item name="InteractionViaAProtocolNotDefinedInThisSpecification" value="0x10"/>
60+
</enum>
61+
62+
<enum name="SoftwareVersionCertificationStatusEnum" type="enum8">
63+
<item name="dev-test" value="0x00"/>
64+
<item name="provisional" value="0x01"/>
65+
<item name="certified" value="0x02"/>
66+
<item name="revoked" value="0x03"/>
67+
</enum>
68+
69+
<enum name="SuppliedAttributionContextInformation" type="enum8">
70+
<item name="DefaultClientAction" value="0x00"/>
71+
<item name="UserInteraction" value="0x01"/>
72+
<item name="ClientAutomationRule" value="0x02"/>
73+
<item name="ClientSchedule" value="0x03"/>
74+
<item name="ClientTimer" value="0x04"/>
75+
</enum>
76+
3777
<enum name="TestGlobalEnum" type="enum8">
3878
<item name="SomeValue" value="0x00"/>
3979
<item name="SomeOtherValue" value="0x01"/>
4080
<item name="FinalValue" value="0x02"/>
4181
</enum>
4282

83+
<enum name="ThreeLevelAutoEnum" type="enum8">
84+
<item name="Low" value="0x00"/>
85+
<item name="Medium" value="0x01"/>
86+
<item name="High" value="0x02"/>
87+
<item name="Auto" value="0x03"/>
88+
</enum>
4389
</configurator>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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/CameraAVSettingsUserLevelManagement.adoc
20+
Parameters: in-progress
21+
Git: 0.7-fall2024-ncr-1155-g78ec59e8a-dirty
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24+
xsi:noNamespaceSchemaLocation="../../zcl.xsd">
25+
<domain name="General"/>
26+
<struct name="MPTZStruct" apiMaturity="provisional">
27+
<cluster code="0x0552"/>
28+
<item fieldId="0" name="MPan" type="int16s" isNullable="true" optional="true" default="0" min="-180" max="179"/>
29+
<item fieldId="1" name="MTilt" type="int8s" isNullable="true" optional="true" default="0" min="-90" max="90"/>
30+
<item fieldId="2" name="MZoom" type="int16u" isNullable="true" optional="true" default="1"/>
31+
</struct>
32+
33+
<cluster apiMaturity="provisional">
34+
<domain name="General" />
35+
<name>Camera AV Settings User Level Management</name>
36+
<code>0x0552</code>
37+
<define>CAMERA_AV_SETTINGS_USER_LEVEL_MANAGEMENT_CLUSTER</define>
38+
<description/>
39+
<client init="false" tick="false">true</client>
40+
<features>
41+
<feature bit="0" code="MPTZ" name="MechanicalPTZ" summary="Mechanical PTZ supported">
42+
<optionalConform choice="a" more="true" min="1"/>
43+
</feature>
44+
<feature bit="1" code="DPTZ" name="DigitalPTZ" summary="Digital PTZ supported">
45+
<optionalConform choice="a" more="true" min="1"/>
46+
</feature>
47+
</features>
48+
<server init="false" tick="false">true</server>
49+
<globalAttribute code="0xFFFD" side="either" value="1"/>
50+
<attribute code="0x0000" side="server" define="MPTZ" type="MPTZStruct" optional="true">Mptz</attribute>
51+
<attribute code="0x0001" side="server" define="MAX_PRESETS" type="int8u" optional="true">MaxPresets</attribute>
52+
<attribute code="0x0002" side="server" define="PRESET_MPTZ_TABLE" type="array" entryType="MPTZStruct" optional="true">PresetMptzTable</attribute>
53+
<attribute code="0x0003" side="server" define="MPTZ_RELATIVE_MOVE" type="boolean" optional="true">MptzRelativeMove</attribute>
54+
<attribute code="0x0004" side="server" define="DPTZ_RELATIVE_MOVE" type="array" entryType="PerStreamStruct" optional="true">DptzRelativeMove</attribute>
55+
<command code="0x00" source="client" name="MptzSet" optional="true">
56+
<description>This command SHALL set the values for the pan, tilt, and zoom in the mechanical PTZ.</description>
57+
<arg id="0" name="NewPTZ" type="MPTZStruct" optional="true"/>
58+
<arg id="1" name="PresetID" type="int8u" optional="true"/>
59+
</command>
60+
61+
<command code="0x01" source="client" name="MptzRelativeMove" optional="true">
62+
<description>This command SHALL move the device by the values for pan, tilt, and zoom relative to the currently defined position.</description>
63+
<arg id="0" name="Pan" type="int16s" default="0" min="-359" max="359"/>
64+
<arg id="1" name="Tilt" type="int16s" default="0" min="-180" max="180"/>
65+
<arg id="2" name="Zoom" type="int16s" default="0" min="-100" max="100"/>
66+
</command>
67+
68+
<command code="0x02" source="client" name="SetAsPreset" optional="true">
69+
<description>This command SHALL set the next available index in the PresetMptzTable to the current, known, values of pan, tilt, and zoom on the camera.</description>
70+
</command>
71+
72+
<command code="0x03" source="client" name="DptzSetViewport" optional="true">
73+
<description>This command SHALL set the viewport in the digital PTZ for a specific Video Stream.</description>
74+
<arg id="0" name="VideoStreamID" type="VideoStreamID"/>
75+
<arg id="1" name="Viewport" type="ViewportStruct"/>
76+
</command>
77+
78+
<command code="0x04" source="client" name="DptzRelativeMove" optional="true">
79+
<description>This command SHALL change the viewports location by the amount specified in a relative fashion.</description>
80+
<arg id="0" name="VideoStreamID" type="VideoStreamID"/>
81+
<arg id="1" name="Pan" type="int16s" default="0"/>
82+
<arg id="2" name="Tilt" type="int16s" default="0"/>
83+
<arg id="3" name="Zoom" type="int8s" default="0" min="-100" max="100"/>
84+
</command>
85+
86+
</cluster>
87+
</configurator>

0 commit comments

Comments
 (0)