Handle change of DPTZRelativeMove -> DPTZStreams (list of int to list of struct) (#38850)
* XML update of CameraAVStreamManagement from Alchemy
* Zap regen
* Align with updated XML
* Adding Push AV
* Zap regen after adding PushAV
* Restyled by whitespace
* Restyled by clang-format
* Restyled by prettier-json
* Handle watermark in snapshot stream modify
Correctly handle setting of nightvision based on the HAL
* Restyled by whitespace
* Restyled by clang-format
* Revert optattr setting
* Restyled by clang-format
* Align with latest PR that makes enum values contiguous
* Add regen code
* Align with latest camera spec.
Change DPTZRelativeMove attribute to DPTZStreams, which is now a struct that takes a viewport and a stream ID.
Handle plumbing in the app to correctly set values based on stream allocation and deallocation.
* Zap Regen after merge with master
* Restyled by whitespace
* Restyled by clang-format
* Remove debug log
* Zap formatting fixes
* Add static cast
* Remove inadvertant inclusions
* Update AVSUM 2_1 to reflect the new attribute name and type
* Zap changes
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index a32d40e..2eb78f2 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -7287,10 +7287,15 @@
int16u y2 = 3;
}
+ struct DPTZStruct {
+ int16u videoStreamID = 0;
+ ViewportStruct viewport = 1;
+ }
+
readonly attribute optional MPTZStruct MPTZPosition = 0;
readonly attribute optional int8u maxPresets = 1;
readonly attribute optional MPTZPresetStruct MPTZPresets[] = 2;
- readonly attribute optional int16u DPTZRelativeMove[] = 3;
+ readonly attribute optional DPTZStruct DPTZStreams[] = 3;
readonly attribute optional int8u zoomMax = 4;
readonly attribute optional int16s tiltMin = 5;
readonly attribute optional int16s tiltMax = 6;
@@ -7341,7 +7346,7 @@
/** This command SHALL set the values for the pan, tilt, and zoom in the mechanical PTZ. */
command MPTZSetPosition(MPTZSetPositionRequest): DefaultSuccess = 0;
- /** This command SHALL move the device by the delta values relative to the currently defined position. */
+ /** This command SHALL move the camera by the delta values relative to the currently defined position. */
command MPTZRelativeMove(MPTZRelativeMoveRequest): DefaultSuccess = 1;
/** This command SHALL move the camera to the positions specified by the Preset passed. */
command MPTZMoveToPreset(MPTZMoveToPresetRequest): DefaultSuccess = 2;
@@ -7351,7 +7356,7 @@
command MPTZRemovePreset(MPTZRemovePresetRequest): DefaultSuccess = 4;
/** This command allows for setting the digital viewport for a specific Video Stream. */
command DPTZSetViewport(DPTZSetViewportRequest): DefaultSuccess = 5;
- /** This command SHALL change the viewports location by the amount specified in a relative fashion. */
+ /** This command SHALL change the per stream viewport by the amount specified in a relative fashion. */
command DPTZRelativeMove(DPTZRelativeMoveRequest): DefaultSuccess = 6;
}
@@ -9699,7 +9704,7 @@
callback attribute MPTZPosition;
ram attribute maxPresets default = 5;
callback attribute MPTZPresets;
- callback attribute DPTZRelativeMove;
+ callback attribute DPTZStreams;
ram attribute zoomMax default = 100;
ram attribute tiltMin default = -90;
ram attribute tiltMax default = 90;
diff --git a/examples/all-clusters-app/all-clusters-common/include/camera-av-settings-user-level-management-instance.h b/examples/all-clusters-app/all-clusters-common/include/camera-av-settings-user-level-management-instance.h
index 8132a8c..ea17e8d 100644
--- a/examples/all-clusters-app/all-clusters-common/include/camera-av-settings-user-level-management-instance.h
+++ b/examples/all-clusters-app/all-clusters-common/include/camera-av-settings-user-level-management-instance.h
@@ -33,12 +33,15 @@
~AVSettingsUserLevelManagementDelegate() = default;
bool CanChangeMPTZ() override;
- bool IsValidVideoStreamID(uint16_t videoStreamID) override;
CHIP_ERROR LoadMPTZPresets(std::vector<MPTZPresetHelper> & mptzPresetHelpers) override;
- CHIP_ERROR LoadDPTZRelativeMove(std::vector<uint16_t> dptzRelativeMove) override;
+ CHIP_ERROR LoadDPTZStreams(std::vector<Structs::DPTZStruct::Type> dptzStream) override;
CHIP_ERROR PersistentAttributesLoadedCallback() override;
+ virtual void VideoStreamAllocated(uint16_t aStreamID) override;
+ virtual void VideoStreamDeallocated(uint16_t aStreamID) override;
+ virtual void DefaultViewportUpdated(Structs::ViewportStruct::Type aViewport) override;
+
/**
* delegate command handlers
*/
@@ -52,7 +55,8 @@
Protocols::InteractionModel::Status MPTZRemovePreset(uint8_t aPreset) override;
Protocols::InteractionModel::Status DPTZSetViewport(uint16_t aVideoStreamID, Structs::ViewportStruct::Type aViewport) override;
Protocols::InteractionModel::Status DPTZRelativeMove(uint16_t aVideoStreamID, Optional<int16_t> aDeltaX,
- Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta) override;
+ Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta,
+ Structs::ViewportStruct::Type & aViewport) override;
};
void Shutdown();
diff --git a/examples/all-clusters-app/all-clusters-common/src/camera-av-settings-user-level-management-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/camera-av-settings-user-level-management-stub.cpp
index 2523e6f..335e987 100644
--- a/examples/all-clusters-app/all-clusters-common/src/camera-av-settings-user-level-management-stub.cpp
+++ b/examples/all-clusters-app/all-clusters-common/src/camera-av-settings-user-level-management-stub.cpp
@@ -46,12 +46,26 @@
return true;
}
-bool AVSettingsUserLevelManagementDelegate::IsValidVideoStreamID(uint16_t aVideoStreamID)
+void AVSettingsUserLevelManagementDelegate::VideoStreamAllocated(uint16_t aStreamID)
{
- // The server needs to verify that the provided Video Stream ID is valid and known and subject to digital modification
- // The camera app needs to also have an instance of AV Stream Management, querying that to determine validity of the provided
- // id.
- return true;
+ // The app needs to invoke this whenever the AV Stream Manager allocates a video stream; this informs the server of the
+ // id that is now subject to DPTZ, and the default viewport of the device
+ Structs::ViewportStruct::Type viewport = { 0, 0, 1920, 1080 };
+ this->GetServer()->AddMoveCapableVideoStream(aStreamID, viewport);
+}
+
+void AVSettingsUserLevelManagementDelegate::VideoStreamDeallocated(uint16_t aStreamID)
+{
+ // The app needs to invoke this whenever the AV Stream Manager deallocates a video stream; this informs the server of the
+ // deallocated id that is now not subject to DPTZ
+ this->GetServer()->RemoveMoveCapableVideoStream(aStreamID);
+}
+
+void AVSettingsUserLevelManagementDelegate::DefaultViewportUpdated(Structs::ViewportStruct::Type aViewport)
+{
+ // The app needs to invoke this whenever the AV Stream Manager updates the device level default Viewport. This informs
+ // the server of the new viewport that shall be appled to all known streams.
+ this->GetServer()->UpdateMoveCapableVideoStreams(aViewport);
}
Status AVSettingsUserLevelManagementDelegate::MPTZSetPosition(Optional<int16_t> aPan, Optional<int16_t> aTilt,
@@ -109,12 +123,17 @@
}
Status AVSettingsUserLevelManagementDelegate::DPTZRelativeMove(uint16_t aVideoStreamID, Optional<int16_t> aDeltaX,
- Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta)
+ Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta,
+ Structs::ViewportStruct::Type & aViewport)
{
// The Cluster implementation has ensured that the videoStreamID represents a valid stream.
- // The application needs to interact with its instance of AVStreamManagement to access the stream, validate the viewport
- // and set the new values for the viewpoort based on the pixel movement requested
+ // The application needs to interact with its instance of AVStreamManagement to access the stream, validate
+ // new dimensions after application of the deltas, and set the new values for the viewport based on the pixel movement
+ // requested
+ // The passed in viewport is empty, and needs to be populated by the delegate with the value of the viewport after
+ // applying all deltas within the constraints of the sensor.
//
+ aViewport = { 0, 0, 1920, 1080 };
return Status::Success;
}
@@ -124,9 +143,9 @@
return CHIP_NO_ERROR;
}
-CHIP_ERROR AVSettingsUserLevelManagementDelegate::LoadDPTZRelativeMove(std::vector<uint16_t> dptzRelativeMove)
+CHIP_ERROR AVSettingsUserLevelManagementDelegate::LoadDPTZStreams(std::vector<DPTZStruct> dptzStreams)
{
- dptzRelativeMove.clear();
+ dptzStreams.clear();
return CHIP_NO_ERROR;
}
@@ -156,7 +175,7 @@
CameraAvSettingsUserLevelManagement::OptionalAttributes::kMptzPosition,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kMaxPresets,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kMptzPresets,
- CameraAvSettingsUserLevelManagement::OptionalAttributes::kDptzRelativeMove,
+ CameraAvSettingsUserLevelManagement::OptionalAttributes::kDptzStreams,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kZoomMax,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kTiltMin,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kTiltMax,
diff --git a/examples/camera-app/camera-common/camera-app.matter b/examples/camera-app/camera-common/camera-app.matter
index 580e455..ab983b8 100644
--- a/examples/camera-app/camera-common/camera-app.matter
+++ b/examples/camera-app/camera-common/camera-app.matter
@@ -2385,10 +2385,15 @@
int16u y2 = 3;
}
+ struct DPTZStruct {
+ int16u videoStreamID = 0;
+ ViewportStruct viewport = 1;
+ }
+
readonly attribute optional MPTZStruct MPTZPosition = 0;
readonly attribute optional int8u maxPresets = 1;
readonly attribute optional MPTZPresetStruct MPTZPresets[] = 2;
- readonly attribute optional int16u DPTZRelativeMove[] = 3;
+ readonly attribute optional DPTZStruct DPTZStreams[] = 3;
readonly attribute optional int8u zoomMax = 4;
readonly attribute optional int16s tiltMin = 5;
readonly attribute optional int16s tiltMax = 6;
@@ -2439,7 +2444,7 @@
/** This command SHALL set the values for the pan, tilt, and zoom in the mechanical PTZ. */
command MPTZSetPosition(MPTZSetPositionRequest): DefaultSuccess = 0;
- /** This command SHALL move the device by the delta values relative to the currently defined position. */
+ /** This command SHALL move the camera by the delta values relative to the currently defined position. */
command MPTZRelativeMove(MPTZRelativeMoveRequest): DefaultSuccess = 1;
/** This command SHALL move the camera to the positions specified by the Preset passed. */
command MPTZMoveToPreset(MPTZMoveToPresetRequest): DefaultSuccess = 2;
@@ -2449,7 +2454,7 @@
command MPTZRemovePreset(MPTZRemovePresetRequest): DefaultSuccess = 4;
/** This command allows for setting the digital viewport for a specific Video Stream. */
command DPTZSetViewport(DPTZSetViewportRequest): DefaultSuccess = 5;
- /** This command SHALL change the viewports location by the amount specified in a relative fashion. */
+ /** This command SHALL change the per stream viewport by the amount specified in a relative fashion. */
command DPTZRelativeMove(DPTZRelativeMoveRequest): DefaultSuccess = 6;
}
@@ -3206,7 +3211,7 @@
callback attribute MPTZPosition;
ram attribute maxPresets default = 5;
callback attribute MPTZPresets;
- callback attribute DPTZRelativeMove;
+ callback attribute DPTZStreams;
ram attribute zoomMax default = 100;
ram attribute tiltMin default = -90;
ram attribute tiltMax default = 90;
diff --git a/examples/camera-app/camera-common/src/camera-app.cpp b/examples/camera-app/camera-common/src/camera-app.cpp
index 14c5939..0ea1f04 100644
--- a/examples/camera-app/camera-common/src/camera-app.cpp
+++ b/examples/camera-app/camera-common/src/camera-app.cpp
@@ -95,7 +95,7 @@
CameraAvSettingsUserLevelManagement::OptionalAttributes::kMptzPosition,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kMaxPresets,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kMptzPresets,
- CameraAvSettingsUserLevelManagement::OptionalAttributes::kDptzRelativeMove,
+ CameraAvSettingsUserLevelManagement::OptionalAttributes::kDptzStreams,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kZoomMax,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kTiltMin,
CameraAvSettingsUserLevelManagement::OptionalAttributes::kTiltMax,
diff --git a/examples/camera-app/linux/include/camera-device.h b/examples/camera-app/linux/include/camera-device.h
index c23fe54..c7b358e 100644
--- a/examples/camera-app/linux/include/camera-device.h
+++ b/examples/camera-app/linux/include/camera-device.h
@@ -237,7 +237,7 @@
int16_t mTilt = chip::app::Clusters::CameraAvSettingsUserLevelManagement::kDefaultTilt;
uint8_t mZoom = chip::app::Clusters::CameraAvSettingsUserLevelManagement::kDefaultZoom;
// Use a standard 1080p aspect ratio
- chip::app::Clusters::CameraAvStreamManagement::ViewportStruct mViewport = { 320, 585, 2240, 1665 };
+ chip::app::Clusters::CameraAvStreamManagement::ViewportStruct mViewport = { 0, 0, 1920, 1080 };
uint16_t mCurrentVideoFrameRate = 0;
bool mHDREnabled = false;
bool mMicrophoneMuted = false;
diff --git a/examples/camera-app/linux/include/clusters/camera-avsettingsuserlevel-mgmt/camera-avsettingsuserlevel-manager.h b/examples/camera-app/linux/include/clusters/camera-avsettingsuserlevel-mgmt/camera-avsettingsuserlevel-manager.h
index 616af44..4330751 100644
--- a/examples/camera-app/linux/include/clusters/camera-avsettingsuserlevel-mgmt/camera-avsettingsuserlevel-manager.h
+++ b/examples/camera-app/linux/include/clusters/camera-avsettingsuserlevel-mgmt/camera-avsettingsuserlevel-manager.h
@@ -37,10 +37,9 @@
~CameraAVSettingsUserLevelManager() = default;
bool CanChangeMPTZ() override;
- bool IsValidVideoStreamID(uint16_t videoStreamID) override;
CHIP_ERROR LoadMPTZPresets(std::vector<MPTZPresetHelper> & mptzPresetHelpers) override;
- CHIP_ERROR LoadDPTZRelativeMove(std::vector<uint16_t> dptzRelativeMove) override;
+ CHIP_ERROR LoadDPTZStreams(std::vector<DPTZStruct> dptzStreams) override;
CHIP_ERROR PersistentAttributesLoadedCallback() override;
/**
@@ -56,12 +55,20 @@
Protocols::InteractionModel::Status MPTZRemovePreset(uint8_t aPreset) override;
Protocols::InteractionModel::Status DPTZSetViewport(uint16_t aVideoStreamID, Structs::ViewportStruct::Type aViewport) override;
Protocols::InteractionModel::Status DPTZRelativeMove(uint16_t aVideoStreamID, Optional<int16_t> aDeltaX,
- Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta) override;
+ Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta,
+ Structs::ViewportStruct::Type & aViewport) override;
- void SetCameraDeviceHAL(CameraDeviceInterface::CameraHALInterface * aCameraDevice);
+ void SetCameraDeviceHAL(CameraDeviceInterface * aCameraDevice);
+
+ /**
+ * DPTZ Stream Indication
+ */
+ void VideoStreamAllocated(uint16_t aStreamID) override;
+ void VideoStreamDeallocated(uint16_t aStreamID) override;
+ void DefaultViewportUpdated(Structs::ViewportStruct::Type aViewport) override;
private:
- CameraDeviceInterface::CameraHALInterface * mCameraDeviceHAL = nullptr;
+ CameraDeviceInterface * mCameraDeviceHAL = nullptr;
};
} // namespace CameraAvSettingsUserLevelManagement
diff --git a/examples/camera-app/linux/include/clusters/camera-avstream-mgmt/camera-av-stream-manager.h b/examples/camera-app/linux/include/clusters/camera-avstream-mgmt/camera-av-stream-manager.h
index 56bbaef..b030e9a 100644
--- a/examples/camera-app/linux/include/clusters/camera-avstream-mgmt/camera-av-stream-manager.h
+++ b/examples/camera-app/linux/include/clusters/camera-avstream-mgmt/camera-av-stream-manager.h
@@ -78,10 +78,10 @@
CameraAVStreamManager() = default;
~CameraAVStreamManager() = default;
- void SetCameraDeviceHAL(CameraDeviceInterface::CameraHALInterface * aCameraDevice);
+ void SetCameraDeviceHAL(CameraDeviceInterface * aCameraDevice);
private:
- CameraDeviceInterface::CameraHALInterface * mCameraDeviceHAL = nullptr;
+ CameraDeviceInterface * mCameraDeviceHAL = nullptr;
};
} // namespace CameraAvStreamManagement
diff --git a/examples/camera-app/linux/src/camera-device.cpp b/examples/camera-app/linux/src/camera-device.cpp
index 394c8fe..8dc9f42 100644
--- a/examples/camera-app/linux/src/camera-device.cpp
+++ b/examples/camera-app/linux/src/camera-device.cpp
@@ -65,8 +65,6 @@
// Provider manager uses the Media controller to register WebRTC Transport with media controller for AV source data
mWebRTCProviderManager.SetMediaController(&mMediaController);
-
- mCameraAVSettingsUserLevelManager.SetCameraDeviceHAL(this);
}
CameraDevice::~CameraDevice()
diff --git a/examples/camera-app/linux/src/clusters/camera-avsettingsuserlevel-mgmt/camera-avsettingsuserlevel-manager.cpp b/examples/camera-app/linux/src/clusters/camera-avsettingsuserlevel-mgmt/camera-avsettingsuserlevel-manager.cpp
index 88fc735..787b21e 100644
--- a/examples/camera-app/linux/src/clusters/camera-avsettingsuserlevel-mgmt/camera-avsettingsuserlevel-manager.cpp
+++ b/examples/camera-app/linux/src/clusters/camera-avsettingsuserlevel-mgmt/camera-avsettingsuserlevel-manager.cpp
@@ -28,7 +28,7 @@
using chip::Protocols::InteractionModel::Status;
-void CameraAVSettingsUserLevelManager::SetCameraDeviceHAL(CameraDeviceInterface::CameraHALInterface * aCameraDeviceHAL)
+void CameraAVSettingsUserLevelManager::SetCameraDeviceHAL(CameraDeviceInterface * aCameraDeviceHAL)
{
mCameraDeviceHAL = aCameraDeviceHAL;
}
@@ -40,20 +40,20 @@
return true;
}
-bool CameraAVSettingsUserLevelManager::IsValidVideoStreamID(uint16_t aVideoStreamID)
+void CameraAVSettingsUserLevelManager::VideoStreamAllocated(uint16_t aStreamID)
{
- // The server needs to verify that the provided Video Stream ID is valid and known and subject to digital modification
- // The camera app needs to also have an instance of AV Stream Management, querying that to determine validity of the provided
- // id.
- for (VideoStream & stream : mCameraDeviceHAL->GetAvailableVideoStreams())
- {
- if (stream.videoStreamParams.videoStreamID == aVideoStreamID && stream.isAllocated)
- {
- return true;
- }
- }
+ ViewportStruct viewport = mCameraDeviceHAL->GetCameraHALInterface().GetViewport();
+ this->GetServer()->AddMoveCapableVideoStream(aStreamID, viewport);
+}
- return false;
+void CameraAVSettingsUserLevelManager::VideoStreamDeallocated(uint16_t aStreamID)
+{
+ this->GetServer()->RemoveMoveCapableVideoStream(aStreamID);
+}
+
+void CameraAVSettingsUserLevelManager::DefaultViewportUpdated(Structs::ViewportStruct::Type aViewport)
+{
+ this->GetServer()->UpdateMoveCapableVideoStreams(aViewport);
}
Status CameraAVSettingsUserLevelManager::MPTZSetPosition(Optional<int16_t> aPan, Optional<int16_t> aTilt, Optional<uint8_t> aZoom)
@@ -64,17 +64,17 @@
//
if (aPan.HasValue())
{
- mCameraDeviceHAL->SetPan(aPan.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetPan(aPan.Value());
}
if (aTilt.HasValue())
{
- mCameraDeviceHAL->SetTilt(aTilt.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetTilt(aTilt.Value());
}
if (aZoom.HasValue())
{
- mCameraDeviceHAL->SetZoom(aZoom.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetZoom(aZoom.Value());
}
return Status::Success;
@@ -88,17 +88,17 @@
//
if (aPan.HasValue())
{
- mCameraDeviceHAL->SetPan(aPan.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetPan(aPan.Value());
}
if (aTilt.HasValue())
{
- mCameraDeviceHAL->SetTilt(aTilt.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetTilt(aTilt.Value());
}
if (aZoom.HasValue())
{
- mCameraDeviceHAL->SetZoom(aZoom.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetZoom(aZoom.Value());
}
return Status::Success;
@@ -112,17 +112,17 @@
//
if (aPan.HasValue())
{
- mCameraDeviceHAL->SetPan(aPan.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetPan(aPan.Value());
}
if (aTilt.HasValue())
{
- mCameraDeviceHAL->SetTilt(aTilt.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetTilt(aTilt.Value());
}
if (aZoom.HasValue())
{
- mCameraDeviceHAL->SetZoom(aZoom.Value());
+ mCameraDeviceHAL->GetCameraHALInterface().SetZoom(aZoom.Value());
}
return Status::Success;
@@ -147,10 +147,10 @@
Status CameraAVSettingsUserLevelManager::DPTZSetViewport(uint16_t aVideoStreamID, Structs::ViewportStruct::Type aViewport)
{
// The Cluster implementation has ensured that the videoStreamID represents a valid stream.
- // The application needs to interact with iHAL to access the stream, validate the viewport
+ // The application needs to interact with HAL to access the stream, validate the viewport
// and set the new viewport value.
//
- for (VideoStream & stream : mCameraDeviceHAL->GetAvailableVideoStreams())
+ for (VideoStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableVideoStreams())
{
if (stream.videoStreamParams.videoStreamID == aVideoStreamID && stream.isAllocated)
{
@@ -162,8 +162,8 @@
//
uint16_t requestedWidth = aViewport.x2 - aViewport.x1;
uint16_t requestedHeight = aViewport.y2 - aViewport.y1;
- VideoResolutionStruct minResolution = mCameraDeviceHAL->GetMinViewport();
- VideoSensorParamsStruct sensorParms = mCameraDeviceHAL->GetVideoSensorParams();
+ VideoResolutionStruct minResolution = mCameraDeviceHAL->GetCameraHALInterface().GetMinViewport();
+ VideoSensorParamsStruct sensorParms = mCameraDeviceHAL->GetCameraHALInterface().GetVideoSensorParams();
if ((requestedWidth < minResolution.width) || (requestedHeight < minResolution.height) ||
(requestedWidth > sensorParms.sensorWidth) || (requestedHeight > sensorParms.sensorHeight))
{
@@ -186,7 +186,7 @@
ChipLogError(Camera, "CameraApp: DPTZSetViewport with mismatching aspect ratio.");
return Status::ConstraintError;
}
- mCameraDeviceHAL->SetViewport(stream, aViewport);
+ mCameraDeviceHAL->GetCameraHALInterface().SetViewport(stream, aViewport);
return Status::Success;
}
}
@@ -196,19 +196,20 @@
}
Status CameraAVSettingsUserLevelManager::DPTZRelativeMove(uint16_t aVideoStreamID, Optional<int16_t> aDeltaX,
- Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta)
+ Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta,
+ Structs::ViewportStruct::Type & aViewport)
{
// The Cluster implementation has ensured that the videoStreamID represents a valid stream.
// The application needs to interact with its instance of AVStreamManagement to access the stream, validate the viewport
// and set the new values for the viewpoort based on the pixel movement requested
//
- for (VideoStream & stream : mCameraDeviceHAL->GetAvailableVideoStreams())
+ for (VideoStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableVideoStreams())
{
if (stream.videoStreamParams.videoStreamID == aVideoStreamID && stream.isAllocated)
{
ViewportStruct viewport = stream.viewport;
- VideoResolutionStruct minResolution = mCameraDeviceHAL->GetMinViewport();
- VideoSensorParamsStruct sensorParms = mCameraDeviceHAL->GetVideoSensorParams();
+ VideoResolutionStruct minResolution = mCameraDeviceHAL->GetCameraHALInterface().GetMinViewport();
+ VideoSensorParamsStruct sensorParms = mCameraDeviceHAL->GetCameraHALInterface().GetVideoSensorParams();
if (aDeltaX.HasValue())
{
@@ -294,7 +295,8 @@
viewport.x2 = sensorParms.sensorWidth - 1;
viewport.y2 = sensorParms.sensorHeight - 1;
}
- mCameraDeviceHAL->SetViewport(stream, viewport);
+ mCameraDeviceHAL->GetCameraHALInterface().SetViewport(stream, viewport);
+ aViewport = viewport;
return Status::Success;
}
}
@@ -309,9 +311,9 @@
return CHIP_NO_ERROR;
}
-CHIP_ERROR CameraAVSettingsUserLevelManager::LoadDPTZRelativeMove(std::vector<uint16_t> dptzRelativeMove)
+CHIP_ERROR CameraAVSettingsUserLevelManager::LoadDPTZStreams(std::vector<DPTZStruct> dptzStreams)
{
- dptzRelativeMove.clear();
+ dptzStreams.clear();
return CHIP_NO_ERROR;
}
diff --git a/examples/camera-app/linux/src/clusters/camera-avstream-mgmt/camera-av-stream-manager.cpp b/examples/camera-app/linux/src/clusters/camera-avstream-mgmt/camera-av-stream-manager.cpp
index e451030..abfaef7 100644
--- a/examples/camera-app/linux/src/clusters/camera-avstream-mgmt/camera-av-stream-manager.cpp
+++ b/examples/camera-app/linux/src/clusters/camera-avstream-mgmt/camera-av-stream-manager.cpp
@@ -36,7 +36,7 @@
using namespace chip::app::Clusters::CameraAvStreamManagement::Attributes;
using chip::Protocols::InteractionModel::Status;
-void CameraAVStreamManager::SetCameraDeviceHAL(CameraDeviceInterface::CameraHALInterface * aCameraDeviceHAL)
+void CameraAVStreamManager::SetCameraDeviceHAL(CameraDeviceInterface * aCameraDeviceHAL)
{
mCameraDeviceHAL = aCameraDeviceHAL;
}
@@ -47,7 +47,7 @@
outStreamID = kInvalidStreamID;
bool foundAvailableStream = false;
- for (VideoStream & stream : mCameraDeviceHAL->GetAvailableVideoStreams())
+ for (VideoStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableVideoStreams())
{
if (!stream.isAllocated)
{
@@ -59,7 +59,14 @@
outStreamID = stream.videoStreamParams.videoStreamID;
// Start the video stream from HAL for serving.
- mCameraDeviceHAL->StartVideoStream(outStreamID);
+ mCameraDeviceHAL->GetCameraHALInterface().StartVideoStream(outStreamID);
+
+ // Set the default viewport on the newly allocated stream
+ mCameraDeviceHAL->GetCameraHALInterface().SetViewport(stream,
+ mCameraDeviceHAL->GetCameraHALInterface().GetViewport());
+
+ // Inform DPTZ that there's an allocated stream
+ mCameraDeviceHAL->GetCameraAVSettingsUserLevelMgmtDelegate().VideoStreamAllocated(outStreamID);
return Status::Success;
}
@@ -78,7 +85,7 @@
const chip::Optional<bool> waterMarkEnabled,
const chip::Optional<bool> osdEnabled)
{
- for (VideoStream & stream : mCameraDeviceHAL->GetAvailableVideoStreams())
+ for (VideoStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableVideoStreams())
{
if (stream.videoStreamParams.videoStreamID == streamID && stream.isAllocated)
{
@@ -101,15 +108,17 @@
Protocols::InteractionModel::Status CameraAVStreamManager::VideoStreamDeallocate(const uint16_t streamID)
{
- for (VideoStream & stream : mCameraDeviceHAL->GetAvailableVideoStreams())
+ for (VideoStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableVideoStreams())
{
if (stream.videoStreamParams.videoStreamID == streamID && stream.isAllocated)
{
// Stop the video stream
- mCameraDeviceHAL->StopVideoStream(streamID);
+ mCameraDeviceHAL->GetCameraHALInterface().StopVideoStream(streamID);
stream.isAllocated = false;
+ mCameraDeviceHAL->GetCameraAVSettingsUserLevelMgmtDelegate().VideoStreamDeallocated(streamID);
+
break;
}
}
@@ -123,7 +132,7 @@
outStreamID = kInvalidStreamID;
bool foundAvailableStream = false;
- for (AudioStream & stream : mCameraDeviceHAL->GetAvailableAudioStreams())
+ for (AudioStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableAudioStreams())
{
if (!stream.isAllocated)
{
@@ -135,7 +144,7 @@
outStreamID = stream.audioStreamParams.audioStreamID;
// Start the audio stream from HAL for serving.
- mCameraDeviceHAL->StartAudioStream(outStreamID);
+ mCameraDeviceHAL->GetCameraHALInterface().StartAudioStream(outStreamID);
return Status::Success;
}
@@ -152,12 +161,12 @@
Protocols::InteractionModel::Status CameraAVStreamManager::AudioStreamDeallocate(const uint16_t streamID)
{
- for (AudioStream & stream : mCameraDeviceHAL->GetAvailableAudioStreams())
+ for (AudioStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableAudioStreams())
{
if (stream.audioStreamParams.audioStreamID == streamID && stream.isAllocated)
{
// Stop the audio stream
- mCameraDeviceHAL->StopAudioStream(streamID);
+ mCameraDeviceHAL->GetCameraHALInterface().StopAudioStream(streamID);
stream.isAllocated = false;
break;
@@ -173,7 +182,7 @@
outStreamID = kInvalidStreamID;
bool foundAvailableStream = false;
- for (SnapshotStream & stream : mCameraDeviceHAL->GetAvailableSnapshotStreams())
+ for (SnapshotStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableSnapshotStreams())
{
if (!stream.isAllocated)
{
@@ -185,7 +194,7 @@
outStreamID = stream.snapshotStreamParams.snapshotStreamID;
// Start the snapshot stream for serving.
- mCameraDeviceHAL->StartSnapshotStream(outStreamID);
+ mCameraDeviceHAL->GetCameraHALInterface().StartSnapshotStream(outStreamID);
return Status::Success;
}
@@ -204,7 +213,7 @@
const chip::Optional<bool> waterMarkEnabled,
const chip::Optional<bool> osdEnabled)
{
- for (SnapshotStream & stream : mCameraDeviceHAL->GetAvailableSnapshotStreams())
+ for (SnapshotStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableSnapshotStreams())
{
if (stream.snapshotStreamParams.snapshotStreamID == streamID && stream.isAllocated)
{
@@ -227,12 +236,12 @@
Protocols::InteractionModel::Status CameraAVStreamManager::SnapshotStreamDeallocate(const uint16_t streamID)
{
- for (SnapshotStream & stream : mCameraDeviceHAL->GetAvailableSnapshotStreams())
+ for (SnapshotStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableSnapshotStreams())
{
if (stream.snapshotStreamParams.snapshotStreamID == streamID && stream.isAllocated)
{
// Stop the snapshot stream for serving.
- mCameraDeviceHAL->StopSnapshotStream(streamID);
+ mCameraDeviceHAL->GetCameraHALInterface().StopSnapshotStream(streamID);
stream.isAllocated = false;
break;
@@ -255,7 +264,7 @@
{
case HDRModeEnabled::Id: {
- mCameraDeviceHAL->SetHDRMode(GetCameraAVStreamMgmtServer()->GetHDRModeEnabled());
+ mCameraDeviceHAL->GetCameraHALInterface().SetHDRMode(GetCameraAVStreamMgmtServer()->GetHDRModeEnabled());
break;
}
case SoftRecordingPrivacyModeEnabled::Id: {
@@ -271,23 +280,34 @@
break;
}
case Viewport::Id: {
- mCameraDeviceHAL->SetViewport(GetCameraAVStreamMgmtServer()->GetViewport());
+ // Update the device default
+ mCameraDeviceHAL->GetCameraHALInterface().SetViewport(GetCameraAVStreamMgmtServer()->GetViewport());
+
+ // Update the per stream viewports on the camera
+ for (VideoStream & stream : mCameraDeviceHAL->GetCameraHALInterface().GetAvailableVideoStreams())
+ {
+ mCameraDeviceHAL->GetCameraHALInterface().SetViewport(stream, GetCameraAVStreamMgmtServer()->GetViewport());
+ }
+
+ // Inform DPTZ (the server) that the camera default viewport has changed
+ mCameraDeviceHAL->GetCameraAVSettingsUserLevelMgmtDelegate().DefaultViewportUpdated(
+ GetCameraAVStreamMgmtServer()->GetViewport());
break;
}
case SpeakerMuted::Id: {
- mCameraDeviceHAL->SetSpeakerMuted(GetCameraAVStreamMgmtServer()->GetSpeakerMuted());
+ mCameraDeviceHAL->GetCameraHALInterface().SetSpeakerMuted(GetCameraAVStreamMgmtServer()->GetSpeakerMuted());
break;
}
case SpeakerVolumeLevel::Id: {
- mCameraDeviceHAL->SetSpeakerVolume(GetCameraAVStreamMgmtServer()->GetSpeakerVolumeLevel());
+ mCameraDeviceHAL->GetCameraHALInterface().SetSpeakerVolume(GetCameraAVStreamMgmtServer()->GetSpeakerVolumeLevel());
break;
}
case MicrophoneMuted::Id: {
- mCameraDeviceHAL->SetMicrophoneMuted(GetCameraAVStreamMgmtServer()->GetMicrophoneMuted());
+ mCameraDeviceHAL->GetCameraHALInterface().SetMicrophoneMuted(GetCameraAVStreamMgmtServer()->GetMicrophoneMuted());
break;
}
case MicrophoneVolumeLevel::Id: {
- mCameraDeviceHAL->SetMicrophoneVolume(GetCameraAVStreamMgmtServer()->GetMicrophoneVolumeLevel());
+ mCameraDeviceHAL->GetCameraHALInterface().SetMicrophoneVolume(GetCameraAVStreamMgmtServer()->GetMicrophoneVolumeLevel());
break;
}
default:
@@ -299,7 +319,7 @@
const VideoResolutionStruct & resolution,
ImageSnapshot & outImageSnapshot)
{
- if (mCameraDeviceHAL->CaptureSnapshot(streamID, resolution, outImageSnapshot) == CameraError::SUCCESS)
+ if (mCameraDeviceHAL->GetCameraHALInterface().CaptureSnapshot(streamID, resolution, outImageSnapshot) == CameraError::SUCCESS)
{
return Status::Success;
}
diff --git a/src/app/clusters/camera-av-settings-user-level-management-server/camera-av-settings-user-level-management-server.cpp b/src/app/clusters/camera-av-settings-user-level-management-server/camera-av-settings-user-level-management-server.cpp
index 57be948..05d35ae 100644
--- a/src/app/clusters/camera-av-settings-user-level-management-server/camera-av-settings-user-level-management-server.cpp
+++ b/src/app/clusters/camera-av-settings-user-level-management-server/camera-av-settings-user-level-management-server.cpp
@@ -100,12 +100,12 @@
mEndpointId));
}
- if (SupportsOptAttr(OptionalAttributes::kDptzRelativeMove))
+ if (SupportsOptAttr(OptionalAttributes::kDptzStreams))
{
VerifyOrReturnError(HasFeature(Feature::kDigitalPTZ), CHIP_ERROR_INVALID_ARGUMENT,
ChipLogError(Zcl,
"CameraAVSettingsUserLevelMgmt[ep=%d]: Feature configuration error. If "
- "DPTZRelativeMove is enabled, then DigitalPTZ feature is required",
+ "DPTZStreams is enabled, then DigitalPTZ feature is required",
mEndpointId));
}
@@ -373,27 +373,57 @@
/**
* Methods handling known video stream IDs, the addition and removal thereof.
*/
-void CameraAvSettingsUserLevelMgmtServer::AddMoveCapableVideoStreamID(uint16_t aVideoStreamID)
+void CameraAvSettingsUserLevelMgmtServer::AddMoveCapableVideoStream(uint16_t aVideoStreamID, ViewportStruct::Type aViewport)
{
- mDptzRelativeMove.push_back(aVideoStreamID);
- MarkDirty(Attributes::DPTZRelativeMove::Id);
+ DPTZStruct dptzEntry;
+ dptzEntry.videoStreamID = aVideoStreamID;
+ dptzEntry.viewport = aViewport;
+ mDptzStreams.push_back(dptzEntry);
+ MarkDirty(Attributes::DPTZStreams::Id);
}
-void CameraAvSettingsUserLevelMgmtServer::RemoveMoveCapableVideoStreamID(uint16_t aVideoStreamID)
+void CameraAvSettingsUserLevelMgmtServer::UpdateMoveCapableVideoStream(uint16_t aVideoStreamID, ViewportStruct::Type aViewport)
+{
+ auto it = std::find_if(mDptzStreams.begin(), mDptzStreams.end(),
+ [aVideoStreamID](const DPTZStruct & dptzs) { return dptzs.videoStreamID == aVideoStreamID; });
+
+ if (it == mDptzStreams.end())
+ {
+ ChipLogError(Zcl, "CameraAVSettingsUserLevelMgmt[ep=%d]. No matching video stream ID, update not possible. ID=%d.",
+ mEndpointId, aVideoStreamID);
+ return;
+ }
+
+ it->viewport = aViewport;
+ MarkDirty(Attributes::DPTZStreams::Id);
+}
+
+void CameraAvSettingsUserLevelMgmtServer::UpdateMoveCapableVideoStreams(ViewportStruct::Type aViewport)
+{
+ for (auto & dptzStream : mDptzStreams)
+ {
+ dptzStream.viewport = aViewport;
+ }
+
+ MarkDirty(Attributes::DPTZStreams::Id);
+}
+
+void CameraAvSettingsUserLevelMgmtServer::RemoveMoveCapableVideoStream(uint16_t aVideoStreamID)
{
// Verify that this is a known ID, if it is, remove from the list
//
- auto it = std::find(mDptzRelativeMove.begin(), mDptzRelativeMove.end(), aVideoStreamID);
+ auto it = std::find_if(mDptzStreams.begin(), mDptzStreams.end(),
+ [aVideoStreamID](const DPTZStruct & dptzs) { return dptzs.videoStreamID == aVideoStreamID; });
- if (it == mDptzRelativeMove.end())
+ if (it == mDptzStreams.end())
{
ChipLogError(Zcl, "CameraAVSettingsUserLevelMgmt[ep=%d]. No matching video stream ID, removal not possible. ID=%d.",
mEndpointId, aVideoStreamID);
return;
}
- mDptzRelativeMove.erase(it);
- MarkDirty(Attributes::DPTZRelativeMove::Id);
+ mDptzStreams.erase(it);
+ MarkDirty(Attributes::DPTZStreams::Id);
}
/**
@@ -401,9 +431,10 @@
*/
bool CameraAvSettingsUserLevelMgmtServer::KnownVideoStreamID(uint16_t aVideoStreamID)
{
- auto it = std::find(mDptzRelativeMove.begin(), mDptzRelativeMove.end(), aVideoStreamID);
+ auto it = std::find_if(mDptzStreams.begin(), mDptzStreams.end(),
+ [aVideoStreamID](const DPTZStruct & dptzs) { return dptzs.videoStreamID == aVideoStreamID; });
- return (it == mDptzRelativeMove.end() ? false : true);
+ return (it == mDptzStreams.end() ? false : true);
}
/**
@@ -468,12 +499,12 @@
});
}
-CHIP_ERROR CameraAvSettingsUserLevelMgmtServer::ReadAndEncodeDPTZRelativeMove(AttributeValueEncoder & aEncoder)
+CHIP_ERROR CameraAvSettingsUserLevelMgmtServer::ReadAndEncodeDPTZStreams(AttributeValueEncoder & aEncoder)
{
return aEncoder.EncodeList([this](const auto & encoder) -> CHIP_ERROR {
- for (const auto & dptzRelativeMove : mDptzRelativeMove)
+ for (const auto & dptzStream : mDptzStreams)
{
- ReturnErrorOnFailure(encoder.Encode(dptzRelativeMove));
+ ReturnErrorOnFailure(encoder.Encode(dptzStream));
}
return CHIP_NO_ERROR;
@@ -504,7 +535,7 @@
}
// Load DPTZRelativeMove
- err = mDelegate.LoadDPTZRelativeMove(mDptzRelativeMove);
+ err = mDelegate.LoadDPTZStreams(mDptzStreams);
if (err != CHIP_NO_ERROR)
{
ChipLogDetail(Zcl, "CameraAVSettingsUserLevelMgmt[ep=%d]: Unable to load the DPTZRelativeMove from the KVS.", mEndpointId);
@@ -551,12 +582,12 @@
mEndpointId));
return ReadAndEncodeMPTZPresets(aEncoder);
- case DPTZRelativeMove::Id:
+ case DPTZStreams::Id:
VerifyOrReturnError(
HasFeature(Feature::kDigitalPTZ), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
ChipLogError(Zcl, "CameraAVSettingsUserLevelMgmt[ep=%d]: can not get DPTZRelativeMove, feature is not supported",
mEndpointId));
- return ReadAndEncodeDPTZRelativeMove(aEncoder);
+ return ReadAndEncodeDPTZStreams(aEncoder);
case ZoomMax::Id:
VerifyOrReturnError(
HasFeature(Feature::kMechanicalZoom), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
@@ -1192,25 +1223,26 @@
Structs::ViewportStruct::Type viewport = commandData.viewport;
// Is this a video stream ID of which we have already been informed?
- // If not, ask the delegate if it's ok. If yes, add to our set and proceed, if not, fail.
+ // If not, fail.
//
if (!KnownVideoStreamID(videoStreamID))
{
- // Call the delegate to validate that the videoStreamID is known; if yes then add to our list and proceed
- //
- if (!mDelegate.IsValidVideoStreamID(videoStreamID))
- {
- ChipLogError(Zcl, "CameraAVSettingsUserLevelMgmt[ep=%d]: Unknown Video Stream ID provided. ID: %d", mEndpointId,
- videoStreamID);
- ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::NotFound);
- return;
- }
- AddMoveCapableVideoStreamID(videoStreamID);
+ ChipLogError(Zcl, "CameraAVSettingsUserLevelMgmt[ep=%d]: Unknown Video Stream ID provided. ID: %d", mEndpointId,
+ videoStreamID);
+ ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::NotFound);
+ return;
}
// Call the delegate
Status status = mDelegate.DPTZSetViewport(videoStreamID, viewport);
+ if (status == Status::Success)
+ {
+ // Update the viewport of our stream in DPTZStreams
+ //
+ UpdateMoveCapableVideoStream(videoStreamID, viewport);
+ }
+
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status);
}
@@ -1247,8 +1279,14 @@
return;
}
- // Call the delegate
- Status status = mDelegate.DPTZRelativeMove(videoStreamID, deltaX, deltaY, zoomDelta);
+ // Create a viewport and call the delegate; on success update our Stream Viewport with that which was set
+ ViewportStruct::Type viewport;
+ Status status = mDelegate.DPTZRelativeMove(videoStreamID, deltaX, deltaY, zoomDelta, viewport);
+
+ if (status == Status::Success)
+ {
+ UpdateMoveCapableVideoStream(videoStreamID, viewport);
+ }
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status);
}
diff --git a/src/app/clusters/camera-av-settings-user-level-management-server/camera-av-settings-user-level-management-server.h b/src/app/clusters/camera-av-settings-user-level-management-server/camera-av-settings-user-level-management-server.h
index 7ac6009..7385d12 100644
--- a/src/app/clusters/camera-av-settings-user-level-management-server/camera-av-settings-user-level-management-server.h
+++ b/src/app/clusters/camera-av-settings-user-level-management-server/camera-av-settings-user-level-management-server.h
@@ -34,6 +34,7 @@
using MPTZStructType = Structs::MPTZStruct::Type;
using MPTZPresetStructType = Structs::MPTZPresetStruct::Type;
+using DPTZStruct = Structs::DPTZStruct::Type;
constexpr int16_t kMinPanValue = -180;
constexpr int16_t kMaxPanValue = 180;
@@ -54,15 +55,15 @@
enum class OptionalAttributes : uint32_t
{
- kMptzPosition = 0x0001,
- kMaxPresets = 0x0002,
- kMptzPresets = 0x0004,
- kDptzRelativeMove = 0x0008,
- kZoomMax = 0x0010,
- kTiltMin = 0x0020,
- kTiltMax = 0x0040,
- kPanMin = 0x0080,
- kPanMax = 0x0100,
+ kMptzPosition = 0x0001,
+ kMaxPresets = 0x0002,
+ kMptzPresets = 0x0004,
+ kDptzStreams = 0x0008,
+ kZoomMax = 0x0010,
+ kTiltMin = 0x0020,
+ kTiltMax = 0x0040,
+ kPanMin = 0x0080,
+ kPanMax = 0x0100,
};
struct MPTZPresetHelper
@@ -133,7 +134,7 @@
uint8_t GetMaxPresets() const { return mMaxPresets; }
- const std::vector<uint16_t> GetDptzRelativeMove() const { return mDptzRelativeMove; }
+ const std::vector<DPTZStruct> GetDptzRelativeMove() const { return mDptzStreams; }
uint8_t GetZoomMax() const { return mZoomMax; }
@@ -164,18 +165,30 @@
void SetZoom(Optional<uint8_t> aZoom);
/**
- * Allows for a delegate or application to provide the ID of an allocated video stream that is capable of digital movement.
- * It is expected that this would be done by a delegate on the conclusion of allocating a video stream via the AV Stream
+ * Allows for a delegate or application to provide the ID and default Viewport of an allocated video stream that is capable of
+ * digital movement. This should be invoked by a delegate on the conclusion of allocating a video stream via the AV Stream
* Management cluster.
*/
- void AddMoveCapableVideoStreamID(uint16_t aVideoStreamID);
+ void AddMoveCapableVideoStream(uint16_t aVideoStreamID, Structs::ViewportStruct::Type aViewport);
+
+ /**
+ * Allows for a delegate or application to update the viewport of an already allocated video stream.
+ * This should be invoked whenever a viewport is updated by DPTZSetVewport or DPTZRelativeMove
+ */
+ void UpdateMoveCapableVideoStream(uint16_t aVideoStreamID, Structs::ViewportStruct::Type aViewport);
+
+ /**
+ * Allows for a delegate or application to update all of the viewports for all of the allocated video streams.
+ * This should be invoked whenever the device default viewport is updated via a write to Viewport on the
+ * AV Stream Management Cluster
+ */
+ void UpdateMoveCapableVideoStreams(Structs::ViewportStruct::Type aViewport);
/**
* Allows for a delegate or application to remove a video stream from the set that is capable of digital movement.
- * It is expected that this would be done by a delegate on the conclusion of deallocating a video stream via the AV Stream
- * Management cluster.
+ * This should be invoked by a delegate on the conclusion of deallocating a video stream via the AV Stream Management cluster.
*/
- void RemoveMoveCapableVideoStreamID(uint16_t aVideoStreamID);
+ void RemoveMoveCapableVideoStream(uint16_t aVideoStreamID);
EndpointId GetEndpointId() { return AttributeAccessInterface::GetEndpointId().Value(); }
@@ -201,14 +214,14 @@
uint8_t mZoomMax = kMaxZoomValue;
std::vector<MPTZPresetHelper> mMptzPresetHelpers;
- std::vector<uint16_t> mDptzRelativeMove;
+ std::vector<DPTZStruct> mDptzStreams;
// Attribute handler interface
CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override;
// Helper Read functions for complex attribute types
CHIP_ERROR ReadAndEncodeMPTZPresets(AttributeValueEncoder & encoder);
- CHIP_ERROR ReadAndEncodeDPTZRelativeMove(AttributeValueEncoder & encoder);
+ CHIP_ERROR ReadAndEncodeDPTZStreams(AttributeValueEncoder & encoder);
CHIP_ERROR StoreMPTZPosition(const MPTZStructType & mptzPosition);
CHIP_ERROR LoadMPTZPosition(MPTZStructType & mptzPosition);
@@ -260,9 +273,13 @@
virtual bool CanChangeMPTZ() = 0;
/**
- * Allows the delegate to verify that a received video stream ID is valid
+ * DPTZ Stream handling. Invoked on the delegate by an app, providing to the delegate the id of an
+ * allocated or deallocated stream, or the viewport when the device level viewport is updated.
+ * The delegate shall invoke the appropriate MoveCapableVideoStream methods on its instance of the server
*/
- virtual bool IsValidVideoStreamID(uint16_t aVideoStreamID) = 0;
+ virtual void VideoStreamAllocated(uint16_t aStreamID) = 0;
+ virtual void VideoStreamDeallocated(uint16_t aStreamID) = 0;
+ virtual void DefaultViewportUpdated(Structs::ViewportStruct::Type aViewport) = 0;
/**
* Delegate command handlers
@@ -342,7 +359,8 @@
* @param aZoomDelta Relative change of digital zoom
*/
virtual Protocols::InteractionModel::Status DPTZRelativeMove(uint16_t aVideoStreamID, Optional<int16_t> aDeltaX,
- Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta) = 0;
+ Optional<int16_t> aDeltaY, Optional<int8_t> aZoomDelta,
+ Structs::ViewportStruct::Type & aViewport) = 0;
/**
* @brief Callback into the delegate once persistent attributes managed by
@@ -358,7 +376,7 @@
* server list, at initialization.
*/
virtual CHIP_ERROR LoadMPTZPresets(std::vector<MPTZPresetHelper> & mptzPresetHelpers) = 0;
- virtual CHIP_ERROR LoadDPTZRelativeMove(std::vector<uint16_t> dptzRelativeMove) = 0;
+ virtual CHIP_ERROR LoadDPTZStreams(std::vector<DPTZStruct> dptzStreams) = 0;
CameraAvSettingsUserLevelMgmtServer * mServer = nullptr;
diff --git a/src/app/clusters/camera-av-stream-management-server/camera-av-stream-management-server.cpp b/src/app/clusters/camera-av-stream-management-server/camera-av-stream-management-server.cpp
index 151a988..abb40ee 100644
--- a/src/app/clusters/camera-av-stream-management-server/camera-av-stream-management-server.cpp
+++ b/src/app/clusters/camera-av-stream-management-server/camera-av-stream-management-server.cpp
@@ -28,7 +28,9 @@
#include <lib/support/DefaultStorageKeyAllocator.h>
#include <protocols/interaction_model/StatusCode.h>
+#include <cmath>
#include <cstring>
+
using namespace chip;
using namespace chip::app;
using namespace chip::app::Clusters;
@@ -840,6 +842,31 @@
CHIP_ERROR CameraAVStreamMgmtServer::SetViewport(const ViewportStruct & aViewport)
{
+ // The following validation steps are required
+ // 1. the new viewport is not larger than the sensor max
+ // 2. the new viewport is not snaller than the sensor min
+ // 3. the new viewport has the same aspect ratio as the sensor
+ //
+ uint16_t requestedWidth = static_cast<uint16_t>(aViewport.x2 - aViewport.x1);
+ uint16_t requestedHeight = static_cast<uint16_t>(aViewport.y2 - aViewport.y1);
+ if ((requestedWidth < mMinViewPort.width) || (requestedHeight < mMinViewPort.height) ||
+ (requestedWidth > mVideoSensorParams.sensorWidth) || (requestedHeight > mVideoSensorParams.sensorHeight))
+ {
+ ChipLogError(Zcl, "CameraAVStreamMgmt[ep=%d]: SetViewport with invalid viewport dimensions", mEndpointId);
+ return CHIP_IM_GLOBAL_STATUS(ConstraintError);
+ }
+
+ // Get the ARs to no more than 2DP. Otherwise you get mismatches e.g. 16:9 ratio calculation for 480p isn't the same as
+ // 1080p beyond 2DP.
+ float requestedAR = floorf((static_cast<float>(requestedWidth) / requestedHeight) * 100) / 100;
+ float deviceAR = floorf((static_cast<float>(mVideoSensorParams.sensorWidth) / mVideoSensorParams.sensorHeight) * 100) / 100;
+
+ // Ensure that the aspect ration of the viewport matches the aspect ratio of the sensor
+ if (requestedAR != deviceAR)
+ {
+ ChipLogError(Zcl, "CameraAVStreamMgmt[ep=%d]: SetViewport with mismatching aspect ratio.", mEndpointId);
+ return CHIP_IM_GLOBAL_STATUS(ConstraintError);
+ }
mViewport = aViewport;
StoreViewport(mViewport);
diff --git a/src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml
index 9a53bb4..98327a1 100644
--- a/src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml
@@ -18,22 +18,28 @@
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/CameraAVSettingsUserLevelManagement.adoc
Parameters: in-progress
-Git: 0.7-summer-2025-1-ge4654a5ef
+Git: 0.7-summer-2025-ncr-195-gdc1151679-dirty
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Cameras"/>
+ <struct name="DPTZStruct" apiMaturity="provisional">
+ <cluster code="0x0552"/>
+ <item fieldId="0" name="VideoStreamID" type="int16u"/>
+ <item fieldId="1" name="Viewport" type="ViewportStruct"/>
+ </struct>
+
<struct name="MPTZPresetStruct" apiMaturity="provisional">
<cluster code="0x0552"/>
- <item fieldId="0" name="PresetID" type="int8u"/>
+ <item fieldId="0" name="PresetID" type="int8u" min="1"/>
<item fieldId="1" name="Name" type="char_string" length="32"/>
<item fieldId="2" name="Settings" type="MPTZStruct"/>
</struct>
<struct name="MPTZStruct" apiMaturity="provisional">
<cluster code="0x0552"/>
- <item fieldId="0" name="Pan" type="int16s" optional="true" default="0"/>
- <item fieldId="1" name="Tilt" type="int16s" optional="true" default="0"/>
- <item fieldId="2" name="Zoom" type="int8u" optional="true" default="1" min="1"/>
+ <item fieldId="0" name="Pan" type="int16s" optional="true" default="0" min="-180" max="180"/>
+ <item fieldId="1" name="Tilt" type="int16s" optional="true" default="0" min="-180" max="180"/>
+ <item fieldId="2" name="Zoom" type="int8u" optional="true" default="1" min="1" max="100"/>
</struct>
<cluster apiMaturity="provisional">
@@ -45,8 +51,7 @@
<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="MPTZ" type="MPTZStruct" optional="true">
- <description>MPTZPosition</description>
+ <attribute code="0x0000" side="server" name="MPTZPosition" define="MPTZ" type="MPTZStruct" optional="true">
<mandatoryConform>
<orTerm>
<feature name="MPAN"/>
@@ -55,50 +60,42 @@
</orTerm>
</mandatoryConform>
</attribute>
- <attribute code="0x0001" side="server" define="MAX_PRESETS" type="int8u" optional="true" default="5">
- <description>MaxPresets</description>
+ <attribute code="0x0001" side="server" name="MaxPresets" define="MAX_PRESETS" type="int8u" optional="true" default="5">
<mandatoryConform>
<feature name="MPRESETS"/>
</mandatoryConform>
</attribute>
- <attribute code="0x0002" side="server" define="PRESET_MPTZ_TABLE" type="array" entryType="MPTZPresetStruct" optional="true">
- <description>MPTZPresets</description>
+ <attribute code="0x0002" side="server" name="MPTZPresets" define="PRESET_MPTZ_TABLE" type="array" entryType="MPTZPresetStruct" optional="true">
<mandatoryConform>
<feature name="MPRESETS"/>
</mandatoryConform>
</attribute>
- <attribute code="0x0003" side="server" define="DPTZ_RELATIVE_MOVE" type="array" optional="true" entryType="int16u">
- <description>DPTZRelativeMove</description>
+ <attribute code="0x0003" side="server" name="DPTZStreams" define="DPTZ_RELATIVE_MOVE" type="array" optional="true" entryType="DPTZStruct">
<mandatoryConform>
<feature name="DPTZ"/>
</mandatoryConform>
</attribute>
- <attribute code="0x0004" side="server" define="ZOOM_MAX" type="int8u" optional="true" min="2" max="100" default="100">
- <description>ZoomMax</description>
+ <attribute code="0x0004" side="server" name="ZoomMax" define="ZOOM_MAX" type="int8u" optional="true" min="2" max="100" default="100">
<mandatoryConform>
<feature name="MZOOM"/>
</mandatoryConform>
</attribute>
- <attribute code="0x0005" side="server" define="TILT_MIN" type="int16s" min="-180" max="179" default="-90" optional="true">
- <description>TiltMin</description>
+ <attribute code="0x0005" side="server" name="TiltMin" define="TILT_MIN" type="int16s" min="-180" max="179" default="-90" optional="true">
<mandatoryConform>
<feature name="MTILT"/>
</mandatoryConform>
</attribute>
- <attribute code="0x0006" side="server" define="TILT_MAX" type="int16s" min="-179" max="180" default="90" optional="true">
- <description>TiltMax</description>
+ <attribute code="0x0006" side="server" name="TiltMax" define="TILT_MAX" type="int16s" min="-179" max="180" default="90" optional="true">
<mandatoryConform>
<feature name="MTILT"/>
</mandatoryConform>
</attribute>
- <attribute code="0x0007" side="server" define="PAN_MIN" type="int16s" min="-180" max="179" default="-180" optional="true">
- <description>PanMin</description>
+ <attribute code="0x0007" side="server" name="PanMin" define="PAN_MIN" type="int16s" min="-180" max="179" default="-180" optional="true">
<mandatoryConform>
<feature name="MPAN"/>
</mandatoryConform>
</attribute>
- <attribute code="0x0008" side="server" define="PAN_MAX" type="int16s" min="-179" max="180" default="180" optional="true">
- <description>PanMax</description>
+ <attribute code="0x0008" side="server" name="PanMax" define="PAN_MAX" type="int16s" min="-179" max="180" default="180" optional="true">
<mandatoryConform>
<feature name="MPAN"/>
</mandatoryConform>
@@ -118,10 +115,10 @@
</command>
<command code="0x01" source="client" name="MPTZRelativeMove" optional="true">
- <description>This command SHALL move the device by the delta values relative to the currently defined position.</description>
- <arg id="0" name="PanDelta" type="int16s" default="0" optional="true"/>
- <arg id="1" name="TiltDelta" type="int16s" default="0" optional="true"/>
- <arg id="2" name="ZoomDelta" type="int8s" default="0" optional="true"/>
+ <description>This command SHALL move the camera by the delta values relative to the currently defined position.</description>
+ <arg id="0" name="PanDelta" type="int16s" default="0" optional="true" min="-360" max="360"/>
+ <arg id="1" name="TiltDelta" type="int16s" default="0" optional="true" min="-360" max="360"/>
+ <arg id="2" name="ZoomDelta" type="int8s" default="0" optional="true" min="-99" max="99"/>
<optionalConform>
<orTerm>
<feature name="MPAN"/>
@@ -133,7 +130,7 @@
<command code="0x02" source="client" name="MPTZMoveToPreset" optional="true">
<description>This command SHALL move the camera to the positions specified by the Preset passed.</description>
- <arg id="0" name="PresetID" type="int8u"/>
+ <arg id="0" name="PresetID" type="int8u" min="1"/>
<mandatoryConform>
<feature name="MPRESETS"/>
</mandatoryConform>
@@ -141,7 +138,7 @@
<command code="0x03" source="client" name="MPTZSavePreset" optional="true">
<description>This command allows creating a new preset or updating the values of an existing one.</description>
- <arg id="0" name="PresetID" type="int8u" optional="true"/>
+ <arg id="0" name="PresetID" type="int8u" optional="true" min="1"/>
<arg id="1" name="Name" type="char_string" length="32"/>
<mandatoryConform>
<feature name="MPRESETS"/>
@@ -150,7 +147,7 @@
<command code="0x04" source="client" name="MPTZRemovePreset" optional="true">
<description>This command SHALL remove a preset entry from the PresetMptzTable.</description>
- <arg id="0" name="PresetID" type="int8u"/>
+ <arg id="0" name="PresetID" type="int8u" min="1"/>
<mandatoryConform>
<feature name="MPRESETS"/>
</mandatoryConform>
@@ -166,7 +163,7 @@
</command>
<command code="0x06" source="client" name="DPTZRelativeMove" optional="true">
- <description>This command SHALL change the viewports location by the amount specified in a relative fashion.</description>
+ <description>This command SHALL change the per stream viewport by the amount specified in a relative fashion.</description>
<arg id="0" name="VideoStreamID" type="int16u"/>
<arg id="1" name="DeltaX" type="int16s" optional="true" default="0"/>
<arg id="2" name="DeltaY" type="int16s" optional="true" default="0"/>
diff --git a/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml
index e166774..a4f5897 100644
--- a/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml
@@ -18,7 +18,7 @@
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/CameraAVStreamManagement.adoc
Parameters: in-progress
-Git: 0.7-summer-2025-ncr-195-gdc1151679
+Git: 0.7-summer-2025-ncr-195-gdc1151679-dirty
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Cameras"/>
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 77102f2..c366dfd 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -9961,10 +9961,15 @@
int16u y2 = 3;
}
+ struct DPTZStruct {
+ int16u videoStreamID = 0;
+ ViewportStruct viewport = 1;
+ }
+
readonly attribute optional MPTZStruct MPTZPosition = 0;
readonly attribute optional int8u maxPresets = 1;
readonly attribute optional MPTZPresetStruct MPTZPresets[] = 2;
- readonly attribute optional int16u DPTZRelativeMove[] = 3;
+ readonly attribute optional DPTZStruct DPTZStreams[] = 3;
readonly attribute optional int8u zoomMax = 4;
readonly attribute optional int16s tiltMin = 5;
readonly attribute optional int16s tiltMax = 6;
@@ -10015,7 +10020,7 @@
/** This command SHALL set the values for the pan, tilt, and zoom in the mechanical PTZ. */
command MPTZSetPosition(MPTZSetPositionRequest): DefaultSuccess = 0;
- /** This command SHALL move the device by the delta values relative to the currently defined position. */
+ /** This command SHALL move the camera by the delta values relative to the currently defined position. */
command MPTZRelativeMove(MPTZRelativeMoveRequest): DefaultSuccess = 1;
/** This command SHALL move the camera to the positions specified by the Preset passed. */
command MPTZMoveToPreset(MPTZMoveToPresetRequest): DefaultSuccess = 2;
@@ -10025,7 +10030,7 @@
command MPTZRemovePreset(MPTZRemovePresetRequest): DefaultSuccess = 4;
/** This command allows for setting the digital viewport for a specific Video Stream. */
command DPTZSetViewport(DPTZSetViewportRequest): DefaultSuccess = 5;
- /** This command SHALL change the viewports location by the amount specified in a relative fashion. */
+ /** This command SHALL change the per stream viewport by the amount specified in a relative fashion. */
command DPTZRelativeMove(DPTZRelativeMoveRequest): DefaultSuccess = 6;
}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index ff20c1e..a1c6043 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -59015,7 +59015,7 @@
private static final long MPTZ_POSITION_ATTRIBUTE_ID = 0L;
private static final long MAX_PRESETS_ATTRIBUTE_ID = 1L;
private static final long MPTZ_PRESETS_ATTRIBUTE_ID = 2L;
- private static final long DPTZ_RELATIVE_MOVE_ATTRIBUTE_ID = 3L;
+ private static final long DPTZ_STREAMS_ATTRIBUTE_ID = 3L;
private static final long ZOOM_MAX_ATTRIBUTE_ID = 4L;
private static final long TILT_MIN_ATTRIBUTE_ID = 5L;
private static final long TILT_MAX_ATTRIBUTE_ID = 6L;
@@ -59221,8 +59221,8 @@
void onSuccess(List<ChipStructs.CameraAvSettingsUserLevelManagementClusterMPTZPresetStruct> value);
}
- public interface DPTZRelativeMoveAttributeCallback extends BaseAttributeCallback {
- void onSuccess(List<Integer> value);
+ public interface DPTZStreamsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<ChipStructs.CameraAvSettingsUserLevelManagementClusterDPTZStruct> value);
}
public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
@@ -59315,30 +59315,30 @@
}, MPTZ_PRESETS_ATTRIBUTE_ID, minInterval, maxInterval);
}
- public void readDPTZRelativeMoveAttribute(
- DPTZRelativeMoveAttributeCallback callback) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DPTZ_RELATIVE_MOVE_ATTRIBUTE_ID);
+ public void readDPTZStreamsAttribute(
+ DPTZStreamsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DPTZ_STREAMS_ATTRIBUTE_ID);
readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
- List<Integer> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ List<ChipStructs.CameraAvSettingsUserLevelManagementClusterDPTZStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
- }, DPTZ_RELATIVE_MOVE_ATTRIBUTE_ID, true);
+ }, DPTZ_STREAMS_ATTRIBUTE_ID, true);
}
- public void subscribeDPTZRelativeMoveAttribute(
- DPTZRelativeMoveAttributeCallback callback, int minInterval, int maxInterval) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DPTZ_RELATIVE_MOVE_ATTRIBUTE_ID);
+ public void subscribeDPTZStreamsAttribute(
+ DPTZStreamsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DPTZ_STREAMS_ATTRIBUTE_ID);
subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
- List<Integer> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ List<ChipStructs.CameraAvSettingsUserLevelManagementClusterDPTZStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
- }, DPTZ_RELATIVE_MOVE_ATTRIBUTE_ID, minInterval, maxInterval);
+ }, DPTZ_STREAMS_ATTRIBUTE_ID, minInterval, maxInterval);
}
public void readZoomMaxAttribute(
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index 315702e..34db8a3 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -14859,6 +14859,67 @@
return output.toString();
}
}
+public static class CameraAvSettingsUserLevelManagementClusterDPTZStruct {
+ public Integer videoStreamID;
+ public ChipStructs.CameraAvSettingsUserLevelManagementClusterViewportStruct viewport;
+ private static final long VIDEO_STREAM_ID_ID = 0L;
+ private static final long VIEWPORT_ID = 1L;
+
+ public CameraAvSettingsUserLevelManagementClusterDPTZStruct(
+ Integer videoStreamID,
+ ChipStructs.CameraAvSettingsUserLevelManagementClusterViewportStruct viewport
+ ) {
+ this.videoStreamID = videoStreamID;
+ this.viewport = viewport;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(VIDEO_STREAM_ID_ID, new UIntType(videoStreamID)));
+ values.add(new StructElement(VIEWPORT_ID, viewport.encodeTlv()));
+
+ return new StructType(values);
+ }
+
+ public static CameraAvSettingsUserLevelManagementClusterDPTZStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer videoStreamID = null;
+ ChipStructs.CameraAvSettingsUserLevelManagementClusterViewportStruct viewport = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == VIDEO_STREAM_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ videoStreamID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == VIEWPORT_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ viewport = ChipStructs.CameraAvSettingsUserLevelManagementClusterViewportStruct.decodeTlv(castingValue);
+ }
+ }
+ }
+ return new CameraAvSettingsUserLevelManagementClusterDPTZStruct(
+ videoStreamID,
+ viewport
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CameraAvSettingsUserLevelManagementClusterDPTZStruct {\n");
+ output.append("\tvideoStreamID: ");
+ output.append(videoStreamID);
+ output.append("\n");
+ output.append("\tviewport: ");
+ output.append(viewport);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class WebRTCTransportProviderClusterICEServerStruct {
public ArrayList<String> urls;
public Optional<String> username;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index aecb691..d6df155 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -17785,7 +17785,7 @@
MPTZPosition(0L),
MaxPresets(1L),
MPTZPresets(2L),
- DPTZRelativeMove(3L),
+ DPTZStreams(3L),
ZoomMax(4L),
TiltMin(5L),
TiltMax(6L),
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index c0e7f0f..123c394 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -18522,7 +18522,7 @@
}
}
- public static class DelegatedCameraAvSettingsUserLevelManagementClusterDPTZRelativeMoveAttributeCallback implements ChipClusters.CameraAvSettingsUserLevelManagementCluster.DPTZRelativeMoveAttributeCallback, DelegatedClusterCallback {
+ public static class DelegatedCameraAvSettingsUserLevelManagementClusterDPTZStreamsAttributeCallback implements ChipClusters.CameraAvSettingsUserLevelManagementCluster.DPTZStreamsAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
@@ -18530,9 +18530,9 @@
}
@Override
- public void onSuccess(List<Integer> valueList) {
+ public void onSuccess(List<ChipStructs.CameraAvSettingsUserLevelManagementClusterDPTZStruct> valueList) {
Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
- CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Integer>");
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CameraAvSettingsUserLevelManagementClusterDPTZStruct>");
responseValues.put(commandResponseInfo, valueList);
callback.onSuccess(responseValues);
}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index f051c0b..bcbf2dd 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -17755,17 +17755,17 @@
readCameraAvSettingsUserLevelManagementMPTZPresetsCommandParams
);
result.put("readMPTZPresetsAttribute", readCameraAvSettingsUserLevelManagementMPTZPresetsAttributeInteractionInfo);
- Map<String, CommandParameterInfo> readCameraAvSettingsUserLevelManagementDPTZRelativeMoveCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
- InteractionInfo readCameraAvSettingsUserLevelManagementDPTZRelativeMoveAttributeInteractionInfo = new InteractionInfo(
+ Map<String, CommandParameterInfo> readCameraAvSettingsUserLevelManagementDPTZStreamsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCameraAvSettingsUserLevelManagementDPTZStreamsAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
- ((ChipClusters.CameraAvSettingsUserLevelManagementCluster) cluster).readDPTZRelativeMoveAttribute(
- (ChipClusters.CameraAvSettingsUserLevelManagementCluster.DPTZRelativeMoveAttributeCallback) callback
+ ((ChipClusters.CameraAvSettingsUserLevelManagementCluster) cluster).readDPTZStreamsAttribute(
+ (ChipClusters.CameraAvSettingsUserLevelManagementCluster.DPTZStreamsAttributeCallback) callback
);
},
- () -> new ClusterInfoMapping.DelegatedCameraAvSettingsUserLevelManagementClusterDPTZRelativeMoveAttributeCallback(),
- readCameraAvSettingsUserLevelManagementDPTZRelativeMoveCommandParams
+ () -> new ClusterInfoMapping.DelegatedCameraAvSettingsUserLevelManagementClusterDPTZStreamsAttributeCallback(),
+ readCameraAvSettingsUserLevelManagementDPTZStreamsCommandParams
);
- result.put("readDPTZRelativeMoveAttribute", readCameraAvSettingsUserLevelManagementDPTZRelativeMoveAttributeInteractionInfo);
+ result.put("readDPTZStreamsAttribute", readCameraAvSettingsUserLevelManagementDPTZStreamsAttributeInteractionInfo);
Map<String, CommandParameterInfo> readCameraAvSettingsUserLevelManagementZoomMaxCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readCameraAvSettingsUserLevelManagementZoomMaxAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
index 5930db4..1e228f1 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -19,6 +19,7 @@
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvSettingsUserLevelManagementClusterDPTZStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvSettingsUserLevelManagementClusterMPTZPresetStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvSettingsUserLevelManagementClusterMPTZStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvSettingsUserLevelManagementClusterViewportStruct.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvSettingsUserLevelManagementClusterDPTZStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvSettingsUserLevelManagementClusterDPTZStruct.kt
new file mode 100644
index 0000000..f8f1f1b
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvSettingsUserLevelManagementClusterDPTZStruct.kt
@@ -0,0 +1,66 @@
+/*
+ *
+ * Copyright (c) 2023 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.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CameraAvSettingsUserLevelManagementClusterDPTZStruct(
+ val videoStreamID: UInt,
+ val viewport: CameraAvSettingsUserLevelManagementClusterViewportStruct,
+) {
+ override fun toString(): String = buildString {
+ append("CameraAvSettingsUserLevelManagementClusterDPTZStruct {\n")
+ append("\tvideoStreamID : $videoStreamID\n")
+ append("\tviewport : $viewport\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID)
+ viewport.toTlv(ContextSpecificTag(TAG_VIEWPORT), this)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_VIDEO_STREAM_ID = 0
+ private const val TAG_VIEWPORT = 1
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): CameraAvSettingsUserLevelManagementClusterDPTZStruct {
+ tlvReader.enterStructure(tlvTag)
+ val videoStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID))
+ val viewport =
+ CameraAvSettingsUserLevelManagementClusterViewportStruct.fromTlv(
+ ContextSpecificTag(TAG_VIEWPORT),
+ tlvReader,
+ )
+
+ tlvReader.exitContainer()
+
+ return CameraAvSettingsUserLevelManagementClusterDPTZStruct(videoStreamID, viewport)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvSettingsUserLevelManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvSettingsUserLevelManagementCluster.kt
index 96bcd64..5718b27 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvSettingsUserLevelManagementCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvSettingsUserLevelManagementCluster.kt
@@ -70,14 +70,17 @@
object SubscriptionEstablished : MPTZPresetsAttributeSubscriptionState()
}
- class DPTZRelativeMoveAttribute(val value: List<UShort>?)
+ class DPTZStreamsAttribute(
+ val value: List<CameraAvSettingsUserLevelManagementClusterDPTZStruct>?
+ )
- sealed class DPTZRelativeMoveAttributeSubscriptionState {
- data class Success(val value: List<UShort>?) : DPTZRelativeMoveAttributeSubscriptionState()
+ sealed class DPTZStreamsAttributeSubscriptionState {
+ data class Success(val value: List<CameraAvSettingsUserLevelManagementClusterDPTZStruct>?) :
+ DPTZStreamsAttributeSubscriptionState()
- data class Error(val exception: Exception) : DPTZRelativeMoveAttributeSubscriptionState()
+ data class Error(val exception: Exception) : DPTZStreamsAttributeSubscriptionState()
- object SubscriptionEstablished : DPTZRelativeMoveAttributeSubscriptionState()
+ object SubscriptionEstablished : DPTZStreamsAttributeSubscriptionState()
}
class GeneratedCommandListAttribute(val value: List<UInt>)
@@ -599,7 +602,7 @@
}
}
- suspend fun readDPTZRelativeMoveAttribute(): DPTZRelativeMoveAttribute {
+ suspend fun readDPTZStreamsAttribute(): DPTZStreamsAttribute {
val ATTRIBUTE_ID: UInt = 3u
val attributePath =
@@ -621,16 +624,18 @@
it.path.attributeId == ATTRIBUTE_ID
}
- requireNotNull(attributeData) { "Dptzrelativemove attribute not found in response" }
+ requireNotNull(attributeData) { "Dptzstreams attribute not found in response" }
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
- val decodedValue: List<UShort>? =
+ val decodedValue: List<CameraAvSettingsUserLevelManagementClusterDPTZStruct>? =
if (tlvReader.isNextTag(AnonymousTag)) {
- buildList<UShort> {
+ buildList<CameraAvSettingsUserLevelManagementClusterDPTZStruct> {
tlvReader.enterArray(AnonymousTag)
while (!tlvReader.isEndOfContainer()) {
- add(tlvReader.getUShort(AnonymousTag))
+ add(
+ CameraAvSettingsUserLevelManagementClusterDPTZStruct.fromTlv(AnonymousTag, tlvReader)
+ )
}
tlvReader.exitContainer()
}
@@ -638,13 +643,13 @@
null
}
- return DPTZRelativeMoveAttribute(decodedValue)
+ return DPTZStreamsAttribute(decodedValue)
}
- suspend fun subscribeDPTZRelativeMoveAttribute(
+ suspend fun subscribeDPTZStreamsAttribute(
minInterval: Int,
maxInterval: Int,
- ): Flow<DPTZRelativeMoveAttributeSubscriptionState> {
+ ): Flow<DPTZStreamsAttributeSubscriptionState> {
val ATTRIBUTE_ID: UInt = 3u
val attributePaths =
listOf(
@@ -663,7 +668,7 @@
when (subscriptionState) {
is SubscriptionState.SubscriptionErrorNotification -> {
emit(
- DPTZRelativeMoveAttributeSubscriptionState.Error(
+ DPTZStreamsAttributeSubscriptionState.Error(
Exception(
"Subscription terminated with error code: ${subscriptionState.terminationCause}"
)
@@ -676,18 +681,21 @@
.filterIsInstance<ReadData.Attribute>()
.firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
- requireNotNull(attributeData) {
- "Dptzrelativemove attribute not found in Node State update"
- }
+ requireNotNull(attributeData) { "Dptzstreams attribute not found in Node State update" }
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
- val decodedValue: List<UShort>? =
+ val decodedValue: List<CameraAvSettingsUserLevelManagementClusterDPTZStruct>? =
if (tlvReader.isNextTag(AnonymousTag)) {
- buildList<UShort> {
+ buildList<CameraAvSettingsUserLevelManagementClusterDPTZStruct> {
tlvReader.enterArray(AnonymousTag)
while (!tlvReader.isEndOfContainer()) {
- add(tlvReader.getUShort(AnonymousTag))
+ add(
+ CameraAvSettingsUserLevelManagementClusterDPTZStruct.fromTlv(
+ AnonymousTag,
+ tlvReader,
+ )
+ )
}
tlvReader.exitContainer()
}
@@ -695,10 +703,10 @@
null
}
- decodedValue?.let { emit(DPTZRelativeMoveAttributeSubscriptionState.Success(it)) }
+ decodedValue?.let { emit(DPTZStreamsAttributeSubscriptionState.Success(it)) }
}
SubscriptionState.SubscriptionEstablished -> {
- emit(DPTZRelativeMoveAttributeSubscriptionState.SubscriptionEstablished)
+ emit(DPTZStreamsAttributeSubscriptionState.SubscriptionEstablished)
}
}
}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index f8b0de9..9e81e8f 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -19,6 +19,7 @@
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/BindingClusterTargetStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvSettingsUserLevelManagementClusterDPTZStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvSettingsUserLevelManagementClusterMPTZPresetStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvSettingsUserLevelManagementClusterMPTZStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvSettingsUserLevelManagementClusterViewportStruct.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvSettingsUserLevelManagementClusterDPTZStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvSettingsUserLevelManagementClusterDPTZStruct.kt
new file mode 100644
index 0000000..12414af
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvSettingsUserLevelManagementClusterDPTZStruct.kt
@@ -0,0 +1,66 @@
+/*
+ *
+ * Copyright (c) 2023 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.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CameraAvSettingsUserLevelManagementClusterDPTZStruct(
+ val videoStreamID: UShort,
+ val viewport: CameraAvSettingsUserLevelManagementClusterViewportStruct,
+) {
+ override fun toString(): String = buildString {
+ append("CameraAvSettingsUserLevelManagementClusterDPTZStruct {\n")
+ append("\tvideoStreamID : $videoStreamID\n")
+ append("\tviewport : $viewport\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID)
+ viewport.toTlv(ContextSpecificTag(TAG_VIEWPORT), this)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_VIDEO_STREAM_ID = 0
+ private const val TAG_VIEWPORT = 1
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): CameraAvSettingsUserLevelManagementClusterDPTZStruct {
+ tlvReader.enterStructure(tlvTag)
+ val videoStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID))
+ val viewport =
+ CameraAvSettingsUserLevelManagementClusterViewportStruct.fromTlv(
+ ContextSpecificTag(TAG_VIEWPORT),
+ tlvReader,
+ )
+
+ tlvReader.exitContainer()
+
+ return CameraAvSettingsUserLevelManagementClusterDPTZStruct(videoStreamID, viewport)
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index cf054be..db155a9 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -42652,8 +42652,8 @@
}
return value;
}
- case Attributes::DPTZRelativeMove::Id: {
- using TypeInfo = Attributes::DPTZRelativeMove::TypeInfo;
+ case Attributes::DPTZStreams::Id: {
+ using TypeInfo = Attributes::DPTZStreams::TypeInfo;
TypeInfo::DecodableType cppValue;
*aError = app::DataModel::Decode(aReader, cppValue);
if (*aError != CHIP_NO_ERROR)
@@ -42668,11 +42668,99 @@
{
auto & entry_0 = iter_value_0.GetValue();
jobject newElement_0;
- std::string newElement_0ClassName = "java/lang/Integer";
- std::string newElement_0CtorSignature = "(I)V";
- jint jninewElement_0 = static_cast<jint>(entry_0);
+ jobject newElement_0_videoStreamID;
+ std::string newElement_0_videoStreamIDClassName = "java/lang/Integer";
+ std::string newElement_0_videoStreamIDCtorSignature = "(I)V";
+ jint jninewElement_0_videoStreamID = static_cast<jint>(entry_0.videoStreamID);
chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
- newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ newElement_0_videoStreamIDClassName.c_str(), newElement_0_videoStreamIDCtorSignature.c_str(),
+ jninewElement_0_videoStreamID, newElement_0_videoStreamID);
+ jobject newElement_0_viewport;
+ jobject newElement_0_viewport_x1;
+ std::string newElement_0_viewport_x1ClassName = "java/lang/Integer";
+ std::string newElement_0_viewport_x1CtorSignature = "(I)V";
+ jint jninewElement_0_viewport_x1 = static_cast<jint>(entry_0.viewport.x1);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_viewport_x1ClassName.c_str(),
+ newElement_0_viewport_x1CtorSignature.c_str(),
+ jninewElement_0_viewport_x1, newElement_0_viewport_x1);
+ jobject newElement_0_viewport_y1;
+ std::string newElement_0_viewport_y1ClassName = "java/lang/Integer";
+ std::string newElement_0_viewport_y1CtorSignature = "(I)V";
+ jint jninewElement_0_viewport_y1 = static_cast<jint>(entry_0.viewport.y1);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_viewport_y1ClassName.c_str(),
+ newElement_0_viewport_y1CtorSignature.c_str(),
+ jninewElement_0_viewport_y1, newElement_0_viewport_y1);
+ jobject newElement_0_viewport_x2;
+ std::string newElement_0_viewport_x2ClassName = "java/lang/Integer";
+ std::string newElement_0_viewport_x2CtorSignature = "(I)V";
+ jint jninewElement_0_viewport_x2 = static_cast<jint>(entry_0.viewport.x2);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_viewport_x2ClassName.c_str(),
+ newElement_0_viewport_x2CtorSignature.c_str(),
+ jninewElement_0_viewport_x2, newElement_0_viewport_x2);
+ jobject newElement_0_viewport_y2;
+ std::string newElement_0_viewport_y2ClassName = "java/lang/Integer";
+ std::string newElement_0_viewport_y2CtorSignature = "(I)V";
+ jint jninewElement_0_viewport_y2 = static_cast<jint>(entry_0.viewport.y2);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_viewport_y2ClassName.c_str(),
+ newElement_0_viewport_y2CtorSignature.c_str(),
+ jninewElement_0_viewport_y2, newElement_0_viewport_y2);
+
+ {
+ jclass viewportStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CameraAvSettingsUserLevelManagementClusterViewportStruct",
+ viewportStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl,
+ "Could not find class ChipStructs$CameraAvSettingsUserLevelManagementClusterViewportStruct");
+ return nullptr;
+ }
+
+ jmethodID viewportStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, viewportStructStructClass_2, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ &viewportStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || viewportStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(
+ Zcl, "Could not find ChipStructs$CameraAvSettingsUserLevelManagementClusterViewportStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0_viewport =
+ env->NewObject(viewportStructStructClass_2, viewportStructStructCtor_2, newElement_0_viewport_x1,
+ newElement_0_viewport_y1, newElement_0_viewport_x2, newElement_0_viewport_y2);
+ }
+
+ {
+ jclass DPTZStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CameraAvSettingsUserLevelManagementClusterDPTZStruct",
+ DPTZStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvSettingsUserLevelManagementClusterDPTZStruct");
+ return nullptr;
+ }
+
+ jmethodID DPTZStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, DPTZStructStructClass_1, "<init>",
+ "(Ljava/lang/Integer;Lchip/devicecontroller/"
+ "ChipStructs$CameraAvSettingsUserLevelManagementClusterViewportStruct;)V",
+ &DPTZStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || DPTZStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CameraAvSettingsUserLevelManagementClusterDPTZStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0 = env->NewObject(DPTZStructStructClass_1, DPTZStructStructCtor_1, newElement_0_videoStreamID,
+ newElement_0_viewport);
+ }
chip::JniReferences::GetInstance().AddToList(value, newElement_0);
}
return value;
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index 6721795..ae24d22 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -13116,9 +13116,9 @@
"reportable": True,
},
0x00000003: {
- "attributeName": "DPTZRelativeMove",
+ "attributeName": "DPTZStreams",
"attributeId": 0x00000003,
- "type": "int",
+ "type": "",
"reportable": True,
},
0x00000004: {
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 5a4b1ed..60012b7 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -47265,7 +47265,7 @@
ClusterObjectFieldDescriptor(Label="MPTZPosition", Tag=0x00000000, Type=typing.Optional[CameraAvSettingsUserLevelManagement.Structs.MPTZStruct]),
ClusterObjectFieldDescriptor(Label="maxPresets", Tag=0x00000001, Type=typing.Optional[uint]),
ClusterObjectFieldDescriptor(Label="MPTZPresets", Tag=0x00000002, Type=typing.Optional[typing.List[CameraAvSettingsUserLevelManagement.Structs.MPTZPresetStruct]]),
- ClusterObjectFieldDescriptor(Label="DPTZRelativeMove", Tag=0x00000003, Type=typing.Optional[typing.List[uint]]),
+ ClusterObjectFieldDescriptor(Label="DPTZStreams", Tag=0x00000003, Type=typing.Optional[typing.List[CameraAvSettingsUserLevelManagement.Structs.DPTZStruct]]),
ClusterObjectFieldDescriptor(Label="zoomMax", Tag=0x00000004, Type=typing.Optional[uint]),
ClusterObjectFieldDescriptor(Label="tiltMin", Tag=0x00000005, Type=typing.Optional[int]),
ClusterObjectFieldDescriptor(Label="tiltMax", Tag=0x00000006, Type=typing.Optional[int]),
@@ -47281,7 +47281,7 @@
MPTZPosition: typing.Optional[CameraAvSettingsUserLevelManagement.Structs.MPTZStruct] = None
maxPresets: typing.Optional[uint] = None
MPTZPresets: typing.Optional[typing.List[CameraAvSettingsUserLevelManagement.Structs.MPTZPresetStruct]] = None
- DPTZRelativeMove: typing.Optional[typing.List[uint]] = None
+ DPTZStreams: typing.Optional[typing.List[CameraAvSettingsUserLevelManagement.Structs.DPTZStruct]] = None
zoomMax: typing.Optional[uint] = None
tiltMin: typing.Optional[int] = None
tiltMax: typing.Optional[int] = None
@@ -47349,6 +47349,19 @@
x2: 'uint' = 0
y2: 'uint' = 0
+ @dataclass
+ class DPTZStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="viewport", Tag=1, Type=CameraAvSettingsUserLevelManagement.Structs.ViewportStruct),
+ ])
+
+ videoStreamID: 'uint' = 0
+ viewport: 'CameraAvSettingsUserLevelManagement.Structs.ViewportStruct' = field(default_factory=lambda: CameraAvSettingsUserLevelManagement.Structs.ViewportStruct())
+
class Commands:
@dataclass
class MPTZSetPosition(ClusterCommand):
@@ -47530,7 +47543,7 @@
value: typing.Optional[typing.List[CameraAvSettingsUserLevelManagement.Structs.MPTZPresetStruct]] = None
@dataclass
- class DPTZRelativeMove(ClusterAttributeDescriptor):
+ class DPTZStreams(ClusterAttributeDescriptor):
@ChipUtility.classproperty
def cluster_id(cls) -> int:
return 0x00000552
@@ -47541,9 +47554,9 @@
@ChipUtility.classproperty
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
- return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[uint]])
+ return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvSettingsUserLevelManagement.Structs.DPTZStruct]])
- value: typing.Optional[typing.List[uint]] = None
+ value: typing.Optional[typing.List[CameraAvSettingsUserLevelManagement.Structs.DPTZStruct]] = None
@dataclass
class ZoomMax(ClusterAttributeDescriptor):
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index 05ca035..cf6ecaa 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -6009,7 +6009,7 @@
case Attributes::MPTZPresets::Id: {
return YES;
}
- case Attributes::DPTZRelativeMove::Id: {
+ case Attributes::DPTZStreams::Id: {
return YES;
}
case Attributes::ZoomMax::Id: {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 8fb552c..960013d 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -18181,8 +18181,8 @@
}
return value;
}
- case Attributes::DPTZRelativeMove::Id: {
- using TypeInfo = Attributes::DPTZRelativeMove::TypeInfo;
+ case Attributes::DPTZStreams::Id: {
+ using TypeInfo = Attributes::DPTZStreams::TypeInfo;
TypeInfo::DecodableType cppValue;
*aError = DataModel::Decode(aReader, cppValue);
if (*aError != CHIP_NO_ERROR) {
@@ -18194,8 +18194,14 @@
auto iter_0 = cppValue.begin();
while (iter_0.Next()) {
auto & entry_0 = iter_0.GetValue();
- NSNumber * newElement_0;
- newElement_0 = [NSNumber numberWithUnsignedShort:entry_0];
+ MTRCameraAVSettingsUserLevelManagementClusterDPTZStruct * newElement_0;
+ newElement_0 = [MTRCameraAVSettingsUserLevelManagementClusterDPTZStruct new];
+ newElement_0.videoStreamID = [NSNumber numberWithUnsignedShort:entry_0.videoStreamID];
+ newElement_0.viewport = [MTRCameraAVSettingsUserLevelManagementClusterViewportStruct new];
+ newElement_0.viewport.x1 = [NSNumber numberWithUnsignedShort:entry_0.viewport.x1];
+ newElement_0.viewport.y1 = [NSNumber numberWithUnsignedShort:entry_0.viewport.y1];
+ newElement_0.viewport.x2 = [NSNumber numberWithUnsignedShort:entry_0.viewport.x2];
+ newElement_0.viewport.y2 = [NSNumber numberWithUnsignedShort:entry_0.viewport.y2];
[array_0 addObject:newElement_0];
}
CHIP_ERROR err = iter_0.GetStatus();
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index c871657..feeb9e7 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -14857,7 +14857,7 @@
/**
* Command MPTZRelativeMove
*
- * This command SHALL move the device by the delta values relative to the currently defined position.
+ * This command SHALL move the camera by the delta values relative to the currently defined position.
*/
- (void)MPTZRelativeMoveWithParams:(MTRCameraAVSettingsUserLevelManagementClusterMPTZRelativeMoveParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
- (void)MPTZRelativeMoveWithCompletion:(MTRStatusCompletion)completion
@@ -14889,7 +14889,7 @@
/**
* Command DPTZRelativeMove
*
- * This command SHALL change the viewports location by the amount specified in a relative fashion.
+ * This command SHALL change the per stream viewport by the amount specified in a relative fashion.
*/
- (void)DPTZRelativeMoveWithParams:(MTRCameraAVSettingsUserLevelManagementClusterDPTZRelativeMoveParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
@@ -14911,11 +14911,11 @@
reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
+ (void)readAttributeMPTZPresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
-- (void)readAttributeDPTZRelativeMoveWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
-- (void)subscribeAttributeDPTZRelativeMoveWithParams:(MTRSubscribeParams *)params
- subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
- reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
-+ (void)readAttributeDPTZRelativeMoveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)readAttributeDPTZStreamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeDPTZStreamsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeDPTZStreamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
- (void)readAttributeZoomMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
- (void)subscribeAttributeZoomMaxWithParams:(MTRSubscribeParams *)params
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index 9d63193..7cea0f26 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -101835,9 +101835,9 @@
completion:completion];
}
-- (void)readAttributeDPTZRelativeMoveWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+- (void)readAttributeDPTZStreamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
{
- using TypeInfo = CameraAvSettingsUserLevelManagement::Attributes::DPTZRelativeMove::TypeInfo;
+ using TypeInfo = CameraAvSettingsUserLevelManagement::Attributes::DPTZStreams::TypeInfo;
[self.device _readKnownAttributeWithEndpointID:self.endpointID
clusterID:@(TypeInfo::GetClusterId())
attributeID:@(TypeInfo::GetAttributeId())
@@ -101846,11 +101846,11 @@
completion:completion];
}
-- (void)subscribeAttributeDPTZRelativeMoveWithParams:(MTRSubscribeParams * _Nonnull)params
- subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
- reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+- (void)subscribeAttributeDPTZStreamsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
{
- using TypeInfo = CameraAvSettingsUserLevelManagement::Attributes::DPTZRelativeMove::TypeInfo;
+ using TypeInfo = CameraAvSettingsUserLevelManagement::Attributes::DPTZStreams::TypeInfo;
[self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
clusterID:@(TypeInfo::GetClusterId())
attributeID:@(TypeInfo::GetAttributeId())
@@ -101860,9 +101860,9 @@
subscriptionEstablished:subscriptionEstablished];
}
-+ (void)readAttributeDPTZRelativeMoveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
++ (void)readAttributeDPTZStreamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
{
- using TypeInfo = CameraAvSettingsUserLevelManagement::Attributes::DPTZRelativeMove::TypeInfo;
+ using TypeInfo = CameraAvSettingsUserLevelManagement::Attributes::DPTZStreams::TypeInfo;
[clusterStateCacheContainer
_readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
clusterID:TypeInfo::GetClusterId()
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index e8406cb..68a6ccc 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -4741,7 +4741,7 @@
MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeMPTZPositionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeMaxPresetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeMPTZPresetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
- MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeDPTZRelativeMoveID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeDPTZStreamsID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeZoomMaxID MTR_PROVISIONALLY_AVAILABLE = 0x00000004,
MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeTiltMinID MTR_PROVISIONALLY_AVAILABLE = 0x00000005,
MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeTiltMaxID MTR_PROVISIONALLY_AVAILABLE = 0x00000006,
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
index 7606b7c..5fe55e2 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
@@ -8273,8 +8273,8 @@
result = @"MPTZPresets";
break;
- case MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeDPTZRelativeMoveID:
- result = @"DPTZRelativeMove";
+ case MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeDPTZStreamsID:
+ result = @"DPTZStreams";
break;
case MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeZoomMaxID:
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index 98890ae..d9a01e1 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -6969,7 +6969,7 @@
- (NSDictionary<NSString *, id> * _Nullable)readAttributeMPTZPresetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
-- (NSDictionary<NSString *, id> * _Nullable)readAttributeDPTZRelativeMoveWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDPTZStreamsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
- (NSDictionary<NSString *, id> * _Nullable)readAttributeZoomMaxWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
index 5c0b756..05815af 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -20136,9 +20136,9 @@
return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVSettingsUserLevelManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeMPTZPresetsID) params:params];
}
-- (NSDictionary<NSString *, id> * _Nullable)readAttributeDPTZRelativeMoveWithParams:(MTRReadParams * _Nullable)params
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDPTZStreamsWithParams:(MTRReadParams * _Nullable)params
{
- return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVSettingsUserLevelManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeDPTZRelativeMoveID) params:params];
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVSettingsUserLevelManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVSettingsUserLevelManagementAttributeDPTZStreamsID) params:params];
}
- (NSDictionary<NSString *, id> * _Nullable)readAttributeZoomMaxWithParams:(MTRReadParams * _Nullable)params
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
index 53742bb..4c67977 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -2340,6 +2340,12 @@
@end
MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCameraAVSettingsUserLevelManagementClusterDPTZStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRCameraAVSettingsUserLevelManagementClusterViewportStruct * _Nonnull viewport MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
@interface MTRWebRTCTransportProviderClusterICEServerStruct : NSObject <NSCopying>
@property (nonatomic, copy) NSArray * _Nonnull urls MTR_PROVISIONALLY_AVAILABLE;
@property (nonatomic, copy) NSString * _Nullable username MTR_PROVISIONALLY_AVAILABLE;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
index 24837ce..303b1ac 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
@@ -9781,6 +9781,36 @@
@end
+@implementation MTRCameraAVSettingsUserLevelManagementClusterDPTZStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _videoStreamID = @(0);
+
+ _viewport = [MTRCameraAVSettingsUserLevelManagementClusterViewportStruct new];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCameraAVSettingsUserLevelManagementClusterDPTZStruct alloc] init];
+
+ other.videoStreamID = self.videoStreamID;
+ other.viewport = self.viewport;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; viewport:%@; >", NSStringFromClass([self class]), _videoStreamID, _viewport];
+ return descriptionString;
+}
+
+@end
+
@implementation MTRWebRTCTransportProviderClusterICEServerStruct
- (instancetype)init
{
diff --git a/src/python_testing/TC_AVSUM_2_1.py b/src/python_testing/TC_AVSUM_2_1.py
index 6f339fe..74253e1 100644
--- a/src/python_testing/TC_AVSUM_2_1.py
+++ b/src/python_testing/TC_AVSUM_2_1.py
@@ -60,7 +60,7 @@
TestStep(8, "Read and verify MPTZPosition attribute."),
TestStep(9, "Read and verify MaxPresets attribute, if supported."),
TestStep(10, "Read and verify MPTZPresets attribute, if supported."),
- TestStep(11, "Read and verify DPTZRelativeMove attribute, if supported"),
+ TestStep(11, "Read and verify DPTZStreams attribute, if supported"),
]
return steps
@@ -184,16 +184,16 @@
if self.has_feature_dptz:
self.step(11)
- asserts.assert_in(attributes.DPTZRelativeMove.attribute_id, attribute_list,
- "DPTZRelativeMove attribute is a mandatory attribute if DPTZ.")
+ asserts.assert_in(attributes.DPTZStreams.attribute_id, attribute_list,
+ "DPTZStreams attribute is a mandatory attribute if DPTZ.")
- dptz_relative_move_dut = await self.read_avsum_attribute_expect_success(endpoint, attributes.DPTZRelativeMove)
- if dptz_relative_move_dut is not None:
+ dptz_streams_dut = await self.read_avsum_attribute_expect_success(endpoint, attributes.DPTZStreams)
+ if dptz_streams_dut is not None:
# Verify that all elements in the list are unique
- asserts.assert_equal(len(dptz_relative_move_dut), len(
- set(dptz_relative_move_dut)), "DPTZRelativeMove has non-unique values")
- for videostreamid in dptz_relative_move_dut:
- asserts.assert_greater_equal(videostreamid, 0, "Provided video stream id is out of range")
+ asserts.assert_equal(len(dptz_streams_dut), len(
+ set(dptz_streams_dut)), "DPTZStreams has non-unique values")
+ for streams in dptz_streams_dut:
+ asserts.assert_greater_equal(streams.videostreamid, 0, "Provided video stream id is out of range")
else:
logging.info("DPTZ Feature not supported. Test step skipped")
self.skip_step(11)
diff --git a/src/python_testing/TC_AVSUM_2_8.py b/src/python_testing/TC_AVSUM_2_8.py
index d6c61df..965a8ad 100644
--- a/src/python_testing/TC_AVSUM_2_8.py
+++ b/src/python_testing/TC_AVSUM_2_8.py
@@ -53,12 +53,11 @@
TestStep(2, "Send DPTZRelativeMove with an unknown stream ID, but valid Zoom Delta verify NotFound response"),
TestStep(3, "Send a VideoStreamAllocate command to AVStreamManagement to allocate a video stream ID. Record the returned ID"),
TestStep(4, "Send DPTZRelativeMove with the allocated stream ID, invalid Zoom Delta. Verify ConstraintError response"),
- TestStep(5, "Send DPTZRelativeMove with the allocated stream ID, valid Zoom Delta. But a viewport hasn't been set. Verify NotFound response"),
- TestStep(6, "Create a viewport with a valid AR. Set this via DPTZSetViewport"),
- TestStep(7, "Setup deltaX and deltaY to move beyond the cartesian plan, send via DPTZRelativeMove. Verify success"),
- TestStep(8, "Setup deltaX to move the viewport to the right, send via DPTZRelativeMove. Verify success"),
- TestStep(9, "Setup deltaY to move the viewport down, send via DPTZRelativeMove. Verify success"),
- TestStep(10, "Repeatedly invoke DPTZRelativeMove with a Zoom Delta of 100%, verify no error on max out of sensor size"),
+ TestStep(5, "Create a viewport with a valid AR. Set this via DPTZSetViewport"),
+ TestStep(6, "Setup deltaX and deltaY to move beyond the cartesian plan, send via DPTZRelativeMove. Verify success"),
+ TestStep(7, "Setup deltaX to move the viewport to the right, send via DPTZRelativeMove. Verify success"),
+ TestStep(8, "Setup deltaY to move the viewport down, send via DPTZRelativeMove. Verify success"),
+ TestStep(9, "Repeatedly invoke DPTZRelativeMove with a Zoom Delta of 100%, verify no error on max out of sensor size"),
]
return steps
@@ -95,10 +94,6 @@
await self.send_dptz_relative_move_command(endpoint, videoStreamID, zoomDelta=101, expected_status=Status.ConstraintError)
self.step(5)
- # Send a dptzrelativemove for the correct stream, valid ZoomDelta, but we haven't actually set a viewport yet
- await self.send_dptz_relative_move_command(endpoint, videoStreamID, zoomDelta=50, expected_status=Status.NotFound)
-
- self.step(6)
# Set a viewport
viewport = await self.read_avstr_attribute_expect_success(endpoint, attributesAVSTR.Viewport)
sensordimensions = await self.read_avstr_attribute_expect_success(endpoint, attributesAVSTR.VideoSensorParams)
@@ -111,21 +106,21 @@
y2=viewportheight)
await self.send_dptz_set_viewport_command(endpoint, videoStreamID, passingviewport)
- self.step(7)
+ self.step(6)
# Send a dptzrelativemove based on the set viewport, move to beyond cartesian plane
deltaX = -x1 * 2
deltaY = -viewportheight * 2
await self.send_dptz_relative_move_command(endpoint, videoStreamID, deltaX=deltaX, deltaY=deltaY)
- self.step(8)
+ self.step(7)
# Send a dptzrelativemove based on the current viewport, move to the right
await self.send_dptz_relative_move_command(endpoint, videoStreamID, deltaX=100)
- self.step(9)
+ self.step(8)
# Send a dptzrelativemove based on the new viewport, move down
await self.send_dptz_relative_move_command(endpoint, videoStreamID, deltaY=100)
- self.step(10)
+ self.step(9)
# Send a dptzrelativemove based on the new viewport, zoom to beyond sensor size
currentsize = (viewport.x2-viewport.x1) * (viewport.y2-viewport.y1)
sensorsize = sensordimensions.sensorWidth * sensordimensions.sensorHeight
diff --git a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/AttributeIds.h b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/AttributeIds.h
index 9181727..8ce41c2 100644
--- a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/AttributeIds.h
+++ b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/AttributeIds.h
@@ -24,9 +24,9 @@
inline constexpr AttributeId Id = 0x00000002;
} // namespace MPTZPresets
-namespace DPTZRelativeMove {
+namespace DPTZStreams {
inline constexpr AttributeId Id = 0x00000003;
-} // namespace DPTZRelativeMove
+} // namespace DPTZStreams
namespace ZoomMax {
inline constexpr AttributeId Id = 0x00000004;
diff --git a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Attributes.h b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Attributes.h
index 8d0f723..ddc8bd7 100644
--- a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Attributes.h
+++ b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Attributes.h
@@ -80,18 +80,21 @@
static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace MPTZPresets
-namespace DPTZRelativeMove {
+namespace DPTZStreams {
struct TypeInfo
{
- using Type = chip::app::DataModel::List<const uint16_t>;
- using DecodableType = chip::app::DataModel::DecodableList<uint16_t>;
- using DecodableArgType = const chip::app::DataModel::DecodableList<uint16_t> &;
+ using Type =
+ chip::app::DataModel::List<const chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::Type>;
+ using DecodableType = chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::DecodableType>;
+ using DecodableArgType = const chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::DecodableType> &;
static constexpr ClusterId GetClusterId() { return Clusters::CameraAvSettingsUserLevelManagement::Id; }
- static constexpr AttributeId GetAttributeId() { return Attributes::DPTZRelativeMove::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::DPTZStreams::Id; }
static constexpr bool MustUseTimedWrite() { return false; }
};
-} // namespace DPTZRelativeMove
+} // namespace DPTZStreams
namespace ZoomMax {
struct TypeInfo
{
@@ -194,7 +197,7 @@
Attributes::MPTZPosition::TypeInfo::DecodableType MPTZPosition;
Attributes::MaxPresets::TypeInfo::DecodableType maxPresets = static_cast<uint8_t>(0);
Attributes::MPTZPresets::TypeInfo::DecodableType MPTZPresets;
- Attributes::DPTZRelativeMove::TypeInfo::DecodableType DPTZRelativeMove;
+ Attributes::DPTZStreams::TypeInfo::DecodableType DPTZStreams;
Attributes::ZoomMax::TypeInfo::DecodableType zoomMax = static_cast<uint8_t>(0);
Attributes::TiltMin::TypeInfo::DecodableType tiltMin = static_cast<int16_t>(0);
Attributes::TiltMax::TypeInfo::DecodableType tiltMax = static_cast<int16_t>(0);
diff --git a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Attributes.ipp b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Attributes.ipp
index 14306d4..83d2298 100644
--- a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Attributes.ipp
+++ b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Attributes.ipp
@@ -36,8 +36,8 @@
return DataModel::Decode(reader, maxPresets);
case Attributes::MPTZPresets::TypeInfo::GetAttributeId():
return DataModel::Decode(reader, MPTZPresets);
- case Attributes::DPTZRelativeMove::TypeInfo::GetAttributeId():
- return DataModel::Decode(reader, DPTZRelativeMove);
+ case Attributes::DPTZStreams::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, DPTZStreams);
case Attributes::ZoomMax::TypeInfo::GetAttributeId():
return DataModel::Decode(reader, zoomMax);
case Attributes::TiltMin::TypeInfo::GetAttributeId():
diff --git a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Metadata.h b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Metadata.h
index cb90408..5ee8f52 100644
--- a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Metadata.h
+++ b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Metadata.h
@@ -32,12 +32,11 @@
kMetadataEntry(MPTZPresets::Id, BitFlags<DataModel::AttributeQualityFlags>(DataModel::AttributeQualityFlags::kListAttribute),
Access::Privilege::kView, std::nullopt);
} // namespace MPTZPresets
-namespace DPTZRelativeMove {
+namespace DPTZStreams {
inline constexpr DataModel::AttributeEntry
- kMetadataEntry(DPTZRelativeMove::Id,
- BitFlags<DataModel::AttributeQualityFlags>(DataModel::AttributeQualityFlags::kListAttribute),
+ kMetadataEntry(DPTZStreams::Id, BitFlags<DataModel::AttributeQualityFlags>(DataModel::AttributeQualityFlags::kListAttribute),
Access::Privilege::kView, std::nullopt);
-} // namespace DPTZRelativeMove
+} // namespace DPTZStreams
namespace ZoomMax {
inline constexpr DataModel::AttributeEntry kMetadataEntry(ZoomMax::Id, BitFlags<DataModel::AttributeQualityFlags>(),
Access::Privilege::kView, std::nullopt);
diff --git a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Structs.h b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Structs.h
index 2f73037..6915a3b 100644
--- a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Structs.h
+++ b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Structs.h
@@ -86,6 +86,29 @@
} // namespace MPTZPresetStruct
namespace ViewportStruct = Clusters::detail::Structs::ViewportStruct;
+namespace DPTZStruct {
+enum class Fields : uint8_t
+{
+ kVideoStreamID = 0,
+ kViewport = 1,
+};
+
+struct Type
+{
+public:
+ uint16_t videoStreamID = static_cast<uint16_t>(0);
+ Structs::ViewportStruct::Type viewport;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace DPTZStruct
} // namespace Structs
} // namespace CameraAvSettingsUserLevelManagement
} // namespace Clusters
diff --git a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Structs.ipp b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Structs.ipp
index fd92cd8..00c1093 100644
--- a/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Structs.ipp
+++ b/zzz_generated/app-common/clusters/CameraAvSettingsUserLevelManagement/Structs.ipp
@@ -104,6 +104,40 @@
}
} // namespace MPTZPresetStruct
+
+namespace DPTZStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kVideoStreamID), videoStreamID);
+ encoder.Encode(to_underlying(Fields::kViewport), viewport);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ uint8_t __context_tag = 0;
+ CHIP_ERROR err = __iterator.Next(__context_tag);
+ VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
+ ReturnErrorOnFailure(err);
+
+ if (__context_tag == to_underlying(Fields::kVideoStreamID))
+ {
+ err = DataModel::Decode(reader, videoStreamID);
+ }
+ else if (__context_tag == to_underlying(Fields::kViewport))
+ {
+ err = DataModel::Decode(reader, viewport);
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace DPTZStruct
} // namespace Structs
} // namespace CameraAvSettingsUserLevelManagement
} // namespace Clusters
diff --git a/zzz_generated/app-common/clusters/shared/Structs.h b/zzz_generated/app-common/clusters/shared/Structs.h
index 3c5d916..f34d977 100644
--- a/zzz_generated/app-common/clusters/shared/Structs.h
+++ b/zzz_generated/app-common/clusters/shared/Structs.h
@@ -169,6 +169,33 @@
};
} // namespace MeasurementAccuracyStruct
+namespace ViewportStruct {
+enum class Fields : uint8_t
+{
+ kX1 = 0,
+ kY1 = 1,
+ kX2 = 2,
+ kY2 = 3,
+};
+
+struct Type
+{
+public:
+ uint16_t x1 = static_cast<uint16_t>(0);
+ uint16_t y1 = static_cast<uint16_t>(0);
+ uint16_t x2 = static_cast<uint16_t>(0);
+ uint16_t y2 = static_cast<uint16_t>(0);
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace ViewportStruct
namespace ApplicationStruct {
enum class Fields : uint8_t
{
@@ -299,33 +326,6 @@
using DecodableType = Type;
} // namespace OperationalStateStruct
-namespace ViewportStruct {
-enum class Fields : uint8_t
-{
- kX1 = 0,
- kY1 = 1,
- kX2 = 2,
- kY2 = 3,
-};
-
-struct Type
-{
-public:
- uint16_t x1 = static_cast<uint16_t>(0);
- uint16_t y1 = static_cast<uint16_t>(0);
- uint16_t x2 = static_cast<uint16_t>(0);
- uint16_t y2 = static_cast<uint16_t>(0);
-
- CHIP_ERROR Decode(TLV::TLVReader & reader);
-
- static constexpr bool kIsFabricScoped = false;
-
- CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
-};
-
-using DecodableType = Type;
-
-} // namespace ViewportStruct
namespace WebRTCSessionStruct {
enum class Fields : uint8_t
{
diff --git a/zzz_generated/app-common/clusters/shared/Structs.ipp b/zzz_generated/app-common/clusters/shared/Structs.ipp
index 58c3ca6..4bab4aa 100644
--- a/zzz_generated/app-common/clusters/shared/Structs.ipp
+++ b/zzz_generated/app-common/clusters/shared/Structs.ipp
@@ -215,6 +215,50 @@
} // namespace MeasurementAccuracyStruct
+namespace ViewportStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kX1), x1);
+ encoder.Encode(to_underlying(Fields::kY1), y1);
+ encoder.Encode(to_underlying(Fields::kX2), x2);
+ encoder.Encode(to_underlying(Fields::kY2), y2);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ uint8_t __context_tag = 0;
+ CHIP_ERROR err = __iterator.Next(__context_tag);
+ VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
+ ReturnErrorOnFailure(err);
+
+ if (__context_tag == to_underlying(Fields::kX1))
+ {
+ err = DataModel::Decode(reader, x1);
+ }
+ else if (__context_tag == to_underlying(Fields::kY1))
+ {
+ err = DataModel::Decode(reader, y1);
+ }
+ else if (__context_tag == to_underlying(Fields::kX2))
+ {
+ err = DataModel::Decode(reader, x2);
+ }
+ else if (__context_tag == to_underlying(Fields::kY2))
+ {
+ err = DataModel::Decode(reader, y2);
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace ViewportStruct
+
namespace ApplicationStruct {
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
@@ -400,50 +444,6 @@
} // namespace OperationalStateStruct
-namespace ViewportStruct {
-CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
-{
- DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
- encoder.Encode(to_underlying(Fields::kX1), x1);
- encoder.Encode(to_underlying(Fields::kY1), y1);
- encoder.Encode(to_underlying(Fields::kX2), x2);
- encoder.Encode(to_underlying(Fields::kY2), y2);
- return encoder.Finalize();
-}
-
-CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
-{
- detail::StructDecodeIterator __iterator(reader);
- while (true)
- {
- uint8_t __context_tag = 0;
- CHIP_ERROR err = __iterator.Next(__context_tag);
- VerifyOrReturnError(err != CHIP_ERROR_END_OF_TLV, CHIP_NO_ERROR);
- ReturnErrorOnFailure(err);
-
- if (__context_tag == to_underlying(Fields::kX1))
- {
- err = DataModel::Decode(reader, x1);
- }
- else if (__context_tag == to_underlying(Fields::kY1))
- {
- err = DataModel::Decode(reader, y1);
- }
- else if (__context_tag == to_underlying(Fields::kX2))
- {
- err = DataModel::Decode(reader, x2);
- }
- else if (__context_tag == to_underlying(Fields::kY2))
- {
- err = DataModel::Decode(reader, y2);
- }
-
- ReturnErrorOnFailure(err);
- }
-}
-
-} // namespace ViewportStruct
-
namespace WebRTCSessionStruct {
CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index c0db848..f44c5f6 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -14375,7 +14375,7 @@
| * MPTZPosition | 0x0000 |
| * MaxPresets | 0x0001 |
| * MPTZPresets | 0x0002 |
-| * DPTZRelativeMove | 0x0003 |
+| * DPTZStreams | 0x0003 |
| * ZoomMax | 0x0004 |
| * TiltMin | 0x0005 |
| * TiltMax | 0x0006 |
@@ -29830,7 +29830,7 @@
make_unique<ReadAttribute>(Id, "mptzposition", Attributes::MPTZPosition::Id, credsIssuerConfig), //
make_unique<ReadAttribute>(Id, "max-presets", Attributes::MaxPresets::Id, credsIssuerConfig), //
make_unique<ReadAttribute>(Id, "mptzpresets", Attributes::MPTZPresets::Id, credsIssuerConfig), //
- make_unique<ReadAttribute>(Id, "dptzrelative-move", Attributes::DPTZRelativeMove::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "dptzstreams", Attributes::DPTZStreams::Id, credsIssuerConfig), //
make_unique<ReadAttribute>(Id, "zoom-max", Attributes::ZoomMax::Id, credsIssuerConfig), //
make_unique<ReadAttribute>(Id, "tilt-min", Attributes::TiltMin::Id, credsIssuerConfig), //
make_unique<ReadAttribute>(Id, "tilt-max", Attributes::TiltMax::Id, credsIssuerConfig), //
@@ -29849,8 +29849,9 @@
make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<
const chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::MPTZPresetStruct::Type>>>(
Id, "mptzpresets", Attributes::MPTZPresets::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
- make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const uint16_t>>>(
- Id, "dptzrelative-move", Attributes::DPTZRelativeMove::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::List<const chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::Type>>>(
+ Id, "dptzstreams", Attributes::DPTZStreams::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
make_unique<WriteAttribute<uint8_t>>(Id, "zoom-max", 0, UINT8_MAX, Attributes::ZoomMax::Id, WriteCommandType::kForceWrite,
credsIssuerConfig), //
make_unique<WriteAttribute<int16_t>>(Id, "tilt-min", INT16_MIN, INT16_MAX, Attributes::TiltMin::Id,
@@ -29876,7 +29877,7 @@
make_unique<SubscribeAttribute>(Id, "mptzposition", Attributes::MPTZPosition::Id, credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "max-presets", Attributes::MaxPresets::Id, credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "mptzpresets", Attributes::MPTZPresets::Id, credsIssuerConfig), //
- make_unique<SubscribeAttribute>(Id, "dptzrelative-move", Attributes::DPTZRelativeMove::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "dptzstreams", Attributes::DPTZStreams::Id, credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "zoom-max", Attributes::ZoomMax::Id, credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "tilt-min", Attributes::TiltMin::Id, credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "tilt-max", Attributes::TiltMax::Id, credsIssuerConfig), //
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
index 6505deb..9989334 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
@@ -564,6 +564,47 @@
ComplexArgumentParser::Finalize(request.accuracyRanges);
}
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ViewportStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ViewportStruct.x1", "x1", value.isMember("x1")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ViewportStruct.y1", "y1", value.isMember("y1")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ViewportStruct.x2", "x2", value.isMember("x2")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ViewportStruct.y2", "y2", value.isMember("y2")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "x1");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.x1, value["x1"]));
+ valueCopy.removeMember("x1");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "y1");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.y1, value["y1"]));
+ valueCopy.removeMember("y1");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "x2");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.x2, value["x2"]));
+ valueCopy.removeMember("x2");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "y2");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.y2, value["y2"]));
+ valueCopy.removeMember("y2");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::ViewportStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.x1);
+ ComplexArgumentParser::Finalize(request.y1);
+ ComplexArgumentParser::Finalize(request.x2);
+ ComplexArgumentParser::Finalize(request.y2);
+}
+
CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request,
Json::Value & value)
{
@@ -745,47 +786,6 @@
ComplexArgumentParser::Finalize(request.operationalStateLabel);
}
-CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ViewportStruct::Type & request,
- Json::Value & value)
-{
- VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
-
- // Copy to track which members we already processed.
- Json::Value valueCopy(value);
-
- ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ViewportStruct.x1", "x1", value.isMember("x1")));
- ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ViewportStruct.y1", "y1", value.isMember("y1")));
- ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ViewportStruct.x2", "x2", value.isMember("x2")));
- ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ViewportStruct.y2", "y2", value.isMember("y2")));
-
- char labelWithMember[kMaxLabelLength];
- snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "x1");
- ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.x1, value["x1"]));
- valueCopy.removeMember("x1");
-
- snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "y1");
- ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.y1, value["y1"]));
- valueCopy.removeMember("y1");
-
- snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "x2");
- ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.x2, value["x2"]));
- valueCopy.removeMember("x2");
-
- snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "y2");
- ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.y2, value["y2"]));
- valueCopy.removeMember("y2");
-
- return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
-}
-
-void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::ViewportStruct::Type & request)
-{
- ComplexArgumentParser::Finalize(request.x1);
- ComplexArgumentParser::Finalize(request.y1);
- ComplexArgumentParser::Finalize(request.x2);
- ComplexArgumentParser::Finalize(request.y2);
-}
-
CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
chip::app::Clusters::detail::Structs::WebRTCSessionStruct::Type & request,
Json::Value & value)
@@ -6892,6 +6892,38 @@
ComplexArgumentParser::Finalize(request.settings);
}
+CHIP_ERROR
+ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("DPTZStruct.videoStreamID", "videoStreamID", value.isMember("videoStreamID")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DPTZStruct.viewport", "viewport", value.isMember("viewport")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "videoStreamID");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.videoStreamID, value["videoStreamID"]));
+ valueCopy.removeMember("videoStreamID");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "viewport");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.viewport, value["viewport"]));
+ valueCopy.removeMember("viewport");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.videoStreamID);
+ ComplexArgumentParser::Finalize(request.viewport);
+}
+
CHIP_ERROR ComplexArgumentParser::Setup(
const char * label,
chip::app::Clusters::PushAvStreamTransport::Structs::TransportMotionTriggerTimeControlStruct::Type & request,
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
index f068a31..e243e5b 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
@@ -82,6 +82,11 @@
static void Finalize(chip::app::Clusters::detail::Structs::MeasurementAccuracyStruct::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ViewportStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::detail::Structs::ViewportStruct::Type & request);
+
static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request,
Json::Value & value);
@@ -106,11 +111,6 @@
static void Finalize(chip::app::Clusters::detail::Structs::OperationalStateStruct::Type & request);
-static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ViewportStruct::Type & request,
- Json::Value & value);
-
-static void Finalize(chip::app::Clusters::detail::Structs::ViewportStruct::Type & request);
-
static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::WebRTCSessionStruct::Type & request,
Json::Value & value);
@@ -778,6 +778,12 @@
static void Finalize(chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::MPTZPresetStruct::Type & request);
+static CHIP_ERROR Setup(const char * label,
+ chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::Type & request);
+
static CHIP_ERROR
Setup(const char * label,
chip::app::Clusters::PushAvStreamTransport::Structs::TransportMotionTriggerTimeControlStruct::Type & request,
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
index a2de616..a25912b 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
@@ -502,6 +502,47 @@
}
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::detail::Structs::ViewportStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("X1", indent + 1, value.x1);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'X1'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Y1", indent + 1, value.y1);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Y1'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("X2", indent + 1, value.x2);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'X2'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Y2", indent + 1, value.y2);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Y2'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
@@ -651,47 +692,6 @@
}
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
- const chip::app::Clusters::detail::Structs::ViewportStruct::DecodableType & value)
-{
- DataModelLogger::LogString(label, indent, "{");
- {
- CHIP_ERROR err = LogValue("X1", indent + 1, value.x1);
- if (err != CHIP_NO_ERROR)
- {
- DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'X1'");
- return err;
- }
- }
- {
- CHIP_ERROR err = LogValue("Y1", indent + 1, value.y1);
- if (err != CHIP_NO_ERROR)
- {
- DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Y1'");
- return err;
- }
- }
- {
- CHIP_ERROR err = LogValue("X2", indent + 1, value.x2);
- if (err != CHIP_NO_ERROR)
- {
- DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'X2'");
- return err;
- }
- }
- {
- CHIP_ERROR err = LogValue("Y2", indent + 1, value.y2);
- if (err != CHIP_NO_ERROR)
- {
- DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Y2'");
- return err;
- }
- }
- DataModelLogger::LogString(indent, "}");
-
- return CHIP_NO_ERROR;
-}
-
-CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const chip::app::Clusters::detail::Structs::WebRTCSessionStruct::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
@@ -6131,6 +6131,32 @@
CHIP_ERROR DataModelLogger::LogValue(
const char * label, size_t indent,
+ const chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("VideoStreamID", indent + 1, value.videoStreamID);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'VideoStreamID'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Viewport", indent + 1, value.viewport);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Viewport'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(
+ const char * label, size_t indent,
const chip::app::Clusters::PushAvStreamTransport::Structs::TransportMotionTriggerTimeControlStruct::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
@@ -20800,10 +20826,12 @@
ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
return DataModelLogger::LogValue("MPTZPresets", 1, value);
}
- case CameraAvSettingsUserLevelManagement::Attributes::DPTZRelativeMove::Id: {
- chip::app::DataModel::DecodableList<uint16_t> value;
+ case CameraAvSettingsUserLevelManagement::Attributes::DPTZStreams::Id: {
+ chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::DecodableType>
+ value;
ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
- return DataModelLogger::LogValue("DPTZRelativeMove", 1, value);
+ return DataModelLogger::LogValue("DPTZStreams", 1, value);
}
case CameraAvSettingsUserLevelManagement::Attributes::ZoomMax::Id: {
uint8_t value;
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
index 4c42e28..8ff094a 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
@@ -57,6 +57,9 @@
const chip::app::Clusters::detail::Structs::MeasurementAccuracyStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::detail::Structs::ViewportStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -72,9 +75,6 @@
const chip::app::Clusters::detail::Structs::OperationalStateStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
- const chip::app::Clusters::detail::Structs::ViewportStruct::DecodableType & value);
-
-static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::detail::Structs::WebRTCSessionStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -477,6 +477,10 @@
static CHIP_ERROR
LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CameraAvSettingsUserLevelManagement::Structs::DPTZStruct::DecodableType & value);
+
+static CHIP_ERROR
+LogValue(const char * label, size_t indent,
const chip::app::Clusters::PushAvStreamTransport::Structs::TransportMotionTriggerTimeControlStruct::DecodableType & value);
static CHIP_ERROR
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp
index 300a4f2..f7560ad 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp
@@ -4396,8 +4396,8 @@
return "MaxPresets";
case chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::MPTZPresets::Id:
return "MPTZPresets";
- case chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::DPTZRelativeMove::Id:
- return "DPTZRelativeMove";
+ case chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::DPTZStreams::Id:
+ return "DPTZStreams";
case chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::ZoomMax::Id:
return "ZoomMax";
case chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::TiltMin::Id:
diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
index eaad1b8..195ca82 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
@@ -157366,7 +157366,7 @@
| * MPTZPosition | 0x0000 |
| * MaxPresets | 0x0001 |
| * MPTZPresets | 0x0002 |
-| * DPTZRelativeMove | 0x0003 |
+| * DPTZStreams | 0x0003 |
| * ZoomMax | 0x0004 |
| * TiltMin | 0x0005 |
| * TiltMax | 0x0006 |
@@ -158111,34 +158111,34 @@
#if MTR_ENABLE_PROVISIONAL
/*
- * Attribute DPTZRelativeMove
+ * Attribute DPTZStreams
*/
-class ReadCameraAvSettingsUserLevelManagementDPTZRelativeMove : public ReadAttribute {
+class ReadCameraAvSettingsUserLevelManagementDPTZStreams : public ReadAttribute {
public:
- ReadCameraAvSettingsUserLevelManagementDPTZRelativeMove()
- : ReadAttribute("dptzrelative-move")
+ ReadCameraAvSettingsUserLevelManagementDPTZStreams()
+ : ReadAttribute("dptzstreams")
{
}
- ~ReadCameraAvSettingsUserLevelManagementDPTZRelativeMove()
+ ~ReadCameraAvSettingsUserLevelManagementDPTZStreams()
{
}
CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
{
constexpr chip::ClusterId clusterId = chip::app::Clusters::CameraAvSettingsUserLevelManagement::Id;
- constexpr chip::AttributeId attributeId = chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::DPTZRelativeMove::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::DPTZStreams::Id;
ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
__auto_type * cluster = [[MTRBaseClusterCameraAVSettingsUserLevelManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
- [cluster readAttributeDPTZRelativeMoveWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
- NSLog(@"CameraAVSettingsUserLevelManagement.DPTZRelativeMove response %@", [value description]);
+ [cluster readAttributeDPTZStreamsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CameraAVSettingsUserLevelManagement.DPTZStreams response %@", [value description]);
if (error == nil) {
RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
} else {
- LogNSError("CameraAVSettingsUserLevelManagement DPTZRelativeMove read Error", error);
+ LogNSError("CameraAVSettingsUserLevelManagement DPTZStreams read Error", error);
RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
}
SetCommandExitStatus(error);
@@ -158147,21 +158147,21 @@
}
};
-class SubscribeAttributeCameraAvSettingsUserLevelManagementDPTZRelativeMove : public SubscribeAttribute {
+class SubscribeAttributeCameraAvSettingsUserLevelManagementDPTZStreams : public SubscribeAttribute {
public:
- SubscribeAttributeCameraAvSettingsUserLevelManagementDPTZRelativeMove()
- : SubscribeAttribute("dptzrelative-move")
+ SubscribeAttributeCameraAvSettingsUserLevelManagementDPTZStreams()
+ : SubscribeAttribute("dptzstreams")
{
}
- ~SubscribeAttributeCameraAvSettingsUserLevelManagementDPTZRelativeMove()
+ ~SubscribeAttributeCameraAvSettingsUserLevelManagementDPTZStreams()
{
}
CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
{
constexpr chip::ClusterId clusterId = chip::app::Clusters::CameraAvSettingsUserLevelManagement::Id;
- constexpr chip::CommandId attributeId = chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::DPTZRelativeMove::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CameraAvSettingsUserLevelManagement::Attributes::DPTZStreams::Id;
ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
@@ -158176,10 +158176,10 @@
if (mAutoResubscribe.HasValue()) {
params.resubscribeAutomatically = mAutoResubscribe.Value();
}
- [cluster subscribeAttributeDPTZRelativeMoveWithParams:params
+ [cluster subscribeAttributeDPTZStreamsWithParams:params
subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
- NSLog(@"CameraAVSettingsUserLevelManagement.DPTZRelativeMove response %@", [value description]);
+ NSLog(@"CameraAVSettingsUserLevelManagement.DPTZStreams response %@", [value description]);
if (error == nil) {
RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
} else {
@@ -194795,8 +194795,8 @@
make_unique<SubscribeAttributeCameraAvSettingsUserLevelManagementMPTZPresets>(), //
#endif // MTR_ENABLE_PROVISIONAL
#if MTR_ENABLE_PROVISIONAL
- make_unique<ReadCameraAvSettingsUserLevelManagementDPTZRelativeMove>(), //
- make_unique<SubscribeAttributeCameraAvSettingsUserLevelManagementDPTZRelativeMove>(), //
+ make_unique<ReadCameraAvSettingsUserLevelManagementDPTZStreams>(), //
+ make_unique<SubscribeAttributeCameraAvSettingsUserLevelManagementDPTZStreams>(), //
#endif // MTR_ENABLE_PROVISIONAL
#if MTR_ENABLE_PROVISIONAL
make_unique<ReadCameraAvSettingsUserLevelManagementZoomMax>(), //