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 b9c61172a2a1c2..0f39a04b36507a 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 @@ -17,9 +17,9 @@ limitations under the License. @@ -147,7 +147,7 @@ Alchemy: v1.6.8+dirty The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. true true - + @@ -379,15 +379,34 @@ Alchemy: v1.6.8+dirty + + + + + + + + + + + + + + + + + + + This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier. - - - - - - + + + + + + @@ -395,7 +414,7 @@ Alchemy: v1.6.8+dirty This command SHALL be sent by the camera in response to the AudioStreamAllocate command, carrying the newly allocated or re-used audio stream identifier. - + @@ -404,7 +423,7 @@ Alchemy: v1.6.8+dirty This command SHALL deallocate an audio stream on the camera, corresponding to the given audio stream identifier. - + @@ -413,17 +432,17 @@ Alchemy: v1.6.8+dirty This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. - - - - - - - - - - - + + + + + + + + + + + @@ -431,7 +450,7 @@ Alchemy: v1.6.8+dirty This command SHALL be sent by the camera in response to the VideoStreamAllocate command, carrying the newly allocated or re-used video stream identifier. - + @@ -440,9 +459,9 @@ Alchemy: v1.6.8+dirty This command SHALL be used to modify a stream specified by the VideoStreamID. - - - + + + @@ -457,7 +476,7 @@ Alchemy: v1.6.8+dirty This command SHALL deallocate a video stream on the camera, corresponding to the given video stream identifier. - + @@ -466,13 +485,13 @@ Alchemy: v1.6.8+dirty This command SHALL allocate a snapshot stream on the device and return an allocated snapshot stream identifier. - - - - - - - + + + + + + + @@ -480,7 +499,7 @@ Alchemy: v1.6.8+dirty This command SHALL be sent by the device in response to the SnapshotStreamAllocate command, carrying the newly allocated or re-used snapshot stream identifier. - + @@ -489,9 +508,9 @@ Alchemy: v1.6.8+dirty This command SHALL be used to modify a stream specified by the VideoStreamID. - - - + + + @@ -506,7 +525,7 @@ Alchemy: v1.6.8+dirty This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. - + @@ -515,14 +534,14 @@ Alchemy: v1.6.8+dirty This command SHALL set the relative priorities of the various stream usages on the camera. - + This command SHALL return a Snapshot from the camera. - - + + @@ -531,9 +550,9 @@ Alchemy: v1.6.8+dirty This command SHALL be sent by the device in response to the CaptureSnapshot command, carrying the requested snapshot. - - - + + + diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 23521c94ab683f..1a1cca08dd223b 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -896,6 +896,7 @@ "LocalSnapshotRecordingEnabled", "StatusLightEnabled", "StatusLightBrightness", + "ImageRotationDiscreteAngles", "FeatureMap" ], "Camera AV Settings User Level Management": [ diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 8dd52209c74450..f1f7ba4d795b3e 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -896,6 +896,7 @@ "LocalSnapshotRecordingEnabled", "StatusLightEnabled", "StatusLightBrightness", + "ImageRotationDiscreteAngles", "FeatureMap" ], "Camera AV Settings User Level Management": [ diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index e8136a56530edb..4850d390260865 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -10543,7 +10543,7 @@ cluster ZoneManagement = 1360 { /** The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. */ cluster CameraAvStreamManagement = 1361 { - revision 1; + revision 2; enum AudioCodecEnum : enum8 { kOPUS = 0 [spec_name = "OPUS"]; @@ -10703,6 +10703,7 @@ cluster CameraAvStreamManagement = 1361 { attribute access(read: manage, write: manage) optional boolean localSnapshotRecordingEnabled = 38; attribute access(read: manage, write: manage) optional boolean statusLightEnabled = 39; attribute access(read: manage, write: manage) optional ThreeLevelAutoEnum statusLightBrightness = 40; + attribute access(read: manage, write: manage) optional int16u imageRotationDiscreteAngles = 41; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 156372987de6c8..796801b10a30a7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -60678,6 +60678,7 @@ public static class CameraAvStreamManagementCluster extends BaseChipCluster { private static final long LOCAL_SNAPSHOT_RECORDING_ENABLED_ATTRIBUTE_ID = 38L; private static final long STATUS_LIGHT_ENABLED_ATTRIBUTE_ID = 39L; private static final long STATUS_LIGHT_BRIGHTNESS_ATTRIBUTE_ID = 40L; + private static final long IMAGE_ROTATION_DISCRETE_ANGLES_ATTRIBUTE_ID = 41L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; @@ -62356,6 +62357,41 @@ public void onSuccess(byte[] tlv) { }, STATUS_LIGHT_BRIGHTNESS_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readImageRotationDiscreteAnglesAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IMAGE_ROTATION_DISCRETE_ANGLES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IMAGE_ROTATION_DISCRETE_ANGLES_ATTRIBUTE_ID, true); + } + + public void writeImageRotationDiscreteAnglesAttribute(DefaultClusterCallback callback, Integer value) { + writeImageRotationDiscreteAnglesAttribute(callback, value, 0); + } + + public void writeImageRotationDiscreteAnglesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), IMAGE_ROTATION_DISCRETE_ANGLES_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeImageRotationDiscreteAnglesAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IMAGE_ROTATION_DISCRETE_ANGLES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IMAGE_ROTATION_DISCRETE_ANGLES_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index bcac5904e82ece..e389ffd6006c35 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -18577,6 +18577,7 @@ public enum Attribute { LocalSnapshotRecordingEnabled(38L), StatusLightEnabled(39L), StatusLightBrightness(40L), + ImageRotationDiscreteAngles(41L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), AttributeList(65531L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 860756f23f5fbb..6a1abbc74bbad7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -18688,6 +18688,17 @@ private static Map readCameraAvStreamManagementInteract readCameraAvStreamManagementStatusLightBrightnessCommandParams ); result.put("readStatusLightBrightnessAttribute", readCameraAvStreamManagementStatusLightBrightnessAttributeInteractionInfo); + Map readCameraAvStreamManagementImageRotationDiscreteAnglesCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementImageRotationDiscreteAnglesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readImageRotationDiscreteAnglesAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementImageRotationDiscreteAnglesCommandParams + ); + result.put("readImageRotationDiscreteAnglesAttribute", readCameraAvStreamManagementImageRotationDiscreteAnglesAttributeInteractionInfo); Map readCameraAvStreamManagementGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readCameraAvStreamManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index c79deb318665a6..4d5bd68faa8ed7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -3385,6 +3385,28 @@ public Map> getWriteAttributeMap() { writeCameraAvStreamManagementStatusLightBrightnessCommandParams ); writeCameraAvStreamManagementInteractionInfo.put("writeStatusLightBrightnessAttribute", writeCameraAvStreamManagementStatusLightBrightnessAttributeInteractionInfo); + Map writeCameraAvStreamManagementImageRotationDiscreteAnglesCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementimageRotationDiscreteAnglesCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementImageRotationDiscreteAnglesCommandParams.put( + "value", + cameraAvStreamManagementimageRotationDiscreteAnglesCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementImageRotationDiscreteAnglesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeImageRotationDiscreteAnglesAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementImageRotationDiscreteAnglesCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeImageRotationDiscreteAnglesAttribute", writeCameraAvStreamManagementImageRotationDiscreteAnglesAttributeInteractionInfo); writeAttributeMap.put("cameraAvStreamManagement", writeCameraAvStreamManagementInteractionInfo); Map writeCameraAvSettingsUserLevelManagementInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("cameraAvSettingsUserLevelManagement", writeCameraAvSettingsUserLevelManagementInteractionInfo); diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt index 9918948ff0aaa2..25c5f43658b88e 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt @@ -5363,6 +5363,142 @@ class CameraAvStreamManagementCluster( } } + suspend fun readImageRotationDiscreteAnglesAttribute(): UShort? { + val ATTRIBUTE_ID: UInt = 41u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Imagerotationdiscreteangles attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeImageRotationDiscreteAnglesAttribute( + value: UShort, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 41u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeImageRotationDiscreteAnglesAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 41u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Imagerotationdiscreteangles attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index f84d19b1ece76b..7391297a29bc93 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -46425,6 +46425,22 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } + case Attributes::ImageRotationDiscreteAngles::Id: { + using TypeInfo = Attributes::ImageRotationDiscreteAngles::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + TEMPORARY_RETURN_IGNORED chip::JniReferences::GetInstance().CreateBoxedObject( + valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/python/matter/clusters/CHIPClusters.py b/src/controller/python/matter/clusters/CHIPClusters.py index 5ec8a16df4b072..fbdc610b97114d 100644 --- a/src/controller/python/matter/clusters/CHIPClusters.py +++ b/src/controller/python/matter/clusters/CHIPClusters.py @@ -13814,6 +13814,13 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x00000029: { + "attributeName": "ImageRotationDiscreteAngles", + "attributeId": 0x00000029, + "type": "int", + "reportable": True, + "writable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/matter/clusters/Objects.py b/src/controller/python/matter/clusters/Objects.py index 68829b11dd6236..37b7b92dbc9aa1 100644 --- a/src/controller/python/matter/clusters/Objects.py +++ b/src/controller/python/matter/clusters/Objects.py @@ -49538,6 +49538,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="localSnapshotRecordingEnabled", Tag=0x00000026, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="statusLightEnabled", Tag=0x00000027, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="statusLightBrightness", Tag=0x00000028, Type=typing.Optional[Globals.Enums.ThreeLevelAutoEnum]), + ClusterObjectFieldDescriptor(Label="imageRotationDiscreteAngles", Tag=0x00000029, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -49586,6 +49587,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: localSnapshotRecordingEnabled: typing.Optional[bool] = None statusLightEnabled: typing.Optional[bool] = None statusLightBrightness: typing.Optional[Globals.Enums.ThreeLevelAutoEnum] = None + imageRotationDiscreteAngles: typing.Optional[uint] = None generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) attributeList: typing.List[uint] = field(default_factory=lambda: []) @@ -50767,6 +50769,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: typing.Optional[Globals.Enums.ThreeLevelAutoEnum] = None + @dataclass + class ImageRotationDiscreteAngles(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000029 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 0cad2b083e12b9..c830909ef8e801 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -6326,6 +6326,9 @@ static BOOL AttributeIsSpecifiedInCameraAVStreamManagementCluster(AttributeId aA case Attributes::StatusLightBrightness::Id: { return YES; } + case Attributes::ImageRotationDiscreteAngles::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 0d5c15c9012b3a..935eb5673ed1ae 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -19668,6 +19668,17 @@ static id _Nullable DecodeAttributeValueForCameraAVStreamManagementCluster(Attri value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } + case Attributes::ImageRotationDiscreteAngles::Id: { + using TypeInfo = Attributes::ImageRotationDiscreteAngles::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } default: { // Not a known CameraAVStreamManagement attribute. break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 489bb297904e0a..8f1d63dcf5b1af 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -15658,6 +15658,14 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeStatusLightBrightnessWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeImageRotationDiscreteAnglesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeImageRotationDiscreteAnglesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeImageRotationDiscreteAnglesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeImageRotationDiscreteAnglesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeImageRotationDiscreteAnglesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index ed852a18cf1efe..b0a642d67355f6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -105360,6 +105360,70 @@ + (void)readAttributeStatusLightBrightnessWithClusterStateCache:(MTRClusterState completion:completion]; } +- (void)readAttributeImageRotationDiscreteAnglesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeImageRotationDiscreteAnglesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeImageRotationDiscreteAnglesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeImageRotationDiscreteAnglesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeImageRotationDiscreteAnglesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeImageRotationDiscreteAnglesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CameraAvStreamManagement::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 6b662a6b947f26..2da002e89cbead 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -4006,6 +4006,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalSnapshotRecordingEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000026, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000027, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightBrightnessID MTR_PROVISIONALLY_AVAILABLE = 0x00000028, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageRotationDiscreteAnglesID MTR_PROVISIONALLY_AVAILABLE = 0x00000029, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 0a35bba8953a3b..776c7293bb8792 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -8707,6 +8707,10 @@ result = @"StatusLightBrightness"; break; + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageRotationDiscreteAnglesID: + result = @"ImageRotationDiscreteAngles"; + break; + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 43152aaa4b91f3..3f476c2e42f576 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -7281,6 +7281,10 @@ MTR_PROVISIONALLY_AVAILABLE - (void)writeAttributeStatusLightBrightnessWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; - (void)writeAttributeStatusLightBrightnessWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeImageRotationDiscreteAnglesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeImageRotationDiscreteAnglesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeImageRotationDiscreteAnglesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(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 e991c0b9eb5457..1241340a4e5a52 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -21032,6 +21032,22 @@ - (void)writeAttributeStatusLightBrightnessWithValue:(NSDictionary * _Nullable)readAttributeImageRotationDiscreteAnglesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageRotationDiscreteAnglesID) params:params]; +} + +- (void)writeAttributeImageRotationDiscreteAnglesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeImageRotationDiscreteAnglesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeImageRotationDiscreteAnglesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageRotationDiscreteAnglesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeGeneratedCommandListID) params:params]; diff --git a/zzz_generated/app-common/clusters/CameraAvStreamManagement/AttributeIds.h b/zzz_generated/app-common/clusters/CameraAvStreamManagement/AttributeIds.h index 7dea75ef2f9b61..cf1399a4929146 100644 --- a/zzz_generated/app-common/clusters/CameraAvStreamManagement/AttributeIds.h +++ b/zzz_generated/app-common/clusters/CameraAvStreamManagement/AttributeIds.h @@ -14,7 +14,7 @@ namespace CameraAvStreamManagement { namespace Attributes { // Total number of attributes supported by the cluster, including global attributes -inline constexpr uint32_t kAttributesCount = 46; +inline constexpr uint32_t kAttributesCount = 47; namespace MaxConcurrentEncoders { inline constexpr AttributeId Id = 0x00000000; @@ -180,6 +180,10 @@ namespace StatusLightBrightness { inline constexpr AttributeId Id = 0x00000028; } // namespace StatusLightBrightness +namespace ImageRotationDiscreteAngles { +inline constexpr AttributeId Id = 0x00000029; +} // namespace ImageRotationDiscreteAngles + namespace GeneratedCommandList { inline constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/clusters/CameraAvStreamManagement/Attributes.h b/zzz_generated/app-common/clusters/CameraAvStreamManagement/Attributes.h index 2d31f286ea09a2..2232df290cf3ab 100644 --- a/zzz_generated/app-common/clusters/CameraAvStreamManagement/Attributes.h +++ b/zzz_generated/app-common/clusters/CameraAvStreamManagement/Attributes.h @@ -548,6 +548,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace StatusLightBrightness +namespace ImageRotationDiscreteAngles { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ImageRotationDiscreteAngles::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ImageRotationDiscreteAngles namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -633,6 +645,7 @@ struct TypeInfo Attributes::StatusLightEnabled::TypeInfo::DecodableType statusLightEnabled = static_cast(0); Attributes::StatusLightBrightness::TypeInfo::DecodableType statusLightBrightness = static_cast(0); + Attributes::ImageRotationDiscreteAngles::TypeInfo::DecodableType imageRotationDiscreteAngles = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; diff --git a/zzz_generated/app-common/clusters/CameraAvStreamManagement/Attributes.ipp b/zzz_generated/app-common/clusters/CameraAvStreamManagement/Attributes.ipp index bbe93f7e0d80ec..3ea5028cf7236a 100644 --- a/zzz_generated/app-common/clusters/CameraAvStreamManagement/Attributes.ipp +++ b/zzz_generated/app-common/clusters/CameraAvStreamManagement/Attributes.ipp @@ -114,6 +114,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, statusLightEnabled); case Attributes::StatusLightBrightness::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, statusLightBrightness); + case Attributes::ImageRotationDiscreteAngles::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, imageRotationDiscreteAngles); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): diff --git a/zzz_generated/app-common/clusters/CameraAvStreamManagement/Metadata.h b/zzz_generated/app-common/clusters/CameraAvStreamManagement/Metadata.h index 9be59c8b74d825..88763938ec9d62 100644 --- a/zzz_generated/app-common/clusters/CameraAvStreamManagement/Metadata.h +++ b/zzz_generated/app-common/clusters/CameraAvStreamManagement/Metadata.h @@ -17,7 +17,7 @@ namespace app { namespace Clusters { namespace CameraAvStreamManagement { -inline constexpr uint32_t kRevision = 1; +inline constexpr uint32_t kRevision = 2; namespace Attributes { @@ -203,6 +203,11 @@ namespace StatusLightBrightness { inline constexpr DataModel::AttributeEntry kMetadataEntry(StatusLightBrightness::Id, BitFlags(), Access::Privilege::kManage, Access::Privilege::kManage); } // namespace StatusLightBrightness +namespace ImageRotationDiscreteAngles { +inline constexpr DataModel::AttributeEntry kMetadataEntry(ImageRotationDiscreteAngles::Id, + BitFlags(), Access::Privilege::kManage, + Access::Privilege::kManage); +} // namespace ImageRotationDiscreteAngles constexpr std::array kMandatoryMetadata = { MaxContentBufferSize::kMetadataEntry, MaxNetworkBandwidth::kMetadataEntry, diff --git a/zzz_generated/app-common/clusters/CameraAvStreamManagement/MetadataProvider.h b/zzz_generated/app-common/clusters/CameraAvStreamManagement/MetadataProvider.h index 32e2a4637c2ce5..ecc96768f8978f 100644 --- a/zzz_generated/app-common/clusters/CameraAvStreamManagement/MetadataProvider.h +++ b/zzz_generated/app-common/clusters/CameraAvStreamManagement/MetadataProvider.h @@ -105,6 +105,8 @@ struct ClusterMetadataProvider(Id, "status-light-enabled", Attributes::StatusLightEnabled::Id, credsIssuerConfig), // make_unique(Id, "status-light-brightness", Attributes::StatusLightBrightness::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // + make_unique(Id, "image-rotation-discrete-angles", Attributes::ImageRotationDiscreteAngles::Id, + credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>(Id, "max-concurrent-encoders", 0, UINT8_MAX, Attributes::MaxConcurrentEncoders::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "max-encoded-pixel-rate", 0, UINT32_MAX, Attributes::MaxEncodedPixelRate::Id, @@ -31576,6 +31579,9 @@ void registerClusterCameraAvStreamManagement(Commands & commands, CredentialIssu make_unique>( Id, "status-light-brightness", 0, UINT8_MAX, Attributes::StatusLightBrightness::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "image-rotation-discrete-angles", 0, UINT16_MAX, + Attributes::ImageRotationDiscreteAngles::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -31637,11 +31643,13 @@ void registerClusterCameraAvStreamManagement(Commands & commands, CredentialIssu credsIssuerConfig), // make_unique(Id, "status-light-enabled", Attributes::StatusLightEnabled::Id, credsIssuerConfig), // make_unique(Id, "status-light-brightness", Attributes::StatusLightBrightness::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique(Id, "image-rotation-discrete-angles", Attributes::ImageRotationDiscreteAngles::Id, + credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // 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 ddde3586152cc9..0e27c272a2cebf 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -23090,6 +23090,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("StatusLightBrightness", 1, value); } + case CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ImageRotationDiscreteAngles", 1, value); + } case CameraAvStreamManagement::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); 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 6100cb3187c2ec..62660380e478f6 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -4621,6 +4621,8 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) return "StatusLightEnabled"; case chip::app::Clusters::CameraAvStreamManagement::Attributes::StatusLightBrightness::Id: return "StatusLightBrightness"; + case chip::app::Clusters::CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::Id: + return "ImageRotationDiscreteAngles"; case chip::app::Clusters::CameraAvStreamManagement::Attributes::GeneratedCommandList::Id: return "GeneratedCommandList"; case chip::app::Clusters::CameraAvStreamManagement::Attributes::AcceptedCommandList::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 f49859cb545d58..0a553eb70d5aab 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -161966,6 +161966,7 @@ class SubscribeAttributeZoneManagementClusterRevision : public SubscribeAttribut | * LocalSnapshotRecordingEnabled | 0x0026 | | * StatusLightEnabled | 0x0027 | | * StatusLightBrightness | 0x0028 | +| * ImageRotationDiscreteAngles | 0x0029 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -166984,6 +166985,132 @@ class SubscribeAttributeCameraAvStreamManagementStatusLightBrightness : public S #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/* + * Attribute ImageRotationDiscreteAngles + */ +class ReadCameraAvStreamManagementImageRotationDiscreteAngles : public ReadAttribute { +public: + ReadCameraAvStreamManagementImageRotationDiscreteAngles() + : ReadAttribute("image-rotation-discrete-angles") + { + } + + ~ReadCameraAvStreamManagementImageRotationDiscreteAngles() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::CameraAvStreamManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::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 = [[MTRBaseClusterCameraAVStreamManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeImageRotationDiscreteAnglesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CameraAVStreamManagement.ImageRotationDiscreteAngles response %@", [value description]); + if (error == nil) { + TEMPORARY_RETURN_IGNORED RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("CameraAVStreamManagement ImageRotationDiscreteAngles read Error", error); + TEMPORARY_RETURN_IGNORED RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteCameraAvStreamManagementImageRotationDiscreteAngles : public WriteAttribute { +public: + WriteCameraAvStreamManagementImageRotationDiscreteAngles() + : WriteAttribute("image-rotation-discrete-angles") + { + AddArgument("attr-name", "image-rotation-discrete-angles"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteCameraAvStreamManagementImageRotationDiscreteAngles() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::CameraAvStreamManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (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); + __auto_type * cluster = [[MTRBaseClusterCameraAVStreamManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeImageRotationDiscreteAnglesWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("CameraAVStreamManagement ImageRotationDiscreteAngles write Error", error); + TEMPORARY_RETURN_IGNORED RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeCameraAvStreamManagementImageRotationDiscreteAngles : public SubscribeAttribute { +public: + SubscribeAttributeCameraAvStreamManagementImageRotationDiscreteAngles() + : SubscribeAttribute("image-rotation-discrete-angles") + { + } + + ~SubscribeAttributeCameraAvStreamManagementImageRotationDiscreteAngles() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::CameraAvStreamManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CameraAvStreamManagement::Attributes::ImageRotationDiscreteAngles::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); + __auto_type * cluster = [[MTRBaseClusterCameraAVStreamManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeImageRotationDiscreteAnglesWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CameraAVStreamManagement.ImageRotationDiscreteAngles response %@", [value description]); + if (error == nil) { + TEMPORARY_RETURN_IGNORED RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + TEMPORARY_RETURN_IGNORED RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ @@ -205918,6 +206045,11 @@ void registerClusterCameraAvStreamManagement(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), //