From 4f6c29761ac2d988fb997213b500b906078e520f Mon Sep 17 00:00:00 2001 From: senthil kumar E K Date: Mon, 24 Feb 2025 11:43:39 +0530 Subject: [PATCH] updating xml and zap code for closure control with updated spec --- .../chip/closure-control-cluster.xml | 103 +-- .../data_model/controller-clusters.matter | 60 +- .../chip/devicecontroller/ChipClusters.java | 195 +----- .../chip/devicecontroller/ChipStructs.java | 76 +-- .../devicecontroller/ClusterIDMapping.java | 28 +- .../devicecontroller/ClusterInfoMapping.java | 50 +- .../devicecontroller/ClusterReadMapping.java | 55 -- ...ClosureControlClusterOverallStateStruct.kt | 92 ++- ...losureControlClusterOverallTargetStruct.kt | 38 +- .../cluster/clusters/ClosureControlCluster.kt | 527 +-------------- ...ClosureControlClusterOverallStateStruct.kt | 92 ++- ...losureControlClusterOverallTargetStruct.kt | 38 +- .../CHIPAttributeTLVValueDecoder.cpp | 200 +++--- .../python/chip/clusters/CHIPClusters.py | 48 +- .../python/chip/clusters/Objects.py | 199 +----- .../MTRAttributeSpecifiedCheck.mm | 15 - .../MTRAttributeTLVValueDecoder.mm | 91 +-- .../CHIP/zap-generated/MTRBaseClusters.h | 88 +-- .../CHIP/zap-generated/MTRBaseClusters.mm | 236 ------- .../CHIP/zap-generated/MTRClusterConstants.h | 7 - .../CHIP/zap-generated/MTRClusterNames.mm | 28 - .../CHIP/zap-generated/MTRClusters.h | 16 - .../CHIP/zap-generated/MTRClusters.mm | 87 --- .../zap-generated/MTRCommandPayloadsObjc.h | 66 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 194 +----- .../MTRCommandPayloads_Internal.h | 12 - .../CHIP/zap-generated/MTRStructsObjc.h | 4 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 10 +- .../zap-generated/attributes/Accessors.cpp | 238 ------- .../zap-generated/attributes/Accessors.h | 36 -- .../app-common/zap-generated/callback.h | 12 - .../zap-generated/cluster-enums-check.h | 52 +- .../app-common/zap-generated/cluster-enums.h | 65 +- .../zap-generated/cluster-objects.cpp | 97 +-- .../zap-generated/cluster-objects.h | 179 +----- .../app-common/zap-generated/ids/Attributes.h | 20 - .../app-common/zap-generated/ids/Commands.h | 8 - .../zap-generated/cluster/Commands.h | 120 +--- .../cluster/ComplexArgumentParser.cpp | 20 +- .../cluster/logging/DataModelLogger.cpp | 33 +- .../cluster/logging/EntryToText.cpp | 14 - .../zap-generated/cluster/Commands.h | 599 +----------------- 42 files changed, 445 insertions(+), 3703 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml index d3ef1570615dd8..39353c62fe2390 100644 --- a/src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml @@ -18,7 +18,7 @@ limitations under the License. XML generated by Alchemy; DO NOT EDIT. Source: src/app_clusters/ClosureControl.adoc Parameters: in-progress -Git: 0.7-summer-2025-5-g06c4d5596-dirty +Git: 0.7-summer-2025-173-g70b2a23aa-dirty --> @@ -47,7 +47,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty - @@ -60,58 +59,33 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - + + + + - - + + @@ -128,40 +102,10 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty CountdownTime - MainState + MainState CurrentErrorList OverallState OverallTarget - - RestingProcedure - - - - - - TriggerCondition - - - - - - TriggerPosition - - - - - - WaitingDelay - - - - - - KickoffTimer - - - - On receipt of this command, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. @@ -173,8 +117,8 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty Upon receipt, this SHALL move the product in the most fitting state following the data as follows: - - + + @@ -186,24 +130,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty - - Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: - - - - - - - - - - - Upon receipt, this SHALL cancel the current PendingFallback. - - - - - @@ -245,11 +171,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty - - - - - diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 0a7fc02e8215d5..213e04550f7d11 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -6527,7 +6527,6 @@ cluster ClosureControl = 260 { kProtected = 5; kDisengaged = 6; kSetupRequired = 7; - kPendingFallback = 8; } enum PositioningEnum : enum8 { @@ -6539,39 +6538,17 @@ cluster ClosureControl = 260 { kOpenedAtSignature = 5; } - enum RestingProcedureEnum : enum8 { - kDoNothing = 0; - kReturnToFullyOpened = 1; - kReturnToFullyClosed = 2; - } - - enum TagLatchEnum : enum8 { + enum TargetLatchEnum : enum8 { kLatch = 0; kUnlatch = 1; } - enum TagPositionEnum : enum8 { + enum TargetPositionEnum : enum8 { kCloseInFull = 0; kOpenInFull = 1; kPedestrian = 2; kVentilation = 3; kSignature = 4; - kSequenceNextStep = 5; - kPedestrianNextStep = 6; - } - - enum TriggerConditionEnum : enum8 { - kAfterDelay = 0; - kAfterApplicativeTrigger = 1; - kAfterDelayOrApplicativeTrigger = 2; - } - - enum TriggerPositionEnum : enum8 { - kAtFullyClosed = 0; - kAtFullyOpened = 1; - kInBetween = 2; - kAtVentilation = 3; - kAtPedestrian = 4; } bitmap Feature : bitmap32 { @@ -6584,19 +6561,18 @@ cluster ClosureControl = 260 { kCalibration = 0x40; kProtection = 0x80; kManuallyOperable = 0x100; - kFallback = 0x200; } struct OverallStateStruct { - optional PositioningEnum positioning = 0; - optional LatchingEnum latching = 1; - optional ThreeLevelAutoEnum speed = 2; - optional bitmap32 extraInfo = 3; + optional nullable PositioningEnum positioning = 0; + optional nullable LatchingEnum latching = 1; + optional nullable ThreeLevelAutoEnum speed = 2; + optional nullable bitmap32 extraInfo = 3; } struct OverallTargetStruct { - optional TagPositionEnum tagPosition = 0; - optional TagLatchEnum tagLatch = 1; + optional TargetPositionEnum position = 0; + optional TargetLatchEnum latch = 1; optional ThreeLevelAutoEnum speed = 2; } @@ -6605,11 +6581,6 @@ cluster ClosureControl = 260 { readonly attribute ClosureErrorEnum currentErrorList[] = 2; readonly attribute nullable OverallStateStruct overallState = 3; readonly attribute nullable OverallTargetStruct overallTarget = 4; - readonly attribute optional RestingProcedureEnum restingProcedure = 5; - readonly attribute optional TriggerConditionEnum triggerCondition = 6; - readonly attribute optional TriggerPositionEnum triggerPosition = 7; - readonly attribute optional elapsed_s waitingDelay = 8; - readonly attribute optional elapsed_s kickoffTimer = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6618,28 +6589,17 @@ cluster ClosureControl = 260 { readonly attribute int16u clusterRevision = 65533; request struct MoveToRequest { - optional TagPositionEnum tag = 0; - optional TagLatchEnum latch = 1; + optional TargetPositionEnum position = 0; + optional TargetLatchEnum latch = 1; optional ThreeLevelAutoEnum speed = 2; } - request struct ConfigureFallbackRequest { - optional RestingProcedureEnum restingProcedure = 0; - optional TriggerConditionEnum triggerCondition = 1; - optional TriggerPositionEnum triggerPosition = 2; - optional elapsed_s waitingDelay = 3; - } - /** On receipt of this command, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ command Stop(): DefaultSuccess = 0; /** Upon receipt, this SHALL move the product in the most fitting state following the data as follows: */ command MoveTo(MoveToRequest): DefaultSuccess = 1; /** Upon receipt, this SHALL initiate a calibration. */ command access(invoke: manage) Calibrate(): DefaultSuccess = 2; - /** Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: */ - command ConfigureFallback(ConfigureFallbackRequest): DefaultSuccess = 3; - /** Upon receipt, this SHALL cancel the current PendingFallback. */ - command CancelFallback(): DefaultSuccess = 4; } /** The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index cb423ce525f915..752fbf4a6f523f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -37632,11 +37632,6 @@ public static class ClosureControlCluster extends BaseChipCluster { private static final long CURRENT_ERROR_LIST_ATTRIBUTE_ID = 2L; private static final long OVERALL_STATE_ATTRIBUTE_ID = 3L; private static final long OVERALL_TARGET_ATTRIBUTE_ID = 4L; - private static final long RESTING_PROCEDURE_ATTRIBUTE_ID = 5L; - private static final long TRIGGER_CONDITION_ATTRIBUTE_ID = 6L; - private static final long TRIGGER_POSITION_ATTRIBUTE_ID = 7L; - private static final long WAITING_DELAY_ATTRIBUTE_ID = 8L; - private static final long KICKOFF_TIMER_ATTRIBUTE_ID = 9L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -37670,17 +37665,17 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void moveTo(DefaultClusterCallback callback, Optional tag, Optional latch, Optional speed) { - moveTo(callback, tag, latch, speed, 0); + public void moveTo(DefaultClusterCallback callback, Optional position, Optional latch, Optional speed) { + moveTo(callback, position, latch, speed, 0); } - public void moveTo(DefaultClusterCallback callback, Optional tag, Optional latch, Optional speed, int timedInvokeTimeoutMs) { + public void moveTo(DefaultClusterCallback callback, Optional position, Optional latch, Optional speed, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); - final long tagFieldID = 0L; - BaseTLVType tagtlvValue = tag.map((nonOptionaltag) -> new UIntType(nonOptionaltag)).orElse(new EmptyType()); - elements.add(new StructElement(tagFieldID, tagtlvValue)); + final long positionFieldID = 0L; + BaseTLVType positiontlvValue = position.map((nonOptionalposition) -> new UIntType(nonOptionalposition)).orElse(new EmptyType()); + elements.add(new StructElement(positionFieldID, positiontlvValue)); final long latchFieldID = 1L; BaseTLVType latchtlvValue = latch.map((nonOptionallatch) -> new UIntType(nonOptionallatch)).orElse(new EmptyType()); @@ -37714,54 +37709,6 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void configureFallback(DefaultClusterCallback callback, Optional restingProcedure, Optional triggerCondition, Optional triggerPosition, Optional waitingDelay) { - configureFallback(callback, restingProcedure, triggerCondition, triggerPosition, waitingDelay, 0); - } - - public void configureFallback(DefaultClusterCallback callback, Optional restingProcedure, Optional triggerCondition, Optional triggerPosition, Optional waitingDelay, int timedInvokeTimeoutMs) { - final long commandId = 3L; - - ArrayList elements = new ArrayList<>(); - final long restingProcedureFieldID = 0L; - BaseTLVType restingProceduretlvValue = restingProcedure.map((nonOptionalrestingProcedure) -> new UIntType(nonOptionalrestingProcedure)).orElse(new EmptyType()); - elements.add(new StructElement(restingProcedureFieldID, restingProceduretlvValue)); - - final long triggerConditionFieldID = 1L; - BaseTLVType triggerConditiontlvValue = triggerCondition.map((nonOptionaltriggerCondition) -> new UIntType(nonOptionaltriggerCondition)).orElse(new EmptyType()); - elements.add(new StructElement(triggerConditionFieldID, triggerConditiontlvValue)); - - final long triggerPositionFieldID = 2L; - BaseTLVType triggerPositiontlvValue = triggerPosition.map((nonOptionaltriggerPosition) -> new UIntType(nonOptionaltriggerPosition)).orElse(new EmptyType()); - elements.add(new StructElement(triggerPositionFieldID, triggerPositiontlvValue)); - - final long waitingDelayFieldID = 3L; - BaseTLVType waitingDelaytlvValue = waitingDelay.map((nonOptionalwaitingDelay) -> new UIntType(nonOptionalwaitingDelay)).orElse(new EmptyType()); - elements.add(new StructElement(waitingDelayFieldID, waitingDelaytlvValue)); - - StructType commandArgs = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, commandArgs, timedInvokeTimeoutMs); - } - - public void cancelFallback(DefaultClusterCallback callback) { - cancelFallback(callback, 0); - } - - public void cancelFallback(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 4L; - - ArrayList elements = new ArrayList<>(); - StructType commandArgs = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, commandArgs, timedInvokeTimeoutMs); - } - public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Long value); } @@ -37924,136 +37871,6 @@ public void onSuccess(byte[] tlv) { }, OVERALL_TARGET_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readRestingProcedureAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RESTING_PROCEDURE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RESTING_PROCEDURE_ATTRIBUTE_ID, true); - } - - public void subscribeRestingProcedureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RESTING_PROCEDURE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RESTING_PROCEDURE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readTriggerConditionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TRIGGER_CONDITION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TRIGGER_CONDITION_ATTRIBUTE_ID, true); - } - - public void subscribeTriggerConditionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TRIGGER_CONDITION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TRIGGER_CONDITION_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readTriggerPositionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TRIGGER_POSITION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TRIGGER_POSITION_ATTRIBUTE_ID, true); - } - - public void subscribeTriggerPositionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TRIGGER_POSITION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TRIGGER_POSITION_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readWaitingDelayAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WAITING_DELAY_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, WAITING_DELAY_ATTRIBUTE_ID, true); - } - - public void subscribeWaitingDelayAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WAITING_DELAY_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, WAITING_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readKickoffTimerAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, KICKOFF_TIMER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, KICKOFF_TIMER_ATTRIBUTE_ID, true); - } - - public void subscribeKickoffTimerAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, KICKOFF_TIMER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, KICKOFF_TIMER_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/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 5614ac0f8fa5b6..708e95e941a647 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -9323,20 +9323,20 @@ public String toString() { } } public static class ClosureControlClusterOverallStateStruct { - public Optional positioning; - public Optional latching; - public Optional speed; - public Optional extraInfo; + public @Nullable Optional positioning; + public @Nullable Optional latching; + public @Nullable Optional speed; + public @Nullable Optional extraInfo; private static final long POSITIONING_ID = 0L; private static final long LATCHING_ID = 1L; private static final long SPEED_ID = 2L; private static final long EXTRA_INFO_ID = 3L; public ClosureControlClusterOverallStateStruct( - Optional positioning, - Optional latching, - Optional speed, - Optional extraInfo + @Nullable Optional positioning, + @Nullable Optional latching, + @Nullable Optional speed, + @Nullable Optional extraInfo ) { this.positioning = positioning; this.latching = latching; @@ -9346,10 +9346,10 @@ public ClosureControlClusterOverallStateStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(POSITIONING_ID, positioning.map((nonOptionalpositioning) -> new UIntType(nonOptionalpositioning)).orElse(new EmptyType()))); - values.add(new StructElement(LATCHING_ID, latching.map((nonOptionallatching) -> new UIntType(nonOptionallatching)).orElse(new EmptyType()))); - values.add(new StructElement(SPEED_ID, speed.map((nonOptionalspeed) -> new UIntType(nonOptionalspeed)).orElse(new EmptyType()))); - values.add(new StructElement(EXTRA_INFO_ID, extraInfo.map((nonOptionalextraInfo) -> new UIntType(nonOptionalextraInfo)).orElse(new EmptyType()))); + values.add(new StructElement(POSITIONING_ID, positioning != null ? positioning.map((nonOptionalpositioning) -> new UIntType(nonOptionalpositioning)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(LATCHING_ID, latching != null ? latching.map((nonOptionallatching) -> new UIntType(nonOptionallatching)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(SPEED_ID, speed != null ? speed.map((nonOptionalspeed) -> new UIntType(nonOptionalspeed)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(EXTRA_INFO_ID, extraInfo != null ? extraInfo.map((nonOptionalextraInfo) -> new UIntType(nonOptionalextraInfo)).orElse(new EmptyType()) : new NullType())); return new StructType(values); } @@ -9358,10 +9358,10 @@ public static ClosureControlClusterOverallStateStruct decodeTlv(BaseTLVType tlvV if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Optional positioning = Optional.empty(); - Optional latching = Optional.empty(); - Optional speed = Optional.empty(); - Optional extraInfo = Optional.empty(); + @Nullable Optional positioning = null; + @Nullable Optional latching = null; + @Nullable Optional speed = null; + @Nullable Optional extraInfo = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == POSITIONING_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -9414,27 +9414,27 @@ public String toString() { } } public static class ClosureControlClusterOverallTargetStruct { - public Optional tagPosition; - public Optional tagLatch; + public Optional position; + public Optional latch; public Optional speed; - private static final long TAG_POSITION_ID = 0L; - private static final long TAG_LATCH_ID = 1L; + private static final long POSITION_ID = 0L; + private static final long LATCH_ID = 1L; private static final long SPEED_ID = 2L; public ClosureControlClusterOverallTargetStruct( - Optional tagPosition, - Optional tagLatch, + Optional position, + Optional latch, Optional speed ) { - this.tagPosition = tagPosition; - this.tagLatch = tagLatch; + this.position = position; + this.latch = latch; this.speed = speed; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(TAG_POSITION_ID, tagPosition.map((nonOptionaltagPosition) -> new UIntType(nonOptionaltagPosition)).orElse(new EmptyType()))); - values.add(new StructElement(TAG_LATCH_ID, tagLatch.map((nonOptionaltagLatch) -> new UIntType(nonOptionaltagLatch)).orElse(new EmptyType()))); + values.add(new StructElement(POSITION_ID, position.map((nonOptionalposition) -> new UIntType(nonOptionalposition)).orElse(new EmptyType()))); + values.add(new StructElement(LATCH_ID, latch.map((nonOptionallatch) -> new UIntType(nonOptionallatch)).orElse(new EmptyType()))); values.add(new StructElement(SPEED_ID, speed.map((nonOptionalspeed) -> new UIntType(nonOptionalspeed)).orElse(new EmptyType()))); return new StructType(values); @@ -9444,19 +9444,19 @@ public static ClosureControlClusterOverallTargetStruct decodeTlv(BaseTLVType tlv if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Optional tagPosition = Optional.empty(); - Optional tagLatch = Optional.empty(); + Optional position = Optional.empty(); + Optional latch = Optional.empty(); Optional speed = Optional.empty(); for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == TAG_POSITION_ID) { + if (element.contextTagNum() == POSITION_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - tagPosition = Optional.of(castingValue.value(Integer.class)); + position = Optional.of(castingValue.value(Integer.class)); } - } else if (element.contextTagNum() == TAG_LATCH_ID) { + } else if (element.contextTagNum() == LATCH_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - tagLatch = Optional.of(castingValue.value(Integer.class)); + latch = Optional.of(castingValue.value(Integer.class)); } } else if (element.contextTagNum() == SPEED_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -9466,8 +9466,8 @@ public static ClosureControlClusterOverallTargetStruct decodeTlv(BaseTLVType tlv } } return new ClosureControlClusterOverallTargetStruct( - tagPosition, - tagLatch, + position, + latch, speed ); } @@ -9476,11 +9476,11 @@ public static ClosureControlClusterOverallTargetStruct decodeTlv(BaseTLVType tlv public String toString() { StringBuilder output = new StringBuilder(); output.append("ClosureControlClusterOverallTargetStruct {\n"); - output.append("\ttagPosition: "); - output.append(tagPosition); + output.append("\tposition: "); + output.append(position); output.append("\n"); - output.append("\ttagLatch: "); - output.append(tagLatch); + output.append("\tlatch: "); + output.append(latch); output.append("\n"); output.append("\tspeed: "); output.append(speed); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 885e1f045c0ccf..3fb7bbea3ac2f3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -11346,11 +11346,6 @@ public enum Attribute { CurrentErrorList(2L), OverallState(3L), OverallTarget(4L), - RestingProcedure(5L), - TriggerCondition(6L), - TriggerPosition(7L), - WaitingDelay(8L), - KickoffTimer(9L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -11399,9 +11394,7 @@ public static Event value(long id) throws NoSuchFieldError { public enum Command { Stop(0L), MoveTo(1L), - Calibrate(2L), - ConfigureFallback(3L), - CancelFallback(4L),; + Calibrate(2L),; private final long id; Command(long id) { this.id = id; @@ -11419,7 +11412,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum MoveToCommandField {Tag(0),Latch(1),Speed(2),; + }public enum MoveToCommandField {Position(0),Latch(1),Speed(2),; private final int id; MoveToCommandField(int id) { this.id = id; @@ -11436,23 +11429,6 @@ public static MoveToCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum ConfigureFallbackCommandField {RestingProcedure(0),TriggerCondition(1),TriggerPosition(2),WaitingDelay(3),; - private final int id; - ConfigureFallbackCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static ConfigureFallbackCommandField value(int id) throws NoSuchFieldError { - for (ConfigureFallbackCommandField field : ConfigureFallbackCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index f10d149932b188..0e67eef89ad36d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -28284,8 +28284,8 @@ public Map> getCommandMap() { Map closureControlmoveToCommandParams = new LinkedHashMap(); - CommandParameterInfo closureControlmoveTotagCommandParameterInfo = new CommandParameterInfo("tag", Optional.class, Integer.class); - closureControlmoveToCommandParams.put("tag",closureControlmoveTotagCommandParameterInfo); + CommandParameterInfo closureControlmoveTopositionCommandParameterInfo = new CommandParameterInfo("position", Optional.class, Integer.class); + closureControlmoveToCommandParams.put("position",closureControlmoveTopositionCommandParameterInfo); CommandParameterInfo closureControlmoveTolatchCommandParameterInfo = new CommandParameterInfo("latch", Optional.class, Integer.class); closureControlmoveToCommandParams.put("latch",closureControlmoveTolatchCommandParameterInfo); @@ -28297,7 +28297,7 @@ public Map> getCommandMap() { ((ChipClusters.ClosureControlCluster) cluster) .moveTo((DefaultClusterCallback) callback , (Optional) - commandArguments.get("tag") + commandArguments.get("position") , (Optional) commandArguments.get("latch") , (Optional) @@ -28321,50 +28321,6 @@ public Map> getCommandMap() { ); closureControlClusterInteractionInfoMap.put("calibrate", closureControlcalibrateInteractionInfo); - Map closureControlconfigureFallbackCommandParams = new LinkedHashMap(); - - CommandParameterInfo closureControlconfigureFallbackrestingProcedureCommandParameterInfo = new CommandParameterInfo("restingProcedure", Optional.class, Integer.class); - closureControlconfigureFallbackCommandParams.put("restingProcedure",closureControlconfigureFallbackrestingProcedureCommandParameterInfo); - - CommandParameterInfo closureControlconfigureFallbacktriggerConditionCommandParameterInfo = new CommandParameterInfo("triggerCondition", Optional.class, Integer.class); - closureControlconfigureFallbackCommandParams.put("triggerCondition",closureControlconfigureFallbacktriggerConditionCommandParameterInfo); - - CommandParameterInfo closureControlconfigureFallbacktriggerPositionCommandParameterInfo = new CommandParameterInfo("triggerPosition", Optional.class, Integer.class); - closureControlconfigureFallbackCommandParams.put("triggerPosition",closureControlconfigureFallbacktriggerPositionCommandParameterInfo); - - CommandParameterInfo closureControlconfigureFallbackwaitingDelayCommandParameterInfo = new CommandParameterInfo("waitingDelay", Optional.class, Long.class); - closureControlconfigureFallbackCommandParams.put("waitingDelay",closureControlconfigureFallbackwaitingDelayCommandParameterInfo); - InteractionInfo closureControlconfigureFallbackInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClosureControlCluster) cluster) - .configureFallback((DefaultClusterCallback) callback - , (Optional) - commandArguments.get("restingProcedure") - , (Optional) - commandArguments.get("triggerCondition") - , (Optional) - commandArguments.get("triggerPosition") - , (Optional) - commandArguments.get("waitingDelay") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - closureControlconfigureFallbackCommandParams - ); - closureControlClusterInteractionInfoMap.put("configureFallback", closureControlconfigureFallbackInteractionInfo); - - Map closureControlcancelFallbackCommandParams = new LinkedHashMap(); - InteractionInfo closureControlcancelFallbackInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClosureControlCluster) cluster) - .cancelFallback((DefaultClusterCallback) callback - ); - }, - () -> new DelegatedDefaultClusterCallback(), - closureControlcancelFallbackCommandParams - ); - closureControlClusterInteractionInfoMap.put("cancelFallback", closureControlcancelFallbackInteractionInfo); - commandMap.put("closureControl", closureControlClusterInteractionInfoMap); Map serviceAreaClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index ff8503bec2e239..0b2a053f4adfba 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -11400,61 +11400,6 @@ private static Map readClosureControlInteractionInfo() readClosureControlCurrentErrorListCommandParams ); result.put("readCurrentErrorListAttribute", readClosureControlCurrentErrorListAttributeInteractionInfo); - Map readClosureControlRestingProcedureCommandParams = new LinkedHashMap(); - InteractionInfo readClosureControlRestingProcedureAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClosureControlCluster) cluster).readRestingProcedureAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readClosureControlRestingProcedureCommandParams - ); - result.put("readRestingProcedureAttribute", readClosureControlRestingProcedureAttributeInteractionInfo); - Map readClosureControlTriggerConditionCommandParams = new LinkedHashMap(); - InteractionInfo readClosureControlTriggerConditionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClosureControlCluster) cluster).readTriggerConditionAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readClosureControlTriggerConditionCommandParams - ); - result.put("readTriggerConditionAttribute", readClosureControlTriggerConditionAttributeInteractionInfo); - Map readClosureControlTriggerPositionCommandParams = new LinkedHashMap(); - InteractionInfo readClosureControlTriggerPositionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClosureControlCluster) cluster).readTriggerPositionAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readClosureControlTriggerPositionCommandParams - ); - result.put("readTriggerPositionAttribute", readClosureControlTriggerPositionAttributeInteractionInfo); - Map readClosureControlWaitingDelayCommandParams = new LinkedHashMap(); - InteractionInfo readClosureControlWaitingDelayAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClosureControlCluster) cluster).readWaitingDelayAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readClosureControlWaitingDelayCommandParams - ); - result.put("readWaitingDelayAttribute", readClosureControlWaitingDelayAttributeInteractionInfo); - Map readClosureControlKickoffTimerCommandParams = new LinkedHashMap(); - InteractionInfo readClosureControlKickoffTimerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ClosureControlCluster) cluster).readKickoffTimerAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readClosureControlKickoffTimerCommandParams - ); - result.put("readKickoffTimerAttribute", readClosureControlKickoffTimerAttributeInteractionInfo); Map readClosureControlGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readClosureControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureControlClusterOverallStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureControlClusterOverallStateStruct.kt index 8292b970ae2395..da04bfc25c814f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureControlClusterOverallStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureControlClusterOverallStateStruct.kt @@ -24,10 +24,10 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ClosureControlClusterOverallStateStruct( - val positioning: Optional, - val latching: Optional, - val speed: Optional, - val extraInfo: Optional, + val positioning: Optional?, + val latching: Optional?, + val speed: Optional?, + val extraInfo: Optional?, ) { override fun toString(): String = buildString { append("ClosureControlClusterOverallStateStruct {\n") @@ -41,21 +41,37 @@ class ClosureControlClusterOverallStateStruct( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - if (positioning.isPresent) { - val optpositioning = positioning.get() - put(ContextSpecificTag(TAG_POSITIONING), optpositioning) + if (positioning != null) { + if (positioning.isPresent) { + val optpositioning = positioning.get() + put(ContextSpecificTag(TAG_POSITIONING), optpositioning) + } + } else { + putNull(ContextSpecificTag(TAG_POSITIONING)) } - if (latching.isPresent) { - val optlatching = latching.get() - put(ContextSpecificTag(TAG_LATCHING), optlatching) + if (latching != null) { + if (latching.isPresent) { + val optlatching = latching.get() + put(ContextSpecificTag(TAG_LATCHING), optlatching) + } + } else { + putNull(ContextSpecificTag(TAG_LATCHING)) } - if (speed.isPresent) { - val optspeed = speed.get() - put(ContextSpecificTag(TAG_SPEED), optspeed) + if (speed != null) { + if (speed.isPresent) { + val optspeed = speed.get() + put(ContextSpecificTag(TAG_SPEED), optspeed) + } + } else { + putNull(ContextSpecificTag(TAG_SPEED)) } - if (extraInfo.isPresent) { - val optextraInfo = extraInfo.get() - put(ContextSpecificTag(TAG_EXTRA_INFO), optextraInfo) + if (extraInfo != null) { + if (extraInfo.isPresent) { + val optextraInfo = extraInfo.get() + put(ContextSpecificTag(TAG_EXTRA_INFO), optextraInfo) + } + } else { + putNull(ContextSpecificTag(TAG_EXTRA_INFO)) } endStructure() } @@ -70,28 +86,48 @@ class ClosureControlClusterOverallStateStruct( fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ClosureControlClusterOverallStateStruct { tlvReader.enterStructure(tlvTag) val positioning = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSITIONING))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_POSITIONING))) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSITIONING))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_POSITIONING))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_POSITIONING)) + null } val latching = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LATCHING))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_LATCHING))) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LATCHING))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_LATCHING))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_LATCHING)) + null } val speed = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPEED))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_SPEED))) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPEED))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_SPEED))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_SPEED)) + null } val extraInfo = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTRA_INFO))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EXTRA_INFO))) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTRA_INFO))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EXTRA_INFO))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_EXTRA_INFO)) + null } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureControlClusterOverallTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureControlClusterOverallTargetStruct.kt index bc3c0b737fe9d3..79c08aa005955a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureControlClusterOverallTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureControlClusterOverallTargetStruct.kt @@ -24,14 +24,14 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ClosureControlClusterOverallTargetStruct( - val tagPosition: Optional, - val tagLatch: Optional, + val position: Optional, + val latch: Optional, val speed: Optional, ) { override fun toString(): String = buildString { append("ClosureControlClusterOverallTargetStruct {\n") - append("\ttagPosition : $tagPosition\n") - append("\ttagLatch : $tagLatch\n") + append("\tposition : $position\n") + append("\tlatch : $latch\n") append("\tspeed : $speed\n") append("}\n") } @@ -39,13 +39,13 @@ class ClosureControlClusterOverallTargetStruct( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - if (tagPosition.isPresent) { - val opttagPosition = tagPosition.get() - put(ContextSpecificTag(TAG_TAG_POSITION), opttagPosition) + if (position.isPresent) { + val optposition = position.get() + put(ContextSpecificTag(TAG_POSITION), optposition) } - if (tagLatch.isPresent) { - val opttagLatch = tagLatch.get() - put(ContextSpecificTag(TAG_TAG_LATCH), opttagLatch) + if (latch.isPresent) { + val optlatch = latch.get() + put(ContextSpecificTag(TAG_LATCH), optlatch) } if (speed.isPresent) { val optspeed = speed.get() @@ -56,21 +56,21 @@ class ClosureControlClusterOverallTargetStruct( } companion object { - private const val TAG_TAG_POSITION = 0 - private const val TAG_TAG_LATCH = 1 + private const val TAG_POSITION = 0 + private const val TAG_LATCH = 1 private const val TAG_SPEED = 2 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ClosureControlClusterOverallTargetStruct { tlvReader.enterStructure(tlvTag) - val tagPosition = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TAG_POSITION))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TAG_POSITION))) + val position = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSITION))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_POSITION))) } else { Optional.empty() } - val tagLatch = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TAG_LATCH))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TAG_LATCH))) + val latch = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LATCH))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_LATCH))) } else { Optional.empty() } @@ -83,7 +83,7 @@ class ClosureControlClusterOverallTargetStruct( tlvReader.exitContainer() - return ClosureControlClusterOverallTargetStruct(tagPosition, tagLatch, speed) + return ClosureControlClusterOverallTargetStruct(position, latch, speed) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ClosureControlCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ClosureControlCluster.kt index 4820ca28c43259..1c08328adfe8c8 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ClosureControlCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ClosureControlCluster.kt @@ -145,7 +145,7 @@ class ClosureControlCluster( } suspend fun moveTo( - tag: UByte?, + position: UByte?, latch: UByte?, speed: UByte?, timedInvokeTimeout: Duration? = null, @@ -155,8 +155,8 @@ class ClosureControlCluster( val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) - val TAG_TAG_REQ: Int = 0 - tag?.let { tlvWriter.put(ContextSpecificTag(TAG_TAG_REQ), tag) } + val TAG_POSITION_REQ: Int = 0 + position?.let { tlvWriter.put(ContextSpecificTag(TAG_POSITION_REQ), position) } val TAG_LATCH_REQ: Int = 1 latch?.let { tlvWriter.put(ContextSpecificTag(TAG_LATCH_REQ), latch) } @@ -194,66 +194,6 @@ class ClosureControlCluster( logger.log(Level.FINE, "Invoke command succeeded: ${response}") } - suspend fun configureFallback( - restingProcedure: UByte?, - triggerCondition: UByte?, - triggerPosition: UByte?, - waitingDelay: UInt?, - timedInvokeTimeout: Duration? = null, - ) { - val commandId: UInt = 3u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - - val TAG_RESTING_PROCEDURE_REQ: Int = 0 - restingProcedure?.let { - tlvWriter.put(ContextSpecificTag(TAG_RESTING_PROCEDURE_REQ), restingProcedure) - } - - val TAG_TRIGGER_CONDITION_REQ: Int = 1 - triggerCondition?.let { - tlvWriter.put(ContextSpecificTag(TAG_TRIGGER_CONDITION_REQ), triggerCondition) - } - - val TAG_TRIGGER_POSITION_REQ: Int = 2 - triggerPosition?.let { - tlvWriter.put(ContextSpecificTag(TAG_TRIGGER_POSITION_REQ), triggerPosition) - } - - val TAG_WAITING_DELAY_REQ: Int = 3 - waitingDelay?.let { tlvWriter.put(ContextSpecificTag(TAG_WAITING_DELAY_REQ), waitingDelay) } - tlvWriter.endStructure() - - val request: InvokeRequest = - InvokeRequest( - CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), - tlvPayload = tlvWriter.getEncoded(), - timedRequest = timedInvokeTimeout, - ) - - val response: InvokeResponse = controller.invoke(request) - logger.log(Level.FINE, "Invoke command succeeded: ${response}") - } - - suspend fun cancelFallback(timedInvokeTimeout: Duration? = null) { - val commandId: UInt = 4u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - tlvWriter.endStructure() - - val request: InvokeRequest = - InvokeRequest( - CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), - tlvPayload = tlvWriter.getEncoded(), - timedRequest = timedInvokeTimeout, - ) - - val response: InvokeResponse = controller.invoke(request) - logger.log(Level.FINE, "Invoke command succeeded: ${response}") - } - suspend fun readCountdownTimeAttribute(): CountdownTimeAttribute { val ATTRIBUTE_ID: UInt = 0u @@ -719,467 +659,6 @@ class ClosureControlCluster( } } - suspend fun readRestingProcedureAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 5u - - 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) { "Restingprocedure attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRestingProcedureAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 5u - 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( - UByteSubscriptionState.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) { - "Restingprocedure attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readTriggerConditionAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 6u - - 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) { "Triggercondition attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeTriggerConditionAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 6u - 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( - UByteSubscriptionState.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) { - "Triggercondition attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readTriggerPositionAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 7u - - 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) { "Triggerposition attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeTriggerPositionAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 7u - 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( - UByteSubscriptionState.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) { - "Triggerposition attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readWaitingDelayAttribute(): UInt? { - val ATTRIBUTE_ID: UInt = 8u - - 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) { "Waitingdelay attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeWaitingDelayAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 8u - 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( - UIntSubscriptionState.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) { "Waitingdelay attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UIntSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readKickoffTimerAttribute(): UInt? { - val ATTRIBUTE_ID: UInt = 9u - - 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) { "Kickofftimer attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeKickoffTimerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 9u - 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( - UIntSubscriptionState.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) { "Kickofftimer attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UIntSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureControlClusterOverallStateStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureControlClusterOverallStateStruct.kt index a742048f40c2be..49405e89e1a988 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureControlClusterOverallStateStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureControlClusterOverallStateStruct.kt @@ -24,10 +24,10 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ClosureControlClusterOverallStateStruct( - val positioning: Optional, - val latching: Optional, - val speed: Optional, - val extraInfo: Optional, + val positioning: Optional?, + val latching: Optional?, + val speed: Optional?, + val extraInfo: Optional?, ) { override fun toString(): String = buildString { append("ClosureControlClusterOverallStateStruct {\n") @@ -41,21 +41,37 @@ class ClosureControlClusterOverallStateStruct( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - if (positioning.isPresent) { - val optpositioning = positioning.get() - put(ContextSpecificTag(TAG_POSITIONING), optpositioning) + if (positioning != null) { + if (positioning.isPresent) { + val optpositioning = positioning.get() + put(ContextSpecificTag(TAG_POSITIONING), optpositioning) + } + } else { + putNull(ContextSpecificTag(TAG_POSITIONING)) } - if (latching.isPresent) { - val optlatching = latching.get() - put(ContextSpecificTag(TAG_LATCHING), optlatching) + if (latching != null) { + if (latching.isPresent) { + val optlatching = latching.get() + put(ContextSpecificTag(TAG_LATCHING), optlatching) + } + } else { + putNull(ContextSpecificTag(TAG_LATCHING)) } - if (speed.isPresent) { - val optspeed = speed.get() - put(ContextSpecificTag(TAG_SPEED), optspeed) + if (speed != null) { + if (speed.isPresent) { + val optspeed = speed.get() + put(ContextSpecificTag(TAG_SPEED), optspeed) + } + } else { + putNull(ContextSpecificTag(TAG_SPEED)) } - if (extraInfo.isPresent) { - val optextraInfo = extraInfo.get() - put(ContextSpecificTag(TAG_EXTRA_INFO), optextraInfo) + if (extraInfo != null) { + if (extraInfo.isPresent) { + val optextraInfo = extraInfo.get() + put(ContextSpecificTag(TAG_EXTRA_INFO), optextraInfo) + } + } else { + putNull(ContextSpecificTag(TAG_EXTRA_INFO)) } endStructure() } @@ -70,28 +86,48 @@ class ClosureControlClusterOverallStateStruct( fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ClosureControlClusterOverallStateStruct { tlvReader.enterStructure(tlvTag) val positioning = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSITIONING))) { - Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_POSITIONING))) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSITIONING))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_POSITIONING))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_POSITIONING)) + null } val latching = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LATCHING))) { - Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_LATCHING))) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LATCHING))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_LATCHING))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_LATCHING)) + null } val speed = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPEED))) { - Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_SPEED))) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPEED))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_SPEED))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_SPEED)) + null } val extraInfo = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTRA_INFO))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_EXTRA_INFO))) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTRA_INFO))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_EXTRA_INFO))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_EXTRA_INFO)) + null } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureControlClusterOverallTargetStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureControlClusterOverallTargetStruct.kt index 1a1ed8e9c793c7..4b1cd506d51368 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureControlClusterOverallTargetStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureControlClusterOverallTargetStruct.kt @@ -24,14 +24,14 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ClosureControlClusterOverallTargetStruct( - val tagPosition: Optional, - val tagLatch: Optional, + val position: Optional, + val latch: Optional, val speed: Optional, ) { override fun toString(): String = buildString { append("ClosureControlClusterOverallTargetStruct {\n") - append("\ttagPosition : $tagPosition\n") - append("\ttagLatch : $tagLatch\n") + append("\tposition : $position\n") + append("\tlatch : $latch\n") append("\tspeed : $speed\n") append("}\n") } @@ -39,13 +39,13 @@ class ClosureControlClusterOverallTargetStruct( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - if (tagPosition.isPresent) { - val opttagPosition = tagPosition.get() - put(ContextSpecificTag(TAG_TAG_POSITION), opttagPosition) + if (position.isPresent) { + val optposition = position.get() + put(ContextSpecificTag(TAG_POSITION), optposition) } - if (tagLatch.isPresent) { - val opttagLatch = tagLatch.get() - put(ContextSpecificTag(TAG_TAG_LATCH), opttagLatch) + if (latch.isPresent) { + val optlatch = latch.get() + put(ContextSpecificTag(TAG_LATCH), optlatch) } if (speed.isPresent) { val optspeed = speed.get() @@ -56,21 +56,21 @@ class ClosureControlClusterOverallTargetStruct( } companion object { - private const val TAG_TAG_POSITION = 0 - private const val TAG_TAG_LATCH = 1 + private const val TAG_POSITION = 0 + private const val TAG_LATCH = 1 private const val TAG_SPEED = 2 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ClosureControlClusterOverallTargetStruct { tlvReader.enterStructure(tlvTag) - val tagPosition = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TAG_POSITION))) { - Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_TAG_POSITION))) + val position = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSITION))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_POSITION))) } else { Optional.empty() } - val tagLatch = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TAG_LATCH))) { - Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_TAG_LATCH))) + val latch = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LATCH))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_LATCH))) } else { Optional.empty() } @@ -83,7 +83,7 @@ class ClosureControlClusterOverallTargetStruct( tlvReader.exitContainer() - return ClosureControlClusterOverallTargetStruct(tagPosition, tagLatch, speed) + return ClosureControlClusterOverallTargetStruct(position, latch, speed) } } } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 588d3c6120b139..1fb67bdd812294 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -26224,12 +26224,19 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR else { jobject value_positioningInsideOptional; - std::string value_positioningInsideOptionalClassName = "java/lang/Integer"; - std::string value_positioningInsideOptionalCtorSignature = "(I)V"; - jint jnivalue_positioningInsideOptional = static_cast(cppValue.Value().positioning.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_positioningInsideOptionalClassName.c_str(), value_positioningInsideOptionalCtorSignature.c_str(), - jnivalue_positioningInsideOptional, value_positioningInsideOptional); + if (cppValue.Value().positioning.Value().IsNull()) + { + value_positioningInsideOptional = nullptr; + } + else + { + std::string value_positioningInsideOptionalClassName = "java/lang/Integer"; + std::string value_positioningInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_positioningInsideOptional = static_cast(cppValue.Value().positioning.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_positioningInsideOptionalClassName.c_str(), value_positioningInsideOptionalCtorSignature.c_str(), + jnivalue_positioningInsideOptional, value_positioningInsideOptional); + } chip::JniReferences::GetInstance().CreateOptional(value_positioningInsideOptional, value_positioning); } jobject value_latching; @@ -26240,12 +26247,19 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR else { jobject value_latchingInsideOptional; - std::string value_latchingInsideOptionalClassName = "java/lang/Integer"; - std::string value_latchingInsideOptionalCtorSignature = "(I)V"; - jint jnivalue_latchingInsideOptional = static_cast(cppValue.Value().latching.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_latchingInsideOptionalClassName.c_str(), value_latchingInsideOptionalCtorSignature.c_str(), - jnivalue_latchingInsideOptional, value_latchingInsideOptional); + if (cppValue.Value().latching.Value().IsNull()) + { + value_latchingInsideOptional = nullptr; + } + else + { + std::string value_latchingInsideOptionalClassName = "java/lang/Integer"; + std::string value_latchingInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_latchingInsideOptional = static_cast(cppValue.Value().latching.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_latchingInsideOptionalClassName.c_str(), value_latchingInsideOptionalCtorSignature.c_str(), + jnivalue_latchingInsideOptional, value_latchingInsideOptional); + } chip::JniReferences::GetInstance().CreateOptional(value_latchingInsideOptional, value_latching); } jobject value_speed; @@ -26256,12 +26270,19 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR else { jobject value_speedInsideOptional; - std::string value_speedInsideOptionalClassName = "java/lang/Integer"; - std::string value_speedInsideOptionalCtorSignature = "(I)V"; - jint jnivalue_speedInsideOptional = static_cast(cppValue.Value().speed.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_speedInsideOptionalClassName.c_str(), value_speedInsideOptionalCtorSignature.c_str(), - jnivalue_speedInsideOptional, value_speedInsideOptional); + if (cppValue.Value().speed.Value().IsNull()) + { + value_speedInsideOptional = nullptr; + } + else + { + std::string value_speedInsideOptionalClassName = "java/lang/Integer"; + std::string value_speedInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_speedInsideOptional = static_cast(cppValue.Value().speed.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_speedInsideOptionalClassName.c_str(), value_speedInsideOptionalCtorSignature.c_str(), + jnivalue_speedInsideOptional, value_speedInsideOptional); + } chip::JniReferences::GetInstance().CreateOptional(value_speedInsideOptional, value_speed); } jobject value_extraInfo; @@ -26272,12 +26293,19 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR else { jobject value_extraInfoInsideOptional; - std::string value_extraInfoInsideOptionalClassName = "java/lang/Long"; - std::string value_extraInfoInsideOptionalCtorSignature = "(J)V"; - jlong jnivalue_extraInfoInsideOptional = static_cast(cppValue.Value().extraInfo.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_extraInfoInsideOptionalClassName.c_str(), value_extraInfoInsideOptionalCtorSignature.c_str(), - jnivalue_extraInfoInsideOptional, value_extraInfoInsideOptional); + if (cppValue.Value().extraInfo.Value().IsNull()) + { + value_extraInfoInsideOptional = nullptr; + } + else + { + std::string value_extraInfoInsideOptionalClassName = "java/lang/Long"; + std::string value_extraInfoInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_extraInfoInsideOptional = static_cast(cppValue.Value().extraInfo.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_extraInfoInsideOptionalClassName.c_str(), value_extraInfoInsideOptionalCtorSignature.c_str(), + jnivalue_extraInfoInsideOptional, value_extraInfoInsideOptional); + } chip::JniReferences::GetInstance().CreateOptional(value_extraInfoInsideOptional, value_extraInfo); } @@ -26324,37 +26352,37 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } else { - jobject value_tagPosition; - if (!cppValue.Value().tagPosition.HasValue()) + jobject value_position; + if (!cppValue.Value().position.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_tagPosition); + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_position); } else { - jobject value_tagPositionInsideOptional; - std::string value_tagPositionInsideOptionalClassName = "java/lang/Integer"; - std::string value_tagPositionInsideOptionalCtorSignature = "(I)V"; - jint jnivalue_tagPositionInsideOptional = static_cast(cppValue.Value().tagPosition.Value()); + jobject value_positionInsideOptional; + std::string value_positionInsideOptionalClassName = "java/lang/Integer"; + std::string value_positionInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_positionInsideOptional = static_cast(cppValue.Value().position.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - value_tagPositionInsideOptionalClassName.c_str(), value_tagPositionInsideOptionalCtorSignature.c_str(), - jnivalue_tagPositionInsideOptional, value_tagPositionInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(value_tagPositionInsideOptional, value_tagPosition); + value_positionInsideOptionalClassName.c_str(), value_positionInsideOptionalCtorSignature.c_str(), + jnivalue_positionInsideOptional, value_positionInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_positionInsideOptional, value_position); } - jobject value_tagLatch; - if (!cppValue.Value().tagLatch.HasValue()) + jobject value_latch; + if (!cppValue.Value().latch.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_tagLatch); + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_latch); } else { - jobject value_tagLatchInsideOptional; - std::string value_tagLatchInsideOptionalClassName = "java/lang/Integer"; - std::string value_tagLatchInsideOptionalCtorSignature = "(I)V"; - jint jnivalue_tagLatchInsideOptional = static_cast(cppValue.Value().tagLatch.Value()); + jobject value_latchInsideOptional; + std::string value_latchInsideOptionalClassName = "java/lang/Integer"; + std::string value_latchInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_latchInsideOptional = static_cast(cppValue.Value().latch.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - value_tagLatchInsideOptionalClassName.c_str(), value_tagLatchInsideOptionalCtorSignature.c_str(), - jnivalue_tagLatchInsideOptional, value_tagLatchInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(value_tagLatchInsideOptional, value_tagLatch); + value_latchInsideOptionalClassName.c_str(), value_latchInsideOptionalCtorSignature.c_str(), + jnivalue_latchInsideOptional, value_latchInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_latchInsideOptional, value_latch); } jobject value_speed; if (!cppValue.Value().speed.HasValue()) @@ -26394,92 +26422,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } - value = env->NewObject(overallTargetStructStructClass_1, overallTargetStructStructCtor_1, value_tagPosition, - value_tagLatch, value_speed); + value = env->NewObject(overallTargetStructStructClass_1, overallTargetStructStructCtor_1, value_position, + value_latch, value_speed); } } return value; } - case Attributes::RestingProcedure::Id: { - using TypeInfo = Attributes::RestingProcedure::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); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::TriggerCondition::Id: { - using TypeInfo = Attributes::TriggerCondition::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); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::TriggerPosition::Id: { - using TypeInfo = Attributes::TriggerPosition::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); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::WaitingDelay::Id: { - using TypeInfo = Attributes::WaitingDelay::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::KickoffTimer::Id: { - using TypeInfo = Attributes::KickoffTimer::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); - 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/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index c98aa4714c3a82..c7dde3c571a344 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -7801,7 +7801,7 @@ class ChipClusters: "commandId": 0x00000001, "commandName": "MoveTo", "args": { - "tag": "int", + "position": "int", "latch": "int", "speed": "int", }, @@ -7812,22 +7812,6 @@ class ChipClusters: "args": { }, }, - 0x00000003: { - "commandId": 0x00000003, - "commandName": "ConfigureFallback", - "args": { - "restingProcedure": "int", - "triggerCondition": "int", - "triggerPosition": "int", - "waitingDelay": "int", - }, - }, - 0x00000004: { - "commandId": 0x00000004, - "commandName": "CancelFallback", - "args": { - }, - }, }, "attributes": { 0x00000000: { @@ -7860,36 +7844,6 @@ class ChipClusters: "type": "", "reportable": True, }, - 0x00000005: { - "attributeName": "RestingProcedure", - "attributeId": 0x00000005, - "type": "int", - "reportable": True, - }, - 0x00000006: { - "attributeName": "TriggerCondition", - "attributeId": 0x00000006, - "type": "int", - "reportable": True, - }, - 0x00000007: { - "attributeName": "TriggerPosition", - "attributeId": 0x00000007, - "type": "int", - "reportable": True, - }, - 0x00000008: { - "attributeName": "WaitingDelay", - "attributeId": 0x00000008, - "type": "int", - "reportable": True, - }, - 0x00000009: { - "attributeName": "KickoffTimer", - "attributeId": 0x00000009, - "type": "int", - "reportable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index b5f3a3bd560926..dd7bc9897bd8dc 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -29237,11 +29237,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentErrorList", Tag=0x00000002, Type=typing.List[ClosureControl.Enums.ClosureErrorEnum]), ClusterObjectFieldDescriptor(Label="overallState", Tag=0x00000003, Type=typing.Union[Nullable, ClosureControl.Structs.OverallStateStruct]), ClusterObjectFieldDescriptor(Label="overallTarget", Tag=0x00000004, Type=typing.Union[Nullable, ClosureControl.Structs.OverallTargetStruct]), - ClusterObjectFieldDescriptor(Label="restingProcedure", Tag=0x00000005, Type=typing.Optional[ClosureControl.Enums.RestingProcedureEnum]), - ClusterObjectFieldDescriptor(Label="triggerCondition", Tag=0x00000006, Type=typing.Optional[ClosureControl.Enums.TriggerConditionEnum]), - ClusterObjectFieldDescriptor(Label="triggerPosition", Tag=0x00000007, Type=typing.Optional[ClosureControl.Enums.TriggerPositionEnum]), - ClusterObjectFieldDescriptor(Label="waitingDelay", Tag=0x00000008, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="kickoffTimer", Tag=0x00000009, 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]), @@ -29254,11 +29249,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: currentErrorList: typing.List[ClosureControl.Enums.ClosureErrorEnum] = field(default_factory=lambda: []) overallState: typing.Union[Nullable, ClosureControl.Structs.OverallStateStruct] = NullValue overallTarget: typing.Union[Nullable, ClosureControl.Structs.OverallTargetStruct] = NullValue - restingProcedure: typing.Optional[ClosureControl.Enums.RestingProcedureEnum] = None - triggerCondition: typing.Optional[ClosureControl.Enums.TriggerConditionEnum] = None - triggerPosition: typing.Optional[ClosureControl.Enums.TriggerPositionEnum] = None - waitingDelay: typing.Optional[uint] = None - kickoffTimer: 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: []) @@ -29296,12 +29286,11 @@ class MainStateEnum(MatterIntEnum): kProtected = 0x05 kDisengaged = 0x06 kSetupRequired = 0x07 - kPendingFallback = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 9 + kUnknownEnumValue = 8 class PositioningEnum(MatterIntEnum): kFullyClosed = 0x00 @@ -29316,17 +29305,7 @@ class PositioningEnum(MatterIntEnum): # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6 - class RestingProcedureEnum(MatterIntEnum): - kDoNothing = 0x00 - kReturnToFullyOpened = 0x01 - kReturnToFullyClosed = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving an unknown - # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3 - - class TagLatchEnum(MatterIntEnum): + class TargetLatchEnum(MatterIntEnum): kLatch = 0x00 kUnlatch = 0x01 # All received enum values that are not listed above will be mapped @@ -29335,36 +29314,12 @@ class TagLatchEnum(MatterIntEnum): # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2 - class TagPositionEnum(MatterIntEnum): + class TargetPositionEnum(MatterIntEnum): kCloseInFull = 0x00 kOpenInFull = 0x01 kPedestrian = 0x02 kVentilation = 0x03 kSignature = 0x04 - kSequenceNextStep = 0x05 - kPedestrianNextStep = 0x06 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving an unknown - # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7 - - class TriggerConditionEnum(MatterIntEnum): - kAfterDelay = 0x00 - kAfterApplicativeTrigger = 0x01 - kAfterDelayOrApplicativeTrigger = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving an unknown - # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3 - - class TriggerPositionEnum(MatterIntEnum): - kAtFullyClosed = 0x00 - kAtFullyOpened = 0x01 - kInBetween = 0x02 - kAtVentilation = 0x03 - kAtPedestrian = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown @@ -29382,7 +29337,6 @@ class Feature(IntFlag): kCalibration = 0x40 kProtection = 0x80 kManuallyOperable = 0x100 - kFallback = 0x200 class Structs: @dataclass @@ -29391,16 +29345,16 @@ class OverallStateStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="positioning", Tag=0, Type=typing.Optional[ClosureControl.Enums.PositioningEnum]), - ClusterObjectFieldDescriptor(Label="latching", Tag=1, Type=typing.Optional[ClosureControl.Enums.LatchingEnum]), - ClusterObjectFieldDescriptor(Label="speed", Tag=2, Type=typing.Optional[Globals.Enums.ThreeLevelAutoEnum]), - ClusterObjectFieldDescriptor(Label="extraInfo", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="positioning", Tag=0, Type=typing.Union[None, Nullable, ClosureControl.Enums.PositioningEnum]), + ClusterObjectFieldDescriptor(Label="latching", Tag=1, Type=typing.Union[None, Nullable, ClosureControl.Enums.LatchingEnum]), + ClusterObjectFieldDescriptor(Label="speed", Tag=2, Type=typing.Union[None, Nullable, Globals.Enums.ThreeLevelAutoEnum]), + ClusterObjectFieldDescriptor(Label="extraInfo", Tag=3, Type=typing.Union[None, Nullable, uint]), ]) - positioning: 'typing.Optional[ClosureControl.Enums.PositioningEnum]' = None - latching: 'typing.Optional[ClosureControl.Enums.LatchingEnum]' = None - speed: 'typing.Optional[Globals.Enums.ThreeLevelAutoEnum]' = None - extraInfo: 'typing.Optional[uint]' = None + positioning: 'typing.Union[None, Nullable, ClosureControl.Enums.PositioningEnum]' = None + latching: 'typing.Union[None, Nullable, ClosureControl.Enums.LatchingEnum]' = None + speed: 'typing.Union[None, Nullable, Globals.Enums.ThreeLevelAutoEnum]' = None + extraInfo: 'typing.Union[None, Nullable, uint]' = None @dataclass class OverallTargetStruct(ClusterObject): @@ -29408,13 +29362,13 @@ class OverallTargetStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="tagPosition", Tag=0, Type=typing.Optional[ClosureControl.Enums.TagPositionEnum]), - ClusterObjectFieldDescriptor(Label="tagLatch", Tag=1, Type=typing.Optional[ClosureControl.Enums.TagLatchEnum]), + ClusterObjectFieldDescriptor(Label="position", Tag=0, Type=typing.Optional[ClosureControl.Enums.TargetPositionEnum]), + ClusterObjectFieldDescriptor(Label="latch", Tag=1, Type=typing.Optional[ClosureControl.Enums.TargetLatchEnum]), ClusterObjectFieldDescriptor(Label="speed", Tag=2, Type=typing.Optional[Globals.Enums.ThreeLevelAutoEnum]), ]) - tagPosition: 'typing.Optional[ClosureControl.Enums.TagPositionEnum]' = None - tagLatch: 'typing.Optional[ClosureControl.Enums.TagLatchEnum]' = None + position: 'typing.Optional[ClosureControl.Enums.TargetPositionEnum]' = None + latch: 'typing.Optional[ClosureControl.Enums.TargetLatchEnum]' = None speed: 'typing.Optional[Globals.Enums.ThreeLevelAutoEnum]' = None class Commands: @@ -29442,13 +29396,13 @@ class MoveTo(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="tag", Tag=0, Type=typing.Optional[ClosureControl.Enums.TagPositionEnum]), - ClusterObjectFieldDescriptor(Label="latch", Tag=1, Type=typing.Optional[ClosureControl.Enums.TagLatchEnum]), + ClusterObjectFieldDescriptor(Label="position", Tag=0, Type=typing.Optional[ClosureControl.Enums.TargetPositionEnum]), + ClusterObjectFieldDescriptor(Label="latch", Tag=1, Type=typing.Optional[ClosureControl.Enums.TargetLatchEnum]), ClusterObjectFieldDescriptor(Label="speed", Tag=2, Type=typing.Optional[Globals.Enums.ThreeLevelAutoEnum]), ]) - tag: typing.Optional[ClosureControl.Enums.TagPositionEnum] = None - latch: typing.Optional[ClosureControl.Enums.TagLatchEnum] = None + position: typing.Optional[ClosureControl.Enums.TargetPositionEnum] = None + latch: typing.Optional[ClosureControl.Enums.TargetLatchEnum] = None speed: typing.Optional[Globals.Enums.ThreeLevelAutoEnum] = None @dataclass @@ -29464,41 +29418,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) - @dataclass - class ConfigureFallback(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000104 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[typing.Optional[str]] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="restingProcedure", Tag=0, Type=typing.Optional[ClosureControl.Enums.RestingProcedureEnum]), - ClusterObjectFieldDescriptor(Label="triggerCondition", Tag=1, Type=typing.Optional[ClosureControl.Enums.TriggerConditionEnum]), - ClusterObjectFieldDescriptor(Label="triggerPosition", Tag=2, Type=typing.Optional[ClosureControl.Enums.TriggerPositionEnum]), - ClusterObjectFieldDescriptor(Label="waitingDelay", Tag=3, Type=typing.Optional[uint]), - ]) - - restingProcedure: typing.Optional[ClosureControl.Enums.RestingProcedureEnum] = None - triggerCondition: typing.Optional[ClosureControl.Enums.TriggerConditionEnum] = None - triggerPosition: typing.Optional[ClosureControl.Enums.TriggerPositionEnum] = None - waitingDelay: typing.Optional[uint] = None - - @dataclass - class CancelFallback(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000104 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[typing.Optional[str]] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - class Attributes: @dataclass class CountdownTime(ClusterAttributeDescriptor): @@ -29580,86 +29499,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: typing.Union[Nullable, ClosureControl.Structs.OverallTargetStruct] = NullValue - @dataclass - class RestingProcedure(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000104 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000005 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[ClosureControl.Enums.RestingProcedureEnum]) - - value: typing.Optional[ClosureControl.Enums.RestingProcedureEnum] = None - - @dataclass - class TriggerCondition(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000104 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000006 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[ClosureControl.Enums.TriggerConditionEnum]) - - value: typing.Optional[ClosureControl.Enums.TriggerConditionEnum] = None - - @dataclass - class TriggerPosition(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000104 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000007 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[ClosureControl.Enums.TriggerPositionEnum]) - - value: typing.Optional[ClosureControl.Enums.TriggerPositionEnum] = None - - @dataclass - class WaitingDelay(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000104 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000008 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: typing.Optional[uint] = None - - @dataclass - class KickoffTimer(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000104 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000009 - - @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 9a16fb4d530724..d2c02042c5fbc3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -3471,21 +3471,6 @@ static BOOL AttributeIsSpecifiedInClosureControlCluster(AttributeId aAttributeId case Attributes::OverallTarget::Id: { return YES; } - case Attributes::RestingProcedure::Id: { - return YES; - } - case Attributes::TriggerCondition::Id: { - return YES; - } - case Attributes::TriggerPosition::Id: { - return YES; - } - case Attributes::WaitingDelay::Id: { - return YES; - } - case Attributes::KickoffTimer::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 baf2956fd5e3b5..db5bbd0b4a47d4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -10748,22 +10748,38 @@ static id _Nullable DecodeAttributeValueForClosureControlCluster(AttributeId aAt } else { value = [MTRClosureControlClusterOverallStateStruct new]; if (cppValue.Value().positioning.HasValue()) { - value.positioning = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().positioning.Value())]; + if (cppValue.Value().positioning.Value().IsNull()) { + value.positioning = nil; + } else { + value.positioning = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().positioning.Value().Value())]; + } } else { value.positioning = nil; } if (cppValue.Value().latching.HasValue()) { - value.latching = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().latching.Value())]; + if (cppValue.Value().latching.Value().IsNull()) { + value.latching = nil; + } else { + value.latching = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().latching.Value().Value())]; + } } else { value.latching = nil; } if (cppValue.Value().speed.HasValue()) { - value.speed = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().speed.Value())]; + if (cppValue.Value().speed.Value().IsNull()) { + value.speed = nil; + } else { + value.speed = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().speed.Value().Value())]; + } } else { value.speed = nil; } if (cppValue.Value().extraInfo.HasValue()) { - value.extraInfo = [NSNumber numberWithUnsignedInt:cppValue.Value().extraInfo.Value()]; + if (cppValue.Value().extraInfo.Value().IsNull()) { + value.extraInfo = nil; + } else { + value.extraInfo = [NSNumber numberWithUnsignedInt:cppValue.Value().extraInfo.Value().Value()]; + } } else { value.extraInfo = nil; } @@ -10782,15 +10798,15 @@ static id _Nullable DecodeAttributeValueForClosureControlCluster(AttributeId aAt value = nil; } else { value = [MTRClosureControlClusterOverallTargetStruct new]; - if (cppValue.Value().tagPosition.HasValue()) { - value.tagPosition = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().tagPosition.Value())]; + if (cppValue.Value().position.HasValue()) { + value.position = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().position.Value())]; } else { - value.tagPosition = nil; + value.position = nil; } - if (cppValue.Value().tagLatch.HasValue()) { - value.tagLatch = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().tagLatch.Value())]; + if (cppValue.Value().latch.HasValue()) { + value.latch = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().latch.Value())]; } else { - value.tagLatch = nil; + value.latch = nil; } if (cppValue.Value().speed.HasValue()) { value.speed = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().speed.Value())]; @@ -10800,61 +10816,6 @@ static id _Nullable DecodeAttributeValueForClosureControlCluster(AttributeId aAt } return value; } - case Attributes::RestingProcedure::Id: { - using TypeInfo = Attributes::RestingProcedure::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::TriggerCondition::Id: { - using TypeInfo = Attributes::TriggerCondition::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::TriggerPosition::Id: { - using TypeInfo = Attributes::TriggerPosition::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::WaitingDelay::Id: { - using TypeInfo = Attributes::WaitingDelay::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::KickoffTimer::Id: { - using TypeInfo = Attributes::KickoffTimer::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index f4d3255dd8cb8f..8f01435000ede2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -8814,22 +8814,6 @@ MTR_PROVISIONALLY_AVAILABLE - (void)calibrateWithParams:(MTRClosureControlClusterCalibrateParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)calibrateWithCompletion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -/** - * Command ConfigureFallback - * - * Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: - */ -- (void)configureFallbackWithParams:(MTRClosureControlClusterConfigureFallbackParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)configureFallbackWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; -/** - * Command CancelFallback - * - * Upon receipt, this SHALL cancel the current PendingFallback. - */ -- (void)cancelFallbackWithParams:(MTRClosureControlClusterCancelFallbackParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)cancelFallbackWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams *)params @@ -8861,36 +8845,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(MTRClosureControlClusterOverallTargetStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeOverallTargetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRClosureControlClusterOverallTargetStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeRestingProcedureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeRestingProcedureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeRestingProcedureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeTriggerConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeTriggerConditionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeTriggerConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeTriggerPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeTriggerPositionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeTriggerPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeWaitingDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeWaitingDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeWaitingDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeKickoffTimerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeKickoffTimerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeKickoffTimerWithClusterStateCache:(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 @@ -19178,7 +19132,6 @@ typedef NS_ENUM(uint8_t, MTRClosureControlMainState) { MTRClosureControlMainStateProtected MTR_PROVISIONALLY_AVAILABLE = 0x05, MTRClosureControlMainStateDisengaged MTR_PROVISIONALLY_AVAILABLE = 0x06, MTRClosureControlMainStateSetupRequired MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRClosureControlMainStatePendingFallback MTR_PROVISIONALLY_AVAILABLE = 0x08, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRClosureControlPositioning) { @@ -19190,39 +19143,17 @@ typedef NS_ENUM(uint8_t, MTRClosureControlPositioning) { MTRClosureControlPositioningOpenedAtSignature MTR_PROVISIONALLY_AVAILABLE = 0x05, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRClosureControlRestingProcedure) { - MTRClosureControlRestingProcedureDoNothing MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRClosureControlRestingProcedureReturnToFullyOpened MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRClosureControlRestingProcedureReturnToFullyClosed MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRClosureControlTagLatch) { - MTRClosureControlTagLatchLatch MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRClosureControlTagLatchUnlatch MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRClosureControlTagPosition) { - MTRClosureControlTagPositionCloseInFull MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRClosureControlTagPositionOpenInFull MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRClosureControlTagPositionPedestrian MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRClosureControlTagPositionVentilation MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRClosureControlTagPositionSignature MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRClosureControlTagPositionSequenceNextStep MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRClosureControlTagPositionPedestrianNextStep MTR_PROVISIONALLY_AVAILABLE = 0x06, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRClosureControlTriggerCondition) { - MTRClosureControlTriggerConditionAfterDelay MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRClosureControlTriggerConditionAfterApplicativeTrigger MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRClosureControlTriggerConditionAfterDelayOrApplicativeTrigger MTR_PROVISIONALLY_AVAILABLE = 0x02, +typedef NS_ENUM(uint8_t, MTRClosureControlTargetLatch) { + MTRClosureControlTargetLatchLatch MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRClosureControlTargetLatchUnlatch MTR_PROVISIONALLY_AVAILABLE = 0x01, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRClosureControlTriggerPosition) { - MTRClosureControlTriggerPositionAtFullyClosed MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRClosureControlTriggerPositionAtFullyOpened MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRClosureControlTriggerPositionInBetween MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRClosureControlTriggerPositionAtVentilation MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRClosureControlTriggerPositionAtPedestrian MTR_PROVISIONALLY_AVAILABLE = 0x04, +typedef NS_ENUM(uint8_t, MTRClosureControlTargetPosition) { + MTRClosureControlTargetPositionCloseInFull MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRClosureControlTargetPositionOpenInFull MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRClosureControlTargetPositionPedestrian MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRClosureControlTargetPositionVentilation MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRClosureControlTargetPositionSignature MTR_PROVISIONALLY_AVAILABLE = 0x04, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRClosureControlFeature) { @@ -19235,7 +19166,6 @@ typedef NS_OPTIONS(uint32_t, MTRClosureControlFeature) { MTRClosureControlFeatureCalibration MTR_PROVISIONALLY_AVAILABLE = 0x40, MTRClosureControlFeatureProtection MTR_PROVISIONALLY_AVAILABLE = 0x80, MTRClosureControlFeatureManuallyOperable MTR_PROVISIONALLY_AVAILABLE = 0x100, - MTRClosureControlFeatureFallback MTR_PROVISIONALLY_AVAILABLE = 0x200, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRServiceAreaOperationalStatus) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 4353b0c45d6963..1d4cddfec1484f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -58614,62 +58614,6 @@ - (void)calibrateWithParams:(MTRClosureControlClusterCalibrateParams * _Nullable queue:self.callbackQueue completion:responseHandler]; } -- (void)configureFallbackWithCompletion:(MTRStatusCompletion)completion -{ - [self configureFallbackWithParams:nil completion:completion]; -} -- (void)configureFallbackWithParams:(MTRClosureControlClusterConfigureFallbackParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRClosureControlClusterConfigureFallbackParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ClosureControl::Commands::ConfigureFallback::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)cancelFallbackWithCompletion:(MTRStatusCompletion)completion -{ - [self cancelFallbackWithParams:nil completion:completion]; -} -- (void)cancelFallbackWithParams:(MTRClosureControlClusterCancelFallbackParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRClosureControlClusterCancelFallbackParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ClosureControl::Commands::CancelFallback::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { @@ -58851,186 +58795,6 @@ + (void)readAttributeOverallTargetWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRestingProcedureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::RestingProcedure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeRestingProcedureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ClosureControl::Attributes::RestingProcedure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeRestingProcedureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::RestingProcedure::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeTriggerConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::TriggerCondition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeTriggerConditionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ClosureControl::Attributes::TriggerCondition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeTriggerConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::TriggerCondition::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeTriggerPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::TriggerPosition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeTriggerPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ClosureControl::Attributes::TriggerPosition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeTriggerPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::TriggerPosition::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeWaitingDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::WaitingDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeWaitingDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ClosureControl::Attributes::WaitingDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeWaitingDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::WaitingDelay::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeKickoffTimerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::KickoffTimer::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeKickoffTimerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ClosureControl::Attributes::KickoffTimer::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeKickoffTimerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ClosureControl::Attributes::KickoffTimer::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 = ClosureControl::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 4ee7dc5ca8779e..3d1374483d4c31 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -2907,11 +2907,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterClosureControlAttributeCurrentErrorListID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterClosureControlAttributeOverallStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterClosureControlAttributeOverallTargetID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterClosureControlAttributeRestingProcedureID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterClosureControlAttributeTriggerConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterClosureControlAttributeTriggerPositionID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterClosureControlAttributeWaitingDelayID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterClosureControlAttributeKickoffTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, MTRAttributeIDTypeClusterClosureControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterClosureControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterClosureControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -6600,8 +6595,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterClosureControlCommandStopID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRCommandIDTypeClusterClosureControlCommandMoveToID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterClosureControlCommandCalibrateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterClosureControlCommandConfigureFallbackID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRCommandIDTypeClusterClosureControlCommandCancelFallbackID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, // Cluster ServiceArea commands MTRCommandIDTypeClusterServiceAreaCommandSelectAreasID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 06c29da02b80e4..567cf2108a26b3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -4948,26 +4948,6 @@ result = @"OverallTarget"; break; - case MTRAttributeIDTypeClusterClosureControlAttributeRestingProcedureID: - result = @"RestingProcedure"; - break; - - case MTRAttributeIDTypeClusterClosureControlAttributeTriggerConditionID: - result = @"TriggerCondition"; - break; - - case MTRAttributeIDTypeClusterClosureControlAttributeTriggerPositionID: - result = @"TriggerPosition"; - break; - - case MTRAttributeIDTypeClusterClosureControlAttributeWaitingDelayID: - result = @"WaitingDelay"; - break; - - case MTRAttributeIDTypeClusterClosureControlAttributeKickoffTimerID: - result = @"KickoffTimer"; - break; - case MTRAttributeIDTypeClusterClosureControlAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -10226,14 +10206,6 @@ result = @"Calibrate"; break; - case MTRCommandIDTypeClusterClosureControlCommandConfigureFallbackID: - result = @"ConfigureFallback"; - break; - - case MTRCommandIDTypeClusterClosureControlCommandCancelFallbackID: - result = @"CancelFallback"; - break; - default: result = [NSString stringWithFormat:@"", commandID]; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index d880c329d4bc4a..1cd32ee3810e7e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -4134,12 +4134,6 @@ MTR_PROVISIONALLY_AVAILABLE - (void)calibrateWithParams:(MTRClosureControlClusterCalibrateParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)calibrateWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)configureFallbackWithParams:(MTRClosureControlClusterConfigureFallbackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)configureFallbackWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)cancelFallbackWithParams:(MTRClosureControlClusterCancelFallbackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)cancelFallbackWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -4151,16 +4145,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeOverallTargetWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeRestingProcedureWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeTriggerConditionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeTriggerPositionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeWaitingDelayWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeKickoffTimerWithParams:(MTRReadParams * _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 0653ffec5aaf1c..f85e6e97ac4a4d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -11888,68 +11888,6 @@ - (void)calibrateWithParams:(MTRClosureControlClusterCalibrateParams * _Nullable completion:responseHandler]; } -- (void)configureFallbackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self configureFallbackWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)configureFallbackWithParams:(MTRClosureControlClusterConfigureFallbackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRClosureControlClusterConfigureFallbackParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ClosureControl::Commands::ConfigureFallback::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)cancelFallbackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self cancelFallbackWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)cancelFallbackWithParams:(MTRClosureControlClusterCancelFallbackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRClosureControlClusterCancelFallbackParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ClosureControl::Commands::CancelFallback::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - - (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeClosureControlID) attributeID:@(MTRAttributeIDTypeClusterClosureControlAttributeCountdownTimeID) params:params]; @@ -11975,31 +11913,6 @@ - (void)cancelFallbackWithParams:(MTRClosureControlClusterCancelFallbackParams * return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeClosureControlID) attributeID:@(MTRAttributeIDTypeClusterClosureControlAttributeOverallTargetID) params:params]; } -- (NSDictionary * _Nullable)readAttributeRestingProcedureWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeClosureControlID) attributeID:@(MTRAttributeIDTypeClusterClosureControlAttributeRestingProcedureID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeTriggerConditionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeClosureControlID) attributeID:@(MTRAttributeIDTypeClusterClosureControlAttributeTriggerConditionID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeTriggerPositionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeClosureControlID) attributeID:@(MTRAttributeIDTypeClusterClosureControlAttributeTriggerPositionID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeWaitingDelayWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeClosureControlID) attributeID:@(MTRAttributeIDTypeClusterClosureControlAttributeWaitingDelayID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeKickoffTimerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeClosureControlID) attributeID:@(MTRAttributeIDTypeClusterClosureControlAttributeKickoffTimerID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeClosureControlID) attributeID:@(MTRAttributeIDTypeClusterClosureControlAttributeGeneratedCommandListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index fd088cd1556906..d6ea8d97861981 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -7636,7 +7636,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRClosureControlClusterMoveToParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable tag MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable position MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable latch MTR_PROVISIONALLY_AVAILABLE; @@ -7695,70 +7695,6 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRClosureControlClusterConfigureFallbackParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nullable restingProcedure MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable triggerCondition MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable triggerPosition MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable waitingDelay MTR_PROVISIONALLY_AVAILABLE; -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_PROVISIONALLY_AVAILABLE -@interface MTRClosureControlClusterCancelFallbackParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRServiceAreaClusterSelectAreasParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index f4b10c6d5eb930..fb58f1518e348d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -21851,7 +21851,7 @@ - (instancetype)init { if (self = [super init]) { - _tag = nil; + _position = nil; _latch = nil; @@ -21866,7 +21866,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRClosureControlClusterMoveToParams alloc] init]; - other.tag = self.tag; + other.position = self.position; other.latch = self.latch; other.speed = self.speed; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -21877,7 +21877,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: tag:%@; latch:%@; speed:%@; >", NSStringFromClass([self class]), _tag, _latch, _speed]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: position:%@; latch:%@; speed:%@; >", NSStringFromClass([self class]), _position, _latch, _speed]; return descriptionString; } @@ -21890,9 +21890,9 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::ClosureControl::Commands::MoveTo::Type encodableStruct; ListFreer listFreer; { - if (self.tag != nil) { - auto & definedValue_0 = encodableStruct.tag.Emplace(); - definedValue_0 = static_cast>(self.tag.unsignedCharValue); + if (self.position != nil) { + auto & definedValue_0 = encodableStruct.position.Emplace(); + definedValue_0 = static_cast>(self.position.unsignedCharValue); } } { @@ -22019,188 +22019,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRClosureControlClusterConfigureFallbackParams -- (instancetype)init -{ - if (self = [super init]) { - - _restingProcedure = nil; - - _triggerCondition = nil; - - _triggerPosition = nil; - - _waitingDelay = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRClosureControlClusterConfigureFallbackParams alloc] init]; - - other.restingProcedure = self.restingProcedure; - other.triggerCondition = self.triggerCondition; - other.triggerPosition = self.triggerPosition; - other.waitingDelay = self.waitingDelay; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: restingProcedure:%@; triggerCondition:%@; triggerPosition:%@; waitingDelay:%@; >", NSStringFromClass([self class]), _restingProcedure, _triggerCondition, _triggerPosition, _waitingDelay]; - return descriptionString; -} - -@end - -@implementation MTRClosureControlClusterConfigureFallbackParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::ClosureControl::Commands::ConfigureFallback::Type encodableStruct; - ListFreer listFreer; - { - if (self.restingProcedure != nil) { - auto & definedValue_0 = encodableStruct.restingProcedure.Emplace(); - definedValue_0 = static_cast>(self.restingProcedure.unsignedCharValue); - } - } - { - if (self.triggerCondition != nil) { - auto & definedValue_0 = encodableStruct.triggerCondition.Emplace(); - definedValue_0 = static_cast>(self.triggerCondition.unsignedCharValue); - } - } - { - if (self.triggerPosition != nil) { - auto & definedValue_0 = encodableStruct.triggerPosition.Emplace(); - definedValue_0 = static_cast>(self.triggerPosition.unsignedCharValue); - } - } - { - if (self.waitingDelay != nil) { - auto & definedValue_0 = encodableStruct.waitingDelay.Emplace(); - definedValue_0 = self.waitingDelay.unsignedIntValue; - } - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - -@implementation MTRClosureControlClusterCancelFallbackParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRClosureControlClusterCancelFallbackParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRClosureControlClusterCancelFallbackParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::ClosureControl::Commands::CancelFallback::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - @implementation MTRServiceAreaClusterSelectAreasParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index f2583c00fea18f..1584a4dd662ac2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1444,18 +1444,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRClosureControlClusterConfigureFallbackParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRClosureControlClusterCancelFallbackParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - @interface MTRServiceAreaClusterSelectAreasParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index d79edaec9e3b16..5bfea0f51e01cd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1619,8 +1619,8 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRClosureControlClusterOverallTargetStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable tagPosition MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable tagLatch MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable position MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable latch MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable speed MTR_PROVISIONALLY_AVAILABLE; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index b9a6b60e3ab770..976b9755271c50 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -6752,9 +6752,9 @@ - (instancetype)init { if (self = [super init]) { - _tagPosition = nil; + _position = nil; - _tagLatch = nil; + _latch = nil; _speed = nil; } @@ -6765,8 +6765,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRClosureControlClusterOverallTargetStruct alloc] init]; - other.tagPosition = self.tagPosition; - other.tagLatch = self.tagLatch; + other.position = self.position; + other.latch = self.latch; other.speed = self.speed; return other; @@ -6774,7 +6774,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: tagPosition:%@; tagLatch:%@; speed:%@; >", NSStringFromClass([self class]), _tagPosition, _tagLatch, _speed]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: position:%@; latch:%@; speed:%@; >", NSStringFromClass([self class]), _position, _latch, _speed]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index ad2100e2e80110..eed45db10f6012 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -19694,244 +19694,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters } // namespace MainState -namespace RestingProcedure { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ClosureControl::RestingProcedureEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ClosureControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::RestingProcedureEnum value, - MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ClosureControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::RestingProcedureEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ClosureControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace RestingProcedure - -namespace TriggerCondition { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerConditionEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ClosureControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerConditionEnum value, - MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ClosureControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerConditionEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ClosureControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace TriggerCondition - -namespace TriggerPosition { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerPositionEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ClosureControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerPositionEnum value, - MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ClosureControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerPositionEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ClosureControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace TriggerPosition - -namespace WaitingDelay { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ClosureControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ClosureControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ClosureControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace WaitingDelay - -namespace KickoffTimer { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ClosureControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ClosureControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ClosureControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace KickoffTimer - namespace FeatureMap { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 3afe2b6276614c..a03013201d1832 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -3102,42 +3102,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters MarkAttributeDirty markDirty); } // namespace MainState -namespace RestingProcedure { -Protocols::InteractionModel::Status Get(EndpointId endpoint, - chip::app::Clusters::ClosureControl::RestingProcedureEnum * value); // RestingProcedureEnum -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::RestingProcedureEnum value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::RestingProcedureEnum value, - MarkAttributeDirty markDirty); -} // namespace RestingProcedure - -namespace TriggerCondition { -Protocols::InteractionModel::Status Get(EndpointId endpoint, - chip::app::Clusters::ClosureControl::TriggerConditionEnum * value); // TriggerConditionEnum -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerConditionEnum value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerConditionEnum value, - MarkAttributeDirty markDirty); -} // namespace TriggerCondition - -namespace TriggerPosition { -Protocols::InteractionModel::Status Get(EndpointId endpoint, - chip::app::Clusters::ClosureControl::TriggerPositionEnum * value); // TriggerPositionEnum -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerPositionEnum value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ClosureControl::TriggerPositionEnum value, - MarkAttributeDirty markDirty); -} // namespace TriggerPosition - -namespace WaitingDelay { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // elapsed_s -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -} // namespace WaitingDelay - -namespace KickoffTimer { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // elapsed_s -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -} // namespace KickoffTimer - namespace FeatureMap { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index c8c3b01f738881..b8eb01622a2c08 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -6457,18 +6457,6 @@ bool emberAfClosureControlClusterMoveToCallback( bool emberAfClosureControlClusterCalibrateCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::ClosureControl::Commands::Calibrate::DecodableType & commandData); -/** - * @brief Closure Control Cluster ConfigureFallback Command callback (from client) - */ -bool emberAfClosureControlClusterConfigureFallbackCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ClosureControl::Commands::ConfigureFallback::DecodableType & commandData); -/** - * @brief Closure Control Cluster CancelFallback Command callback (from client) - */ -bool emberAfClosureControlClusterCancelFallbackCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ClosureControl::Commands::CancelFallback::DecodableType & commandData); /** * @brief Thermostat Cluster SetpointRaiseLower Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 0722186a741998..3dc9efa0c4850c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -2719,7 +2719,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::MainSta case EnumType::kProtected: case EnumType::kDisengaged: case EnumType::kSetupRequired: - case EnumType::kPendingFallback: return val; default: return EnumType::kUnknownEnumValue; @@ -2741,22 +2740,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::Positio return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::RestingProcedureEnum val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::TargetLatchEnum val) { - using EnumType = ClosureControl::RestingProcedureEnum; - switch (val) - { - case EnumType::kDoNothing: - case EnumType::kReturnToFullyOpened: - case EnumType::kReturnToFullyClosed: - return val; - default: - return EnumType::kUnknownEnumValue; - } -} -static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::TagLatchEnum val) -{ - using EnumType = ClosureControl::TagLatchEnum; + using EnumType = ClosureControl::TargetLatchEnum; switch (val) { case EnumType::kLatch: @@ -2766,9 +2752,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::TagLatc return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::TagPositionEnum val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::TargetPositionEnum val) { - using EnumType = ClosureControl::TagPositionEnum; + using EnumType = ClosureControl::TargetPositionEnum; switch (val) { case EnumType::kCloseInFull: @@ -2776,36 +2762,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::TagPosi case EnumType::kPedestrian: case EnumType::kVentilation: case EnumType::kSignature: - case EnumType::kSequenceNextStep: - case EnumType::kPedestrianNextStep: - return val; - default: - return EnumType::kUnknownEnumValue; - } -} -static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::TriggerConditionEnum val) -{ - using EnumType = ClosureControl::TriggerConditionEnum; - switch (val) - { - case EnumType::kAfterDelay: - case EnumType::kAfterApplicativeTrigger: - case EnumType::kAfterDelayOrApplicativeTrigger: - return val; - default: - return EnumType::kUnknownEnumValue; - } -} -static auto __attribute__((unused)) EnsureKnownEnumValue(ClosureControl::TriggerPositionEnum val) -{ - using EnumType = ClosureControl::TriggerPositionEnum; - switch (val) - { - case EnumType::kAtFullyClosed: - case EnumType::kAtFullyOpened: - case EnumType::kInBetween: - case EnumType::kAtVentilation: - case EnumType::kAtPedestrian: return val; default: return EnumType::kUnknownEnumValue; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 5fed7680990392..38a242222a583b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -4007,12 +4007,11 @@ enum class MainStateEnum : uint8_t kProtected = 0x05, kDisengaged = 0x06, kSetupRequired = 0x07, - kPendingFallback = 0x08, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 9, + kUnknownEnumValue = 8, }; // Enum for PositioningEnum @@ -4031,21 +4030,8 @@ enum class PositioningEnum : uint8_t kUnknownEnumValue = 6, }; -// Enum for RestingProcedureEnum -enum class RestingProcedureEnum : uint8_t -{ - kDoNothing = 0x00, - kReturnToFullyOpened = 0x01, - kReturnToFullyClosed = 0x02, - // All received enum values that are not listed above will be mapped - // to kUnknownEnumValue. This is a helper enum value that should only - // be used by code to process how it handles receiving and unknown - // enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, -}; - -// Enum for TagLatchEnum -enum class TagLatchEnum : uint8_t +// Enum for TargetLatchEnum +enum class TargetLatchEnum : uint8_t { kLatch = 0x00, kUnlatch = 0x01, @@ -4056,44 +4042,14 @@ enum class TagLatchEnum : uint8_t kUnknownEnumValue = 2, }; -// Enum for TagPositionEnum -enum class TagPositionEnum : uint8_t -{ - kCloseInFull = 0x00, - kOpenInFull = 0x01, - kPedestrian = 0x02, - kVentilation = 0x03, - kSignature = 0x04, - kSequenceNextStep = 0x05, - kPedestrianNextStep = 0x06, - // All received enum values that are not listed above will be mapped - // to kUnknownEnumValue. This is a helper enum value that should only - // be used by code to process how it handles receiving and unknown - // enum value. This specific should never be transmitted. - kUnknownEnumValue = 7, -}; - -// Enum for TriggerConditionEnum -enum class TriggerConditionEnum : uint8_t -{ - kAfterDelay = 0x00, - kAfterApplicativeTrigger = 0x01, - kAfterDelayOrApplicativeTrigger = 0x02, - // All received enum values that are not listed above will be mapped - // to kUnknownEnumValue. This is a helper enum value that should only - // be used by code to process how it handles receiving and unknown - // enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, -}; - -// Enum for TriggerPositionEnum -enum class TriggerPositionEnum : uint8_t +// Enum for TargetPositionEnum +enum class TargetPositionEnum : uint8_t { - kAtFullyClosed = 0x00, - kAtFullyOpened = 0x01, - kInBetween = 0x02, - kAtVentilation = 0x03, - kAtPedestrian = 0x04, + kCloseInFull = 0x00, + kOpenInFull = 0x01, + kPedestrian = 0x02, + kVentilation = 0x03, + kSignature = 0x04, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown @@ -4113,7 +4069,6 @@ enum class Feature : uint32_t kCalibration = 0x40, kProtection = 0x80, kManuallyOperable = 0x100, - kFallback = 0x200, }; } // namespace ClosureControl diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 5e37f5c1688bda..4ee1c857c8c542 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -20429,8 +20429,8 @@ namespace OverallTargetStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTagPosition), tagPosition); - encoder.Encode(to_underlying(Fields::kTagLatch), tagLatch); + encoder.Encode(to_underlying(Fields::kPosition), position); + encoder.Encode(to_underlying(Fields::kLatch), latch); encoder.Encode(to_underlying(Fields::kSpeed), speed); return encoder.Finalize(); } @@ -20449,13 +20449,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kTagPosition)) + if (__context_tag == to_underlying(Fields::kPosition)) { - err = DataModel::Decode(reader, tagPosition); + err = DataModel::Decode(reader, position); } - else if (__context_tag == to_underlying(Fields::kTagLatch)) + else if (__context_tag == to_underlying(Fields::kLatch)) { - err = DataModel::Decode(reader, tagLatch); + err = DataModel::Decode(reader, latch); } else if (__context_tag == to_underlying(Fields::kSpeed)) { @@ -20497,7 +20497,7 @@ namespace MoveTo { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTag), tag); + encoder.Encode(to_underlying(Fields::kPosition), position); encoder.Encode(to_underlying(Fields::kLatch), latch); encoder.Encode(to_underlying(Fields::kSpeed), speed); return encoder.Finalize(); @@ -20517,9 +20517,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kTag)) + if (__context_tag == to_underlying(Fields::kPosition)) { - err = DataModel::Decode(reader, tag); + err = DataModel::Decode(reader, position); } else if (__context_tag == to_underlying(Fields::kLatch)) { @@ -20557,75 +20557,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace Calibrate. -namespace ConfigureFallback { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kRestingProcedure), restingProcedure); - encoder.Encode(to_underlying(Fields::kTriggerCondition), triggerCondition); - encoder.Encode(to_underlying(Fields::kTriggerPosition), triggerPosition); - encoder.Encode(to_underlying(Fields::kWaitingDelay), waitingDelay); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kRestingProcedure)) - { - err = DataModel::Decode(reader, restingProcedure); - } - else if (__context_tag == to_underlying(Fields::kTriggerCondition)) - { - err = DataModel::Decode(reader, triggerCondition); - } - else if (__context_tag == to_underlying(Fields::kTriggerPosition)) - { - err = DataModel::Decode(reader, triggerPosition); - } - else if (__context_tag == to_underlying(Fields::kWaitingDelay)) - { - err = DataModel::Decode(reader, waitingDelay); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace ConfigureFallback. -namespace CancelFallback { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace CancelFallback. } // namespace Commands namespace Attributes { @@ -20643,16 +20574,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, overallState); case Attributes::OverallTarget::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, overallTarget); - case Attributes::RestingProcedure::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, restingProcedure); - case Attributes::TriggerCondition::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, triggerCondition); - case Attributes::TriggerPosition::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, triggerPosition); - case Attributes::WaitingDelay::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, waitingDelay); - case Attributes::KickoffTimer::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, kickoffTimer); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 09167426d29f51..33d2419a11ec07 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -27487,10 +27487,10 @@ enum class Fields : uint8_t struct Type { public: - Optional positioning; - Optional latching; - Optional speed; - Optional extraInfo; + Optional> positioning; + Optional> latching; + Optional> speed; + Optional> extraInfo; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -27505,16 +27505,16 @@ using DecodableType = Type; namespace OverallTargetStruct { enum class Fields : uint8_t { - kTagPosition = 0, - kTagLatch = 1, - kSpeed = 2, + kPosition = 0, + kLatch = 1, + kSpeed = 2, }; struct Type { public: - Optional tagPosition; - Optional tagLatch; + Optional position; + Optional latch; Optional speed; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -27547,16 +27547,6 @@ struct Type; struct DecodableType; } // namespace Calibrate -namespace ConfigureFallback { -struct Type; -struct DecodableType; -} // namespace ConfigureFallback - -namespace CancelFallback { -struct Type; -struct DecodableType; -} // namespace CancelFallback - } // namespace Commands namespace Commands { @@ -27591,9 +27581,9 @@ struct DecodableType namespace MoveTo { enum class Fields : uint8_t { - kTag = 0, - kLatch = 1, - kSpeed = 2, + kPosition = 0, + kLatch = 1, + kSpeed = 2, }; struct Type @@ -27603,8 +27593,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveTo::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - Optional tag; - Optional latch; + Optional position; + Optional latch; Optional speed; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -27620,8 +27610,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveTo::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - Optional tag; - Optional latch; + Optional position; + Optional latch; Optional speed; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -27654,75 +27644,6 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Calibrate -namespace ConfigureFallback { -enum class Fields : uint8_t -{ - kRestingProcedure = 0, - kTriggerCondition = 1, - kTriggerPosition = 2, - kWaitingDelay = 3, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ConfigureFallback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - - Optional restingProcedure; - Optional triggerCondition; - Optional triggerPosition; - Optional waitingDelay; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::ConfigureFallback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - - Optional restingProcedure; - Optional triggerCondition; - Optional triggerPosition; - Optional waitingDelay; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace ConfigureFallback -namespace CancelFallback { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CancelFallback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::CancelFallback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace CancelFallback } // namespace Commands namespace Attributes { @@ -27791,66 +27712,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace OverallTarget -namespace RestingProcedure { -struct TypeInfo -{ - using Type = chip::app::Clusters::ClosureControl::RestingProcedureEnum; - using DecodableType = chip::app::Clusters::ClosureControl::RestingProcedureEnum; - using DecodableArgType = chip::app::Clusters::ClosureControl::RestingProcedureEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RestingProcedure::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RestingProcedure -namespace TriggerCondition { -struct TypeInfo -{ - using Type = chip::app::Clusters::ClosureControl::TriggerConditionEnum; - using DecodableType = chip::app::Clusters::ClosureControl::TriggerConditionEnum; - using DecodableArgType = chip::app::Clusters::ClosureControl::TriggerConditionEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TriggerCondition::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TriggerCondition -namespace TriggerPosition { -struct TypeInfo -{ - using Type = chip::app::Clusters::ClosureControl::TriggerPositionEnum; - using DecodableType = chip::app::Clusters::ClosureControl::TriggerPositionEnum; - using DecodableArgType = chip::app::Clusters::ClosureControl::TriggerPositionEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TriggerPosition::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TriggerPosition -namespace WaitingDelay { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WaitingDelay::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace WaitingDelay -namespace KickoffTimer { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ClosureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::KickoffTimer::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace KickoffTimer namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -27896,14 +27757,6 @@ struct TypeInfo Attributes::CurrentErrorList::TypeInfo::DecodableType currentErrorList; Attributes::OverallState::TypeInfo::DecodableType overallState; Attributes::OverallTarget::TypeInfo::DecodableType overallTarget; - Attributes::RestingProcedure::TypeInfo::DecodableType restingProcedure = - static_cast(0); - Attributes::TriggerCondition::TypeInfo::DecodableType triggerCondition = - static_cast(0); - Attributes::TriggerPosition::TypeInfo::DecodableType triggerPosition = - static_cast(0); - Attributes::WaitingDelay::TypeInfo::DecodableType waitingDelay = static_cast(0); - Attributes::KickoffTimer::TypeInfo::DecodableType kickoffTimer = 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/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 5b07520dfb7ab7..bc57b68aac7339 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4312,26 +4312,6 @@ namespace OverallTarget { static constexpr AttributeId Id = 0x00000004; } // namespace OverallTarget -namespace RestingProcedure { -static constexpr AttributeId Id = 0x00000005; -} // namespace RestingProcedure - -namespace TriggerCondition { -static constexpr AttributeId Id = 0x00000006; -} // namespace TriggerCondition - -namespace TriggerPosition { -static constexpr AttributeId Id = 0x00000007; -} // namespace TriggerPosition - -namespace WaitingDelay { -static constexpr AttributeId Id = 0x00000008; -} // namespace WaitingDelay - -namespace KickoffTimer { -static constexpr AttributeId Id = 0x00000009; -} // namespace KickoffTimer - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 959a27bbcf6434..437a1695b17380 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1308,14 +1308,6 @@ namespace Calibrate { static constexpr CommandId Id = 0x00000002; } // namespace Calibrate -namespace ConfigureFallback { -static constexpr CommandId Id = 0x00000003; -} // namespace ConfigureFallback - -namespace CancelFallback { -static constexpr CommandId Id = 0x00000004; -} // namespace CancelFallback - } // namespace Commands } // namespace ClosureControl diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 8c7105dfdd73f2..9c11dbbf1c2f5f 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9224,8 +9224,6 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand | * Stop | 0x00 | | * MoveTo | 0x01 | | * Calibrate | 0x02 | -| * ConfigureFallback | 0x03 | -| * CancelFallback | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | | * CountdownTime | 0x0000 | @@ -9233,11 +9231,6 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand | * CurrentErrorList | 0x0002 | | * OverallState | 0x0003 | | * OverallTarget | 0x0004 | -| * RestingProcedure | 0x0005 | -| * TriggerCondition | 0x0006 | -| * TriggerPosition | 0x0007 | -| * WaitingDelay | 0x0008 | -| * KickoffTimer | 0x0009 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -9291,7 +9284,7 @@ class ClosureControlMoveTo : public ClusterCommand public: ClosureControlMoveTo(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to", credsIssuerConfig) { - AddArgument("Tag", 0, UINT8_MAX, &mRequest.tag); + AddArgument("Position", 0, UINT8_MAX, &mRequest.position); AddArgument("Latch", 0, UINT8_MAX, &mRequest.latch); AddArgument("Speed", 0, UINT8_MAX, &mRequest.speed); ClusterCommand::AddArguments(); @@ -9358,84 +9351,6 @@ class ClosureControlCalibrate : public ClusterCommand chip::app::Clusters::ClosureControl::Commands::Calibrate::Type mRequest; }; -/* - * Command ConfigureFallback - */ -class ClosureControlConfigureFallback : public ClusterCommand -{ -public: - ClosureControlConfigureFallback(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("configure-fallback", credsIssuerConfig) - { - AddArgument("RestingProcedure", 0, UINT8_MAX, &mRequest.restingProcedure); - AddArgument("TriggerCondition", 0, UINT8_MAX, &mRequest.triggerCondition); - AddArgument("TriggerPosition", 0, UINT8_MAX, &mRequest.triggerPosition); - AddArgument("WaitingDelay", 0, UINT32_MAX, &mRequest.waitingDelay); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ClosureControl::Commands::ConfigureFallback::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ClosureControl::Commands::ConfigureFallback::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::ClosureControl::Commands::ConfigureFallback::Type mRequest; -}; - -/* - * Command CancelFallback - */ -class ClosureControlCancelFallback : public ClusterCommand -{ -public: - ClosureControlCancelFallback(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("cancel-fallback", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ClosureControl::Commands::CancelFallback::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ClosureControl::Commands::CancelFallback::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::ClosureControl::Commands::CancelFallback::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ | Cluster ServiceArea | 0x0150 | |------------------------------------------------------------------------------| @@ -24069,12 +23984,10 @@ void registerClusterClosureControl(Commands & commands, CredentialIssuerCommands // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -24084,11 +23997,6 @@ void registerClusterClosureControl(Commands & commands, CredentialIssuerCommands make_unique(Id, "current-error-list", Attributes::CurrentErrorList::Id, credsIssuerConfig), // make_unique(Id, "overall-state", Attributes::OverallState::Id, credsIssuerConfig), // make_unique(Id, "overall-target", Attributes::OverallTarget::Id, credsIssuerConfig), // - make_unique(Id, "resting-procedure", Attributes::RestingProcedure::Id, credsIssuerConfig), // - make_unique(Id, "trigger-condition", Attributes::TriggerCondition::Id, credsIssuerConfig), // - make_unique(Id, "trigger-position", Attributes::TriggerPosition::Id, credsIssuerConfig), // - make_unique(Id, "waiting-delay", Attributes::WaitingDelay::Id, credsIssuerConfig), // - make_unique(Id, "kickoff-timer", Attributes::KickoffTimer::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), // @@ -24109,19 +24017,6 @@ void registerClusterClosureControl(Commands & commands, CredentialIssuerCommands make_unique>>( Id, "overall-target", Attributes::OverallTarget::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "resting-procedure", 0, UINT8_MAX, Attributes::RestingProcedure::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "trigger-condition", 0, UINT8_MAX, Attributes::TriggerCondition::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "trigger-position", 0, UINT8_MAX, Attributes::TriggerPosition::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "waiting-delay", 0, UINT32_MAX, Attributes::WaitingDelay::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "kickoff-timer", 0, UINT32_MAX, Attributes::KickoffTimer::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -24139,11 +24034,6 @@ void registerClusterClosureControl(Commands & commands, CredentialIssuerCommands make_unique(Id, "current-error-list", Attributes::CurrentErrorList::Id, credsIssuerConfig), // make_unique(Id, "overall-state", Attributes::OverallState::Id, credsIssuerConfig), // make_unique(Id, "overall-target", Attributes::OverallTarget::Id, credsIssuerConfig), // - make_unique(Id, "resting-procedure", Attributes::RestingProcedure::Id, credsIssuerConfig), // - make_unique(Id, "trigger-condition", Attributes::TriggerCondition::Id, credsIssuerConfig), // - make_unique(Id, "trigger-position", Attributes::TriggerPosition::Id, credsIssuerConfig), // - make_unique(Id, "waiting-delay", Attributes::WaitingDelay::Id, credsIssuerConfig), // - make_unique(Id, "kickoff-timer", Attributes::KickoffTimer::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), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 4121c85cf30051..f6a8455734d039 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -4271,19 +4271,19 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, Json::Value valueCopy(value); char labelWithMember[kMaxLabelLength]; - if (value.isMember("tagPosition")) + if (value.isMember("position")) { - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "tagPosition"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tagPosition, value["tagPosition"])); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "position"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.position, value["position"])); } - valueCopy.removeMember("tagPosition"); + valueCopy.removeMember("position"); - if (value.isMember("tagLatch")) + if (value.isMember("latch")) { - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "tagLatch"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tagLatch, value["tagLatch"])); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "latch"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.latch, value["latch"])); } - valueCopy.removeMember("tagLatch"); + valueCopy.removeMember("latch"); if (value.isMember("speed")) { @@ -4297,8 +4297,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::ClosureControl::Structs::OverallTargetStruct::Type & request) { - ComplexArgumentParser::Finalize(request.tagPosition); - ComplexArgumentParser::Finalize(request.tagLatch); + ComplexArgumentParser::Finalize(request.position); + ComplexArgumentParser::Finalize(request.latch); ComplexArgumentParser::Finalize(request.speed); } 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 cb33c79471bbcd..5348d094a7a404 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3787,18 +3787,18 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("TagPosition", indent + 1, value.tagPosition); + CHIP_ERROR err = LogValue("Position", indent + 1, value.position); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TagPosition'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Position'"); return err; } } { - CHIP_ERROR err = LogValue("TagLatch", indent + 1, value.tagLatch); + CHIP_ERROR err = LogValue("Latch", indent + 1, value.latch); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TagLatch'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Latch'"); return err; } } @@ -16040,31 +16040,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OverallTarget", 1, value); } - case ClosureControl::Attributes::RestingProcedure::Id: { - chip::app::Clusters::ClosureControl::RestingProcedureEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RestingProcedure", 1, value); - } - case ClosureControl::Attributes::TriggerCondition::Id: { - chip::app::Clusters::ClosureControl::TriggerConditionEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TriggerCondition", 1, value); - } - case ClosureControl::Attributes::TriggerPosition::Id: { - chip::app::Clusters::ClosureControl::TriggerPositionEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TriggerPosition", 1, value); - } - case ClosureControl::Attributes::WaitingDelay::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WaitingDelay", 1, value); - } - case ClosureControl::Attributes::KickoffTimer::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("KickoffTimer", 1, value); - } case ClosureControl::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 1d14563a3de866..a2851b847341a8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -2736,16 +2736,6 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) return "OverallState"; case chip::app::Clusters::ClosureControl::Attributes::OverallTarget::Id: return "OverallTarget"; - case chip::app::Clusters::ClosureControl::Attributes::RestingProcedure::Id: - return "RestingProcedure"; - case chip::app::Clusters::ClosureControl::Attributes::TriggerCondition::Id: - return "TriggerCondition"; - case chip::app::Clusters::ClosureControl::Attributes::TriggerPosition::Id: - return "TriggerPosition"; - case chip::app::Clusters::ClosureControl::Attributes::WaitingDelay::Id: - return "WaitingDelay"; - case chip::app::Clusters::ClosureControl::Attributes::KickoffTimer::Id: - return "KickoffTimer"; case chip::app::Clusters::ClosureControl::Attributes::GeneratedCommandList::Id: return "GeneratedCommandList"; case chip::app::Clusters::ClosureControl::Attributes::AcceptedCommandList::Id: @@ -5480,10 +5470,6 @@ char const * AcceptedCommandIdToText(chip::ClusterId cluster, chip::CommandId id return "MoveTo"; case chip::app::Clusters::ClosureControl::Commands::Calibrate::Id: return "Calibrate"; - case chip::app::Clusters::ClosureControl::Commands::ConfigureFallback::Id: - return "ConfigureFallback"; - case chip::app::Clusters::ClosureControl::Commands::CancelFallback::Id: - return "CancelFallback"; default: return "Unknown"; } 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 aa1be9936b043e..0bed28ac94ab40 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -90733,8 +90733,6 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut | * Stop | 0x00 | | * MoveTo | 0x01 | | * Calibrate | 0x02 | -| * ConfigureFallback | 0x03 | -| * CancelFallback | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | | * CountdownTime | 0x0000 | @@ -90742,11 +90740,6 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut | * CurrentErrorList | 0x0002 | | * OverallState | 0x0003 | | * OverallTarget | 0x0004 | -| * RestingProcedure | 0x0005 | -| * TriggerCondition | 0x0006 | -| * TriggerPosition | 0x0007 | -| * WaitingDelay | 0x0008 | -| * KickoffTimer | 0x0009 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -90812,7 +90805,7 @@ class ClosureControlMoveTo : public ClusterCommand { : ClusterCommand("move-to") { #if MTR_ENABLE_PROVISIONAL - AddArgument("Tag", 0, UINT8_MAX, &mRequest.tag); + AddArgument("Position", 0, UINT8_MAX, &mRequest.position); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("Latch", 0, UINT8_MAX, &mRequest.latch); @@ -90835,10 +90828,10 @@ class ClosureControlMoveTo : public ClusterCommand { __auto_type * params = [[MTRClosureControlClusterMoveToParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.tag.HasValue()) { - params.tag = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.tag.Value())]; + if (mRequest.position.HasValue()) { + params.position = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.position.Value())]; } else { - params.tag = nil; + params.position = nil; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL @@ -90924,139 +90917,6 @@ class ClosureControlCalibrate : public ClusterCommand { private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ConfigureFallback - */ -class ClosureControlConfigureFallback : public ClusterCommand { -public: - ClosureControlConfigureFallback() - : ClusterCommand("configure-fallback") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("RestingProcedure", 0, UINT8_MAX, &mRequest.restingProcedure); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TriggerCondition", 0, UINT8_MAX, &mRequest.triggerCondition); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TriggerPosition", 0, UINT8_MAX, &mRequest.triggerPosition); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("WaitingDelay", 0, UINT32_MAX, &mRequest.waitingDelay); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ClosureControl::Commands::ConfigureFallback::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterClosureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRClosureControlClusterConfigureFallbackParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.restingProcedure.HasValue()) { - params.restingProcedure = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.restingProcedure.Value())]; - } else { - params.restingProcedure = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.triggerCondition.HasValue()) { - params.triggerCondition = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.triggerCondition.Value())]; - } else { - params.triggerCondition = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.triggerPosition.HasValue()) { - params.triggerPosition = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.triggerPosition.Value())]; - } else { - params.triggerPosition = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.waitingDelay.HasValue()) { - params.waitingDelay = [NSNumber numberWithUnsignedInt:mRequest.waitingDelay.Value()]; - } else { - params.waitingDelay = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster configureFallbackWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ClosureControl::Commands::ConfigureFallback::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command CancelFallback - */ -class ClosureControlCancelFallback : public ClusterCommand { -public: - ClosureControlCancelFallback() - : ClusterCommand("cancel-fallback") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ClosureControl::Commands::CancelFallback::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterClosureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRClosureControlClusterCancelFallbackParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster cancelFallbackWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL @@ -91486,431 +91346,6 @@ class SubscribeAttributeClosureControlOverallTarget : public SubscribeAttribute #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/* - * Attribute RestingProcedure - */ -class ReadClosureControlRestingProcedure : public ReadAttribute { -public: - ReadClosureControlRestingProcedure() - : ReadAttribute("resting-procedure") - { - } - - ~ReadClosureControlRestingProcedure() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ClosureControl::Attributes::RestingProcedure::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 = [[MTRBaseClusterClosureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRestingProcedureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.RestingProcedure response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ClosureControl RestingProcedure read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeClosureControlRestingProcedure : public SubscribeAttribute { -public: - SubscribeAttributeClosureControlRestingProcedure() - : SubscribeAttribute("resting-procedure") - { - } - - ~SubscribeAttributeClosureControlRestingProcedure() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ClosureControl::Attributes::RestingProcedure::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 = [[MTRBaseClusterClosureControl 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 subscribeAttributeRestingProcedureWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.RestingProcedure response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute TriggerCondition - */ -class ReadClosureControlTriggerCondition : public ReadAttribute { -public: - ReadClosureControlTriggerCondition() - : ReadAttribute("trigger-condition") - { - } - - ~ReadClosureControlTriggerCondition() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ClosureControl::Attributes::TriggerCondition::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 = [[MTRBaseClusterClosureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTriggerConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.TriggerCondition response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ClosureControl TriggerCondition read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeClosureControlTriggerCondition : public SubscribeAttribute { -public: - SubscribeAttributeClosureControlTriggerCondition() - : SubscribeAttribute("trigger-condition") - { - } - - ~SubscribeAttributeClosureControlTriggerCondition() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ClosureControl::Attributes::TriggerCondition::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 = [[MTRBaseClusterClosureControl 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 subscribeAttributeTriggerConditionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.TriggerCondition response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute TriggerPosition - */ -class ReadClosureControlTriggerPosition : public ReadAttribute { -public: - ReadClosureControlTriggerPosition() - : ReadAttribute("trigger-position") - { - } - - ~ReadClosureControlTriggerPosition() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ClosureControl::Attributes::TriggerPosition::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 = [[MTRBaseClusterClosureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTriggerPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.TriggerPosition response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ClosureControl TriggerPosition read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeClosureControlTriggerPosition : public SubscribeAttribute { -public: - SubscribeAttributeClosureControlTriggerPosition() - : SubscribeAttribute("trigger-position") - { - } - - ~SubscribeAttributeClosureControlTriggerPosition() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ClosureControl::Attributes::TriggerPosition::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 = [[MTRBaseClusterClosureControl 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 subscribeAttributeTriggerPositionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.TriggerPosition response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute WaitingDelay - */ -class ReadClosureControlWaitingDelay : public ReadAttribute { -public: - ReadClosureControlWaitingDelay() - : ReadAttribute("waiting-delay") - { - } - - ~ReadClosureControlWaitingDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ClosureControl::Attributes::WaitingDelay::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 = [[MTRBaseClusterClosureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWaitingDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.WaitingDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ClosureControl WaitingDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeClosureControlWaitingDelay : public SubscribeAttribute { -public: - SubscribeAttributeClosureControlWaitingDelay() - : SubscribeAttribute("waiting-delay") - { - } - - ~SubscribeAttributeClosureControlWaitingDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ClosureControl::Attributes::WaitingDelay::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 = [[MTRBaseClusterClosureControl 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 subscribeAttributeWaitingDelayWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.WaitingDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute KickoffTimer - */ -class ReadClosureControlKickoffTimer : public ReadAttribute { -public: - ReadClosureControlKickoffTimer() - : ReadAttribute("kickoff-timer") - { - } - - ~ReadClosureControlKickoffTimer() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ClosureControl::Attributes::KickoffTimer::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 = [[MTRBaseClusterClosureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeKickoffTimerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.KickoffTimer response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ClosureControl KickoffTimer read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeClosureControlKickoffTimer : public SubscribeAttribute { -public: - SubscribeAttributeClosureControlKickoffTimer() - : SubscribeAttribute("kickoff-timer") - { - } - - ~SubscribeAttributeClosureControlKickoffTimer() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ClosureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ClosureControl::Attributes::KickoffTimer::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 = [[MTRBaseClusterClosureControl 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 subscribeAttributeKickoffTimerWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ClosureControl.KickoffTimer response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -181545,12 +180980,6 @@ void registerClusterClosureControl(Commands & commands) #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // @@ -181575,26 +181004,6 @@ void registerClusterClosureControl(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), //